Re: Can I get away with creating login/logout.html ?
> still trying to figure out the login part. > https://docs.djangoproject.com/en/dev/topics/auth/default/#module-django.contrib.auth.views See settings.LOGIN_REDIRECT_URL 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?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: Date from DateTimeField vs date from model method: foreign key DateTimeField
On Fri, Apr 12, 2013 at 2:47 PM, Mike Doroshenko II wrote: > In my attached models.py Please, don't attach code, use a paste service or similar to view the code online. > the time last modified on the latest object that has a foreign key to it. > > So when I made a new document, in the admin interface I see April 11, 2013, > 8:24 p.m. for the Created column and 2013-04-11 20:24:36.799167 for the Last > Modified column. > > Also I can click to sort the results by Created date, but not by last > modified date. I'm afraid any reason why it's different. Are you using your own ModelAdmin ? > > Additionally in the same file in the model method I am using a for-loop to > get the value for Last Modified. I imagine going through each object just to > pull the data from the last one isn't very efficient and pretty redundant. I > tried to just pull the last object directly but am getting an error: I modified your code accordingly http://pastebin.com/7NisAVfN be aware that if a 'Piece' matching that criteria doesn't exists, it will raise a DoesNotExist exception, maybe you'll want to catch it. psst ->> https://docs.djangoproject.com/en/dev/ref/models/querysets/ > -- > Mike Doroshenko, Junior Sys Admin 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?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: Stuck
On Wed, Dec 26, 2012 at 4:22 PM, wrote: > IndentationError: unindent does not match any outer indentation level The error is quite self explanatory. -- 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: Django 1.4 and google app engine
On Sat, Sep 22, 2012 at 5:16 PM, neixetis wrote: > I am about to deal with the same problem, however I have finished my > project, now I need to update it asap on GAE, but I just can not as newest > version of SDK Django is 1.3, whereas my project is 1.4. Any ideas what > should I do now? Please help guys:D You can try the django 1.4 nonrel's version, although is currently in WIP state, I'm not sure how mature it is https://github.com/django-nonrel/django-1.4 The nonrel stable (1.3) works pretty well. -- Kind Regards -- 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: Can't make 404.html template to be used. Keep getting Apache 500 Internal Server Error instead.
On Sat, Jan 21, 2012 at 2:28 PM, Chris Seberino wrote: > I am proxying my Django app behind Apache. I created a 404.html in my > template directory but when I try to test it I get the following error > that appears to come from Apache... > > Internal Server Error > Check your apache logs. -- Kind Regards -- 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: Can a template extend a template?
On Tue, Dec 13, 2011 at 7:21 PM, Jason <1jason.whatf...@gmail.com> wrote: > Hi there, > > I love the concept of DRY, and django's enthusiasm for this concept. In > light of this I have tried to have a template extend a template, but it > doesn't seem to work. Is there a better way than what I'm currently doing? > > The current way > > index.html > > {% if current_user %} > {% extends "_logged_out_template.html" %} > > {% else %} > {% extends "_logged_in_template.html" %} > {% endif %} > > contact.html > > {% if current_user %} > > {% extends "_logged_out_template.html" %} > > {% else %} > > {% extends "_logged_in_template.html" %} > > {% endif %} > > > > The way I would like it to be (but it didn't work) > > index.html > {% extends "_base_template.html" %} > > _base_script.html > > {% if current_user %} > > {% extends "_logged_out_template.html" %} > > {% else %} > > {% extends "_logged_in_template.html" %} > > {% endif %} > I don't see why it doesn't work. Post the errors you are having. I use templates that extends templates with no issues. -- Kind Regards -- 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.