Skip to content
This repository has been archived by the owner on Oct 22, 2019. It is now read-only.

Initial event type #6

Open
avoine opened this issue Jun 12, 2011 · 1 comment
Open

Initial event type #6

avoine opened this issue Jun 12, 2011 · 1 comment

Comments

@avoine
Copy link

avoine commented Jun 12, 2011

At line 401 of the blagenda/forms.py file you get the event type "event" for a new event:

event.event_type = EventType.objects.get(label='event')

The problem is that this event type does not exist yet.

So one thing you could do is to add a initial_data.json file in the blagenda/fixtures/ directory with
some initial event type like that:

[
  {
    "pk": 1,
    "model": "blagenda.eventtype",
    "fields": {
      "abbr": "ev",
      "label": "event"
    }
  }
]

This will create the missing event type when developers would do the syncdb command.

@avoine
Copy link
Author

avoine commented Jun 12, 2011

You also need one for the tasks so it would be more:

[
  {
    "pk": 1,
    "model": "blagenda.eventtype",
    "fields": {
      "abbr": "ev",
      "label": "event"
    }
  },
  {
    "pk": 2,
    "model": "blagenda.eventtype",
    "fields": {
      "abbr": "ta",
      "label": "task"
    }
  }
]

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant