MyUser model on Inline
hello guys, I have this MyUser class with a OTO to auth.User. I was trying to make an inline for it with form=UserCreationForm, however django complains that the object doesn't have a set_password method (as expected), so, is ok to inherit as in MyUser(auth.User) on this case, even though it does not seem to be well accepted? -- 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.
planetdjango.org down?
Can't access since yesterday :/ -Alexandre -- 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: planetdjango.org down?
Alright, its working again, thank you :) On Fri, Nov 2, 2012 at 6:30 AM, Adomas Paltanavičius wrote: > On Friday, October 26, 2012 3:35:45 PM UTC+1, Alexandre Provencio wrote: >> >> Can't access since yesterday :/ > > > I am looking into this. Should be back over the weekend. > > Thanks! > Adomas > > -- > 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/-/1ANIKIBGcyAJ. > 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. -- 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.
DeserializationError while loading a datamigration for auth data
Hello guys, I'd like to auto populate my app recently converted to south, with permission group and user data. However, after generating a fixture and calling it from the datamigration I'm getting this error. I've put the steps I'm taking detailed here http://stackoverflow.com/questions/16470492/deserializationerror-while-loading-a-datamigration-for-auth-data Any help is welcome. -Alexandre -- 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?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
(yet another) Custom templatetag raising KeyError when DEBUG=False
Hello all, this is a cross post i made on stackoverflow http://stackoverflow.com/questions/27503581/yet-another-custom-templatetag-raising-keyerror-when-debug-false I'm trying to use a custom templatetag (this one actually: https://djangosnippets.org/snippets/2875/), on my project which works fine as long as DEBUG=True. When it's False, the relevant error part is: File "...app/templatetags/helper_tags.py", line 15, in change_lang path = context['request'].path File "...local/lib/python2.7/site-packages/django/template/context.py", line 56, in __getitem__ raise KeyError(key) KeyError: 'request' I've seen a lot of questions like this and I have already done the settings that all of them seen to suggest which are: 1) views.py uses django.shortcuts.render: from django.shortcuts import render def home(request): return render(request, 'home.html') 2) settings.py contains: ALLOWED_HOSTS = ['*'] from django.conf import global_settings TEMPLATE_CONTEXT_PROCESSORS = global_settings.TEMPLATE_CONTEXT_PROCESSORS + ( "django.core.context_processors.request", ) I've also created a new project with the same Django version (1.6.2) that tries to imitate the problematic project as much as possible, and for my despair it works fine also when DEBUG=False. Any hints on this is very much appreciated. Cheers! -- 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/CALaPA7BtpQsXj%2BQPPXetq8RtaTB_RjC_jm7HDE8Zt0i_L0tc9Q%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: (yet another) Custom templatetag raising KeyError when DEBUG=False
odelist.append(node.render(context)) File "/home/xand/.virtualenvs/django-foo/local/lib/python2.7/site-packages/django/template/base.py", line 1125, in render return func(*resolved_args, **resolved_kwargs) File "/home/xand/Documentos/src/Projetos/django-foo/app/templatetags/helper_tags.py", line 14, in change_lang path = context['request'].path File "/home/xand/.virtualenvs/django-foo/local/lib/python2.7/site-packages/django/template/context.py", line 56, in __getitem__ raise KeyError(key) KeyError: 'request' On Tue, Dec 23, 2014 at 12:03 AM, Collin Anderson wrote: > Hi, > > Do you have more of your traceback? > > Are you sure this is your "home" view that's being called? > > Is this happening in an included template? > > Collin > > > On Saturday, December 20, 2014 3:27:00 PM UTC-6, Alexandre Provencio wrote: >> >> Hello all, this is a cross post i made on stackoverflow >> >> http://stackoverflow.com/questions/27503581/yet-another-custom-templatetag-raising-keyerror-when-debug-false >> >> I'm trying to use a custom templatetag (this one actually: >> https://djangosnippets.org/snippets/2875/), on my project which works >> fine as long as DEBUG=True. When it's False, the relevant error part >> is: >> >> File "...app/templatetags/helper_tags.py", line 15, in change_lang >> path = context['request'].path >> File "...local/lib/python2.7/site-packages/django/template/context.py", >> line 56, in __getitem__ >> raise KeyError(key) >> KeyError: 'request' >> >> I've seen a lot of questions like this and I have already done the >> settings that all of them seen to suggest which are: >> >> 1) views.py uses django.shortcuts.render: >> >> from django.shortcuts import render >> def home(request): >> return render(request, 'home.html') >> >> 2) settings.py contains: >> >> ALLOWED_HOSTS = ['*'] >> >> from django.conf import global_settings >> TEMPLATE_CONTEXT_PROCESSORS = global_settings.TEMPLATE_CONTEXT_PROCESSORS >> + ( >> "django.core.context_processors.request", >> ) >> >> I've also created a new project with the same Django version (1.6.2) >> that tries to imitate the problematic project as much as possible, and >> for my despair it works fine also when DEBUG=False. >> >> Any hints on this is very much appreciated. >> >> Cheers! > > -- > 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/e1236721-cc22-4554-82b6-ddb2a9d068e3%40googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- 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/CALaPA7DbTZpw58Y6W3auNwAOKfA3zyV0%3Dd-o0omP%2B1TM6pctVQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: (yet another) Custom templatetag raising KeyError when DEBUG=False
Collin, I got the bug! I was in the wrong path, it had nothing to do with request or all the other things I mentioned; translation config problems were the culprit. Your explanation was very helpful to put me on the right trace! Thank you so much!!! - Alexandre On Fri, Dec 26, 2014 at 7:23 PM, Collin Anderson wrote: > Hi, > > I see what's going on. This is your 500.html server error template that's > being rendered, and unfortunately, you don't get context processors in that > template. Sorry. The idea is to handle cases where even one of your > middleware or context processors is failing. > > See the line: > return http.HttpResponseServerError(template.render(Context({}))) > > I think your best option is just to handle not having the request object > available. > > To be clear, there must be some _other_ error that's happening that's > causing the 500 in the first place. If you configure ADMINS, you'll get an > email with the traceback. > > Collin > > On Tuesday, December 23, 2014 6:04:35 AM UTC-6, Alexandre Provencio wrote: >> >> Hi Collin, thanks for answering. >> >> Yes this is the home view, but just to clarify, almost all of the >> views of the project follow this pattern of a function that returns >> the render shortcut. The templates of the views also follow the a >> pattern in the sense they all extend from base.html, which is where >> the calls for the templatetag are done. This is the full traceback: >> >> 0 errors found >> December 23, 2014 - 09:53:07 >> Django version 1.6.2, using settings 'foo.settings' >> Starting development server at http://127.0.0.1:8000/ >> Quit the server with CONTROL-C. >> Traceback (most recent call last): >> File "/usr/lib/python2.7/wsgiref/handlers.py", line 85, in run >> self.result = application(self.environ, self.start_response) >> File >> "/home/xand/.virtualenvs/django-foo/local/lib/python2.7/site-packages/django/core/handlers/wsgi.py", >> line 206, in __call__ >> response = self.get_response(request) >> File >> "/home/xand/.virtualenvs/django-foo/local/lib/python2.7/site-packages/django/core/handlers/base.py", >> line 155, in get_response >> response = self.handle_uncaught_exception(request, resolver, >> sys.exc_info()) >> File >> "/home/xand/.virtualenvs/django-foo/local/lib/python2.7/site-packages/django/core/handlers/base.py", >> line 238, in handle_uncaught_exception >> return callback(request, **param_dict) >> File >> "/home/xand/.virtualenvs/django-foo/local/lib/python2.7/site-packages/django/utils/decorators.py", >> line 99, in _wrapped_view >> response = view_func(request, *args, **kwargs) >> File >> "/home/xand/.virtualenvs/django-foo/local/lib/python2.7/site-packages/django/views/defaults.py", >> line 46, in server_error >> return http.HttpResponseServerError(template.render(Context({}))) >> File >> "/home/xand/.virtualenvs/django-foo/local/lib/python2.7/site-packages/django/template/base.py", >> line 140, in render >> return self._render(context) >> File >> "/home/xand/.virtualenvs/django-foo/local/lib/python2.7/site-packages/django/template/base.py", >> line 134, in _render >> return self.nodelist.render(context) >> File >> "/home/xand/.virtualenvs/django-foo/local/lib/python2.7/site-packages/django/template/base.py", >> line 840, in render >> bit = self.render_node(node, context) >> File >> "/home/xand/.virtualenvs/django-foo/local/lib/python2.7/site-packages/django/template/debug.py", >> line 78, in render_node >> return node.render(context) >> File >> "/home/xand/.virtualenvs/django-foo/local/lib/python2.7/site-packages/django/template/loader_tags.py", >> line 123, in render >> return compiled_parent._render(context) >> File >> "/home/xand/.virtualenvs/django-foo/local/lib/python2.7/site-packages/django/template/base.py", >> line 134, in _render >> return self.nodelist.render(context) >> File >> "/home/xand/.virtualenvs/django-foo/local/lib/python2.7/site-packages/django/template/base.py", >> line 840, in render >> bit = self.render_node(node, context) >> File >> "/home/xand/.virtualenvs/django-foo/local/lib/python2.7/site-packages/django/template/debug.py", >> line 78, in render_node >> return node.render(context) >> File >> "/home/xand/.virtualenvs/django-foo/local/lib/python2.7/sit