On Jun 5, 12:08 am, adrian <adrian...@gmail.com> wrote:
> I need to show Telephone and Address modelforms in the middle of
> another big form,
> so I decided to organize the big form into smaller modelforms and
> display each in a separate fieldset.
>
> This works well until the next time I clear the DB and run syncdb.
> At that point,
> syncdb completely ignores the app containing these modelforms.   It
> does not create tables for them or load initial data.   If I run
> manage.py reset venue then it does create the tables.
>
> Here are the forms.  If I remove these from models.py, then syncdb
> creates all the tables in this file.   If I put them back in, it
> doesn't.   Am I doing something wrong here or have I just hit some
> sort of
> limit?
>
> Thanks
>
> class VenueNamesForm(ModelForm):
>     class Meta:
>         model = Venue
>
>         fields = ['name', 'room_name', 'multi_room']
>
> class AreaForm(ModelForm):
>     class Meta:
>         model = Venue
>
>         fields = ['area']
>
> class EmailWebForm(ModelForm):
>     class Meta:
>         model = Venue
>
>         fields = ['email_address', 'website_url']
>
> class ContactsForm(ModelForm):
>     contact = forms.ModelMultipleChoiceField(required=False, queryset
> = Entity.objects.filter(role__exact="CON"))
>     class Meta:
>         model = Venue
>
>         fields = ['contact']
>
> class CapacityForm(ModelForm):
>     class Meta:
>         model = Venue
>
>         fields = ['wheelchair_accessible', 'wheelchair_capacity',
> 'seating_capacity']
>
> class StatusForm(ModelForm):
>     class Meta:
>         model = Venue
>
>         fields = ['active', 'comments']

There's probably a syntax error somewhere in your models.py. I can't
see it above, but it might be unobvious, or it might be elsewhere in
the file.
Try importing the models module in your Python shell (do something
like 'from myapp import models') and see if the traceback shows you
anything useful.
--
DR.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to