Re: AlreadyRegistered at /admin/, The model #### is already registered
On Thu, Jan 8, 2009 at 7:48 PM, rabbi wrote: > > I get the same exception(s) > > The 1st time I try to import swenglish.admin I get: > ImproperlyConfigured: 'EntryAdmin.fieldsets[3][1]['fields']' refers to > field 'created_date' that is missing from the form. > > The 2nd time I try to import swenglish.admin I get: > AlreadyRegistered: The model User is already registered > > These are the same exceptions that I get when trying to load the admin > page. > The 1st time I try to load admin page I get ImproperlyConfigured > After I press refresh (and every subsequent refresh) I get > AlreadyRegistered > You did not mention the ImproperlyConfigured exception in your original report :) I though it was likely a case of this: http://code.djangoproject.com/ticket/8245 so was trying to get at what the real problem was, which I see by your follow-up mail you have solved. There's been a fix made for that behavior of the real exception getting hidden by AlreadyRegistered on subsequent requests, but it seems (based solely on the last comment on that ticket, I haven't had time to look at it in any detail) there may be more work to be done for this situation. Karen --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: AlreadyRegistered at /admin/, The model #### is already registered
I've solved it. In case anyone has the same problem, I think it's because 'created_date' is set to auto_now, which means it's not editable and should be in fieldsets This link was helpful: http://www.nabble.com/-Django-Code---7993:-Admin-complains-about-a-missing-field-even-if-it-is-not-missing-td18680119.html Thanks for the suggestions --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: AlreadyRegistered at /admin/, The model #### is already registered
I get the same exception(s) The 1st time I try to import swenglish.admin I get: ImproperlyConfigured: 'EntryAdmin.fieldsets[3][1]['fields']' refers to field 'created_date' that is missing from the form. The 2nd time I try to import swenglish.admin I get: AlreadyRegistered: The model User is already registered These are the same exceptions that I get when trying to load the admin page. The 1st time I try to load admin page I get ImproperlyConfigured After I press refresh (and every subsequent refresh) I get AlreadyRegistered --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: AlreadyRegistered at /admin/, The model #### is already registered
On Thu, Jan 8, 2009 at 6:33 PM, rabbi wrote: > > OK, thanks > I also tried deleting the db file and then calling syncdb again... it > didn't help > Do you have any suggestions? > Try importing your admin.py from a manage.py shell prompt, and see if that shows a more useful exception. Karen --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: AlreadyRegistered at /admin/, The model #### is already registered
OK, thanks I also tried deleting the db file and then calling syncdb again... it didn't help Do you have any suggestions? On Jan 9, 12:17 am, adrian wrote: > syncdb does not modify already existing tables. > so if you modified a model - syncdb will not modify the tables > > On Jan 9, 12:01 am, rabbi wrote: > > > Hi, > > I've search around a bit and found a few references to this error, but > > it seems that everyone else was getting this when they migrated to > > Django 1.0 and newforms... for me it's a different situation, as I > > started on 1.0 from the beginning > > > Background: > > Went through tutorial, got a basic site working fine on runserver > > Migrated site to Apache, site worked fine > > > I wanted to extend the site a bit, so I modified the models and > > performed the following steps: > > modified models.py (changed existing and added new) > > modifed admin.py accordingly > > ran python manage.py syncdb > > restarted Apache > > ALREADY REGISTERED error > > deleted existing db file > > ran python manage.py syncdb > > ALREADY REGISTERED error > > > Does anyone have any suggestions? > > > Thanks, > > Alex --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: AlreadyRegistered at /admin/, The model #### is already registered
syncdb does not modify already existing tables. so if you modified a model - syncdb will not modify the tables On Jan 9, 12:01 am, rabbi wrote: > Hi, > I've search around a bit and found a few references to this error, but > it seems that everyone else was getting this when they migrated to > Django 1.0 and newforms... for me it's a different situation, as I > started on 1.0 from the beginning > > Background: > Went through tutorial, got a basic site working fine on runserver > Migrated site to Apache, site worked fine > > I wanted to extend the site a bit, so I modified the models and > performed the following steps: > modified models.py (changed existing and added new) > modifed admin.py accordingly > ran python manage.py syncdb > restarted Apache > ALREADY REGISTERED error > deleted existing db file > ran python manage.py syncdb > ALREADY REGISTERED error > > Does anyone have any suggestions? > > Thanks, > Alex --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: AlreadyRegistered at /admin/, The model #### is already registered
here's my admin.py from mysite.swenglish.models import User from mysite.swenglish.models import Entry from mysite.swenglish.models import Category from mysite.swenglish.models import Language from django.contrib import admin class UserAdmin(admin.ModelAdmin): list_display = ('name', 'password') class EntryAdmin(admin.ModelAdmin): fieldsets = [ (None,{'fields': ['value']}), ('Created Details',{'fields': ['created_date','created_user'], 'classes': ['collapse']}), ('Language & Category',{'fields': ['language','category'], 'classes': ['collapse']}), ('Translations',{'fields': ['translations'], 'classes': ['collapse']}), ] list_filter = ['value'] search_fields = ['created_user','category'] date_hierarchy = 'created_date' class CategoryAdmin(admin.ModelAdmin): fieldsets = [ (None,{'fields': ['value']}), ('Created Details',{'fields': ['created_date','created_user'], 'classes': ['collapse']}), ('Language',{'fields': ['language'], 'classes': ['collapse']}), ('Translations',{'fields': ['translations'], 'classes': ['collapse']}), ] list_filter = ['value'] search_fields = ['created_user'] date_hierarchy = 'created_date' class LanguageAdmin(admin.ModelAdmin): fieldsets = [ (None,{'fields': ['value','value_english']}), ('Created Details',{'fields': ['created_date','created_user'], 'classes': ['collapse']}), ('Translations',{'fields': ['translations'], 'classes': ['collapse']}), ] list_filter = ['value'] search_fields = ['created_user','value_english'] date_hierarchy = 'created_date' admin.site.register(User,UserAdmin) admin.site.register(Entry,EntryAdmin) admin.site.register(Category,CategoryAdmin) admin.site.register(Language,LanguageAdmin) --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
AlreadyRegistered at /admin/, The model #### is already registered
Hi, I've search around a bit and found a few references to this error, but it seems that everyone else was getting this when they migrated to Django 1.0 and newforms... for me it's a different situation, as I started on 1.0 from the beginning Background: Went through tutorial, got a basic site working fine on runserver Migrated site to Apache, site worked fine I wanted to extend the site a bit, so I modified the models and performed the following steps: modified models.py (changed existing and added new) modifed admin.py accordingly ran python manage.py syncdb restarted Apache ALREADY REGISTERED error deleted existing db file ran python manage.py syncdb ALREADY REGISTERED error Does anyone have any suggestions? Thanks, Alex --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---