Re: Deploy Django to hostmonster

2011-11-17 Thread Alex Gaynor
On Thu, Nov 17, 2011 at 9:41 PM, Tran Bac Son wrote: > Hello, > I'm new in Django. I had write my own website by Django but I got problems > in deploying it to hostmonster. > The detail of my problem is: > http://stackoverflow.com/questions/8156173/django-cant-run-in-hostmonster > Please help me

Deploy Django to hostmonster

2011-11-17 Thread Tran Bac Son
Hello, I'm new in Django. I had write my own website by Django but I got problems in deploying it to hostmonster. The detail of my problem is: http://stackoverflow.com/questions/8156173/django-cant-run-in-hostmonster Please help me to point out what wrong. Many thanks tbson -- You received this

Re: load template tag library

2011-11-17 Thread Carl Meyer
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11/17/2011 02:51 PM, Luke Plant wrote: > It's pretty easy to produce a DOS attack using only builtin template > tags and filters, and a completely empty context e.g.: > > {% for a in "xxx"|make_list %} > {% for a in "xxx"|

Re: load template tag library

2011-11-17 Thread Luke Plant
On 17/11/11 18:36, Carl Meyer wrote: > I do, however, think that the tight coupling we currently have between > INSTALLED_APPS and "what templatetag libraries are available for > load", while a reasonable default for an integrated framework, is an > unfortunate restriction on use of the template s

Re: models.IPAddressField not saved as NULL

2011-11-17 Thread rihad
On Nov 17, 7:16 pm, rihad wrote: > So is there any suggested workaround if one wishes to keep type inet > at the PostgreSQL level? BTW: changing the field type to GenericIPAddress worked flawlessly. Wow. "manage.py sqlall" revealed that it's still Postgres inet type behind the scenes. -- You re

Re: load template tag library

2011-11-17 Thread Carl Meyer
On Nov 16, 12:40 pm, ptone wrote: > On Nov 16, 1:12 am, Roald wrote: > > Can anybody explain why template tag libraries are loaded from > > *inside* a template? The more I work with them, the more I get the > > feeling that specifying which template tags are available in a > > template should be

get_traceback_html vulnerable to infinite loop if called twice

2011-11-17 Thread dlukeparker
Hi all, I would like to know if the behavior I am seeing is to be expected, or should be reported as a bug. I made a modification to the crash log middleware http://code.google.com/p/django-crashlog/ to get it to save the lovely html error report that is available when settings.DEBUG == True. S

Re: models.IPAddressField not saved as NULL

2011-11-17 Thread rihad
So is there any suggested workaround if one wishes to keep type inet at the PostgreSQL level? -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com. To unsubscribe from this

Re: models.IPAddressField not saved as NULL

2011-11-17 Thread Aymeric Augustin
2011/11/17 rihad > Probably this simple fix breaks some core design principle badly, and > that's why 17 months haven't been enough time to get it right? Come > on, this one can't be that harder than implementing multi-key PKs? :) Just read the comments and you'll see why the patch wasn't commi

Re: models.IPAddressField not saved as NULL

2011-11-17 Thread rihad
On Nov 17, 5:14 pm, Karen Tracey wrote: > > Yes, an old bug:https://code.djangoproject.com/ticket/5622 https://code.djangoproject.com/attachment/ticket/5622/empty-ip-2.diff Probably this simple fix breaks some core design principle badly, and that's why 17 months haven't been enough time to ge

Re: models.IPAddressField not saved as NULL

2011-11-17 Thread Karen Tracey
On Thu, Nov 17, 2011 at 5:13 AM, rihad wrote: > I *could* probably change the model type > to CharField and override the ModelForm widget as IPAddressField to > get form-level validation, and so the DB syntax error goes away, but > isn't that a bug? > > Yes, an old bug: https://code.djangoproject

models.IPAddressField not saved as NULL

2011-11-17 Thread rihad
I have a model field: models.IPAddressField(verbose_name="access IP address", blank=True, null=True) that I attempt to save through a ModelForm. Despite the settings above, instead of NULL, Django tries to save the empty field (mapped to Postgres' inet type) as an empty string E'' , which is inap

Re: load template tag library

2011-11-17 Thread Roald
On Nov 17, 8:02 am, Stephen Burrows wrote: > I second what Luke and Russ have already said. > > If what you're interested in is a way to securely allow users to enter > template code into the database, you can just write a custom field > that validates its input for security problems. > > Here's

Re: load template tag library

2011-11-17 Thread Roald
On Nov 17, 12:05 am, Luke Plant wrote: > From my perspective, putting the template tag libraries in the view is > absolutely the wrong thing to do, for a number of reasons: > > 1) If I'm reading a template and come across a template tag I don't > understand, I have to go and find the view it is ca