What do you think about here lambda function to configure TEMPLATE_DIRS with relatives values ?

2009-06-30 Thread klein.steph...@gmail.com
Hi, When I configuration my TEMPLATE_DIRS in settings.py file, I use ever "here" or "here_cross" lambda function defined like this : :: import os here = lambda x: os.path.join(os.path.abspath(os.path.dirname (__file__)), x) here_cross = lambda x: os.path.join(os.path.abspath(os.path

OneToOneField relation and bidirectional StackedInline behavior in contrib.admin context

2009-01-09 Thread klein.steph...@gmail.com
Hi, First, I begin with one example : I've this in test1/models.py from django.db import models class ClassA(models.Model): foo = models.CharField("Foo", max_length = 100) class ClassB(models.Model): bar = models.CharField("bar", max_length = 100) rel_a =

Re: I would like some feedback about address model snippet...

2008-12-24 Thread klein.steph...@gmail.com
On 24 déc, 10:37, "Ramdas S" wrote: > Stephane, > > IMHO it will be better you use dpaste.com for such trivial examples where > you require feedback. Djangosnippets shold be reserved for coding snippets > that goes a bit beyond a model > My aim isn't to do private sample, I would like publish p

I would like some feedback about address model snippet...

2008-12-24 Thread klein.steph...@gmail.com
Hi, I've write a address model snippet at : http://www.djangosnippets.org/snippets/1177/ I would like to know if you see some missing fields or mistake/ misnamed fields ? Note : I'm french and I haven't international address system background. Thanks for your feedback. Regards, Stephane --~-