Re: ImproperlyConfigured at /admin/polls/poll/add/ 'model' is a required attribute of 'PollAdmin.inlines[0]'.
Thx Magnum. That made the difference. On Wednesday, October 23, 2013 4:22:15 PM UTC+3, Lucas Magnum wrote: > > Rename the attribute "mode" to *model* in the ChoiceInline. > > []'s > > Lucas Magnum. > > > 2013/10/23 Adrian Paul Ciobanita > > >> Hello, i've been playing with Django 1.5.4 for some TDD tutorials, >> examples, and tried to also do the tutorial : >> https://docs.djangoproject.com/en/1.4/intro/tutorial02/#adding-related-objects >> BUT i keep receiving this error, as suggested in the Subject: >> >>> ImproperlyConfigured at /admin/polls/poll/add/ >> >> 'model' is a required attribute of 'PollAdmin.inlines[0]'. >>> >> >> This is my admin.py content: >> from django.contrib import admin >> >> >> from polls.models import Choice, Poll >> >> >> class ChoiceInline(admin.StackedInline): >> mode = Choice >> extra = 2 >> >> class PollAdmin(admin.ModelAdmin): >> fieldsets = [ >> (None, {'fields': ['question']}), >> ('Date information', {'fields': ['pub_date'], 'classes': >> ['collapse']}),] >> inlines = [ChoiceInline] >> list_display = ('question', 'pub_date', 'was_published_recently') >> search_fields = ['question'] >> list_filter = ['pub_date'] >> >> admin.site.register(Poll, PollAdmin) >> >> If i change admin.py and i'm left with: >> admin.site.register(Poll) >> >> Then i have no problem whatsoever with accessing, creating, deleting >> polls. >> >> Can any of you please point out in the right direction? It get's really >> frustrating. :( >> >> Below is the output/stacktrace from the server: >> Internal Server Error: /admin/polls/poll/add/ >> Traceback (most recent call last): >> File >> "/home/teach3r/work_dir/tutorials/tdddjango/local/lib/python2.7/site-packages/django/core/handlers/base.py", >> >> line 103, in get_response >> resolver_match = resolver.resolve(request.path_info) >> File >> "/home/teach3r/work_dir/tutorials/tdddjango/local/lib/python2.7/site-packages/django/core/urlresolvers.py", >> >> line 319, in resolve >> for pattern in self.url_patterns: >> File >> "/home/teach3r/work_dir/tutorials/tdddjango/local/lib/python2.7/site-packages/django/core/urlresolvers.py", >> >> line 347, in url_patterns >> patterns = getattr(self.urlconf_module, "urlpatterns", >> self.urlconf_module) >> File >> "/home/teach3r/work_dir/tutorials/tdddjango/local/lib/python2.7/site-packages/django/core/urlresolvers.py", >> >> line 342, in urlconf_module >> self._urlconf_module = import_module(self.urlconf_name) >> File >> "/home/teach3r/work_dir/tutorials/tdddjango/local/lib/python2.7/site-packages/django/utils/importlib.py", >> >> line 35, in import_module >> __import__(name) >> File "/home/teach3r/work_dir/tutorials/mysite/mysite/urls.py", line 5, >> in >> admin.autodiscover() >> File >> "/home/teach3r/work_dir/tutorials/tdddjango/local/lib/python2.7/site-packages/django/contrib/admin/__init__.py", >> >> line 29, in autodiscover >> import_module('%s.admin' % app) >> File >> "/home/teach3r/work_dir/tutorials/tdddjango/local/lib/python2.7/site-packages/django/utils/importlib.py", >> >> line 35, in import_module >> __import__(name) >> File "/home/teach3r/work_dir/tutorials/mysite/polls/admin.py", line 19, >> in >> admin.site.register(Poll, PollAdmin) >> File >> "/home/teach3r/work_dir/tutorials/tdddjango/local/lib/python2.7/site-packages/django/contrib/admin/sites.py", >> >> line 98, in register >> validate(admin_class, model) >> File >> "/home/teach3r/work_dir/tutorials/tdddjango/local/lib/python2.7/site-packages/django/contrib/admin/validation.py", >> >> line 184, in validate >> "of '%s.inlines[%d]'." % (cls.__name__, idx)) >> ImproperlyConfigured: 'model' is a required attribute of >> 'PollAdmin.inlines[0]'. >> >> Thx in advance. >> >>
Re: ImproperlyConfigured at /admin/polls/poll/add/ 'model' is a required attribute of 'PollAdmin.inlines[0]'.
Rename the attribute "mode" to *model* in the ChoiceInline. []'s Lucas Magnum. 2013/10/23 Adrian Paul Ciobanita > Hello, i've been playing with Django 1.5.4 for some TDD tutorials, > examples, and tried to also do the tutorial : > https://docs.djangoproject.com/en/1.4/intro/tutorial02/#adding-related-objects > BUT i keep receiving this error, as suggested in the Subject: > >> ImproperlyConfigured at /admin/polls/poll/add/ > > 'model' is a required attribute of 'PollAdmin.inlines[0]'. >> > > This is my admin.py content: > from django.contrib import admin > > > from polls.models import Choice, Poll > > > class ChoiceInline(admin.StackedInline): > mode = Choice > extra = 2 > > class PollAdmin(admin.ModelAdmin): > fieldsets = [ > (None, {'fields': ['question']}), > ('Date information', {'fields': ['pub_date'], 'classes': > ['collapse']}),] > inlines = [ChoiceInline] > list_display = ('question', 'pub_date', 'was_published_recently') > search_fields = ['question'] > list_filter = ['pub_date'] > > admin.site.register(Poll, PollAdmin) > > If i change admin.py and i'm left with: > admin.site.register(Poll) > > Then i have no problem whatsoever with accessing, creating, deleting polls. > > Can any of you please point out in the right direction? It get's really > frustrating. :( > > Below is the output/stacktrace from the server: > Internal Server Error: /admin/polls/poll/add/ > Traceback (most recent call last): > File > "/home/teach3r/work_dir/tutorials/tdddjango/local/lib/python2.7/site-packages/django/core/handlers/base.py", > line 103, in get_response > resolver_match = resolver.resolve(request.path_info) > File > "/home/teach3r/work_dir/tutorials/tdddjango/local/lib/python2.7/site-packages/django/core/urlresolvers.py", > line 319, in resolve > for pattern in self.url_patterns: > File > "/home/teach3r/work_dir/tutorials/tdddjango/local/lib/python2.7/site-packages/django/core/urlresolvers.py", > line 347, in url_patterns > patterns = getattr(self.urlconf_module, "urlpatterns", > self.urlconf_module) > File > "/home/teach3r/work_dir/tutorials/tdddjango/local/lib/python2.7/site-packages/django/core/urlresolvers.py", > line 342, in urlconf_module > self._urlconf_module = import_module(self.urlconf_name) > File > "/home/teach3r/work_dir/tutorials/tdddjango/local/lib/python2.7/site-packages/django/utils/importlib.py", > line 35, in import_module > __import__(name) > File "/home/teach3r/work_dir/tutorials/mysite/mysite/urls.py", line 5, > in > admin.autodiscover() > File > "/home/teach3r/work_dir/tutorials/tdddjango/local/lib/python2.7/site-packages/django/contrib/admin/__init__.py", > line 29, in autodiscover > import_module('%s.admin' % app) > File > "/home/teach3r/work_dir/tutorials/tdddjango/local/lib/python2.7/site-packages/django/utils/importlib.py", > line 35, in import_module > __import__(name) > File "/home/teach3r/work_dir/tutorials/mysite/polls/admin.py", line 19, > in > admin.site.register(Poll, PollAdmin) > File > "/home/teach3r/work_dir/tutorials/tdddjango/local/lib/python2.7/site-packages/django/contrib/admin/sites.py", > line 98, in register > validate(admin_class, model) > File > "/home/teach3r/work_dir/tutorials/tdddjango/local/lib/python2.7/site-packages/django/contrib/admin/validation.py", > line 184, in validate > "of '%s.inlines[%d]'." % (cls.__name__, idx)) > ImproperlyConfigured: 'model' is a required attribute of > 'PollAdmin.inlines[0]'. > > Thx in advance. > > Kind regards. > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-users+unsubscr...@googlegroups.com. > To post to this group, send email to django-users@googlegroups.com. > Visit this group at http://groups.google.com/group/django-users. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/5d666f2e-6c3b-4997-b88b-8f47968ac410%40googlegroups.com > . > For more options, visit https://groups.google.com/groups/opt_out. > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAAB7jOzzgjLnOU0_iM%2BaZo%3D2_QyZexbgwcG5Xp8Tn6ntPOvorQ%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
ImproperlyConfigured at /admin/polls/poll/add/ 'model' is a required attribute of 'PollAdmin.inlines[0]'.
Hello, i've been playing with Django 1.5.4 for some TDD tutorials, examples, and tried to also do the tutorial : https://docs.djangoproject.com/en/1.4/intro/tutorial02/#adding-related-objects BUT i keep receiving this error, as suggested in the Subject: > ImproperlyConfigured at /admin/polls/poll/add/ 'model' is a required attribute of 'PollAdmin.inlines[0]'. > This is my admin.py content: from django.contrib import admin from polls.models import Choice, Poll class ChoiceInline(admin.StackedInline): mode = Choice extra = 2 class PollAdmin(admin.ModelAdmin): fieldsets = [ (None, {'fields': ['question']}), ('Date information', {'fields': ['pub_date'], 'classes': ['collapse']}),] inlines = [ChoiceInline] list_display = ('question', 'pub_date', 'was_published_recently') search_fields = ['question'] list_filter = ['pub_date'] admin.site.register(Poll, PollAdmin) If i change admin.py and i'm left with: admin.site.register(Poll) Then i have no problem whatsoever with accessing, creating, deleting polls. Can any of you please point out in the right direction? It get's really frustrating. :( Below is the output/stacktrace from the server: Internal Server Error: /admin/polls/poll/add/ Traceback (most recent call last): File "/home/teach3r/work_dir/tutorials/tdddjango/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 103, in get_response resolver_match = resolver.resolve(request.path_info) File "/home/teach3r/work_dir/tutorials/tdddjango/local/lib/python2.7/site-packages/django/core/urlresolvers.py", line 319, in resolve for pattern in self.url_patterns: File "/home/teach3r/work_dir/tutorials/tdddjango/local/lib/python2.7/site-packages/django/core/urlresolvers.py", line 347, in url_patterns patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module) File "/home/teach3r/work_dir/tutorials/tdddjango/local/lib/python2.7/site-packages/django/core/urlresolvers.py", line 342, in urlconf_module self._urlconf_module = import_module(self.urlconf_name) File "/home/teach3r/work_dir/tutorials/tdddjango/local/lib/python2.7/site-packages/django/utils/importlib.py", line 35, in import_module __import__(name) File "/home/teach3r/work_dir/tutorials/mysite/mysite/urls.py", line 5, in admin.autodiscover() File "/home/teach3r/work_dir/tutorials/tdddjango/local/lib/python2.7/site-packages/django/contrib/admin/__init__.py", line 29, in autodiscover import_module('%s.admin' % app) File "/home/teach3r/work_dir/tutorials/tdddjango/local/lib/python2.7/site-packages/django/utils/importlib.py", line 35, in import_module __import__(name) File "/home/teach3r/work_dir/tutorials/mysite/polls/admin.py", line 19, in admin.site.register(Poll, PollAdmin) File "/home/teach3r/work_dir/tutorials/tdddjango/local/lib/python2.7/site-packages/django/contrib/admin/sites.py", line 98, in register validate(admin_class, model) File "/home/teach3r/work_dir/tutorials/tdddjango/local/lib/python2.7/site-packages/django/contrib/admin/validation.py", line 184, in validate "of '%s.inlines[%d]'." % (cls.__name__, idx)) ImproperlyConfigured: 'model' is a required attribute of 'PollAdmin.inlines[0]'. Thx in advance. Kind regards. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/5d666f2e-6c3b-4997-b88b-8f47968ac410%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Django-allauth: ImproperlyConfigured at /accounts/login/ No Facebook app configured: please add a SocialApp using the Django admin
Hi Gabriel, Thanks for replying. However, the issue, I think, came up because of the incorrect SITE_ID value in my settings.py. You can see the conversation at this stackoverflow thread. http://stackoverflow.com/questions/14019017/django-allauth-no-facebook-app-configured-please-add-a-socialapp-using-the-djan It's solved for now. :-) Regards, Manu On Tuesday, 25 December 2012 20:16:27 UTC+5:30, Gabriel - Iulian Dumbrava wrote: > > Hi Manu, > Enter the admin and at allauth -> apps add a new application of type > "Facebook" with your FB credentials. > > You have added a facebook login in settings.py but such a login type is > not yet defined in admin. > > I hope this helps! > Gabriel > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/NQC82_En1v8J. 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.
Django-allauth: ImproperlyConfigured at /accounts/login/ No Facebook app configured: please add a SocialApp using the Django admin
Hi Manu, Enter the admin and at allauth -> apps add a new application of type "Facebook" with your FB credentials. You have added a facebook login in settings.py but such a login type is not yet defined in admin. I hope this helps! Gabriel -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/TU7blvngKOEJ. 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.
Django-allauth: ImproperlyConfigured at /accounts/login/ No Facebook app configured: please add a SocialApp using the Django admin
Hi, I'm facing this error when I access 'accounts/login/'. Posted a question here - http://stackoverflow.com/q/14019017/1218897 I would really appreciate any help with it. Thanks in advance. -Manu -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/kENl6tSAZDsJ. 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: ImproperlyConfigured at /
On Mon, Aug 20, 2012 at 5:24 PM, Amyth Arora wrote: > Hey, Thanks for the kind help. > > seems you are using django 1.4. FYI -> Yes, you are right. > django.template.loaders.app_directories.load_template_source has been > deprecated so you should rather use > django.template.loaders.app_directories.Loader I had already added this to my file, but i made a mistake that i did not remove the load_template_source. Thanks again, it works for me. > Just change : > > django.template.loaders.app_directories.load_template_source > TO > django.template.loaders.app_directories.Loader > in the TEMPLATE_LOADERS dictionary in your settings.py file and it > should have it fixed. > > > On Mon, Aug 20, 2012 at 4:30 PM, Satinderpal Singh > wrote: >> I have to deploy osmeditor on my system, and download code from the >> link: http://wiki.openstreetmap.org/wiki/Editors/Django >> The database used in this was postgis, but i have mysql on my system, >> as the tables was successfully made by changing in the settings.py >> file, but on running it in the browser, it gives the following error: >> >> Error importing template source loader >> django.template.loaders.filesystem.load_template_source: "'module' >> object has no attribute 'load_template_source'" >> >> If anybody helps me to solve the problem. Thanks in advance. >> >> -- >> Satinderpal Singh >> http://satindergoraya.blogspot.in/ >> >> -- >> 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. >> > > > > -- > Thanks & Regards > > > Amyth [Admin - Techstricks] > Email - aroras.offic...@gmail.com, ad...@techstricks.com > Twitter - @a_myth_ > http://techstricks.com/ > > -- > 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. > -- Satinderpal Singh http://satindergoraya.blogspot.in/ -- 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: ImproperlyConfigured at /
Hey, seems you are using django 1.4. FYI -> django.template.loaders.app_directories.load_template_source has been deprecated so you should rather use django.template.loaders.app_directories.Loader Just change : django.template.loaders.app_directories.load_template_source TO django.template.loaders.app_directories.Loader in the TEMPLATE_LOADERS dictionary in your settings.py file and it should have it fixed. On Mon, Aug 20, 2012 at 4:30 PM, Satinderpal Singh wrote: > I have to deploy osmeditor on my system, and download code from the > link: http://wiki.openstreetmap.org/wiki/Editors/Django > The database used in this was postgis, but i have mysql on my system, > as the tables was successfully made by changing in the settings.py > file, but on running it in the browser, it gives the following error: > > Error importing template source loader > django.template.loaders.filesystem.load_template_source: "'module' > object has no attribute 'load_template_source'" > > If anybody helps me to solve the problem. Thanks in advance. > > -- > Satinderpal Singh > http://satindergoraya.blogspot.in/ > > -- > 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. > -- Thanks & Regards Amyth [Admin - Techstricks] Email - aroras.offic...@gmail.com, ad...@techstricks.com Twitter - @a_myth_ http://techstricks.com/ -- 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.
ImproperlyConfigured at /
I have to deploy osmeditor on my system, and download code from the link: http://wiki.openstreetmap.org/wiki/Editors/Django The database used in this was postgis, but i have mysql on my system, as the tables was successfully made by changing in the settings.py file, but on running it in the browser, it gives the following error: Error importing template source loader django.template.loaders.filesystem.load_template_source: "'module' object has no attribute 'load_template_source'" If anybody helps me to solve the problem. Thanks in advance. -- Satinderpal Singh http://satindergoraya.blogspot.in/ -- 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.