Provide editable single text field (through admin) w/o using a whole model

2012-08-31 Thread Romain Knezevic
I'd like to have a single text field that stands for the text in the homepage, and editable in the admin panel, what way would you do this ? Having a whole class for this seems like a waste to me, except if there's maybe a way to set/limit the number of entries properly in the model ? (I'm obvi

Re: Tutorial issue with admin

2012-04-10 Thread Romain Gaches
you just have to define a __unicode__ method [1] in your model [1] https://docs.djangoproject.com/en/1.4/ref/models/instances/#django.db.models.Model.__unicode__ Le 11/04/2012 06:54, oneroler a écrit : I'm working on the tutorial and ran across an issue that I can't figure out. In the admin

Re: Admin interface Integer field with select box?

2011-02-11 Thread romain
admin > interface for this so user could just select values. > > Thanks for help in advance. You can do it with the "choices" field option [1] [1] http://docs.djangoproject.com/en/1.2/ref/models/fields/#django.db.models.Field.choices -- Romain -- You received this message

Re: Django Sqlite

2010-05-11 Thread Romain Gaches
ABASE_NAME in the settings module before using the > database." > > So there I am at the beginning again. Sqlite creates the file if it doesn't exist. But you must define the filename in the NAME setting. -- Romain Gaches -- You received this message because you are s

Re: Using Mako as a templating language

2010-03-29 Thread Romain Gaches
Le 28 mars 2010 à 18:34, Colin a écrit : > > Or any other templating language that's a bit looser in allowing a bit > of logic to mix in with the presentation layer? http://kid-templating.org/ -- Romain Gaches -- You received this message because you are subscribed to the

Re: Pegar todos os objetos semelhantes em tempo d e execução

2010-03-09 Thread Romain Gaches
with this, it should work: your_object.__class__.objects.all() hope it helps. -- Romain Gaches rom...@ssji.net -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To un

Re: Django with Jquery

2010-03-01 Thread Romain Gaches
the $ variable isn't defined. I always call no_conflict() to prevent any namespace collision with other JS Frameworks, especially with re-usable or partial code. -- Romain Gaches rom...@ssji.net -- You received this message because you are subscribed to the Google Groups "Django us

Re: Overriding the HTML id in ModelForm

2009-03-16 Thread Romain
Thanks a lot for the great answers, and the information about the form prefix (it is what I was looking for)! Sorry, I missed the replies 1 week ago :( Thanks again, Romain On Mar 6, 1:42 am, Eric Abrahamsen wrote: > On Mar 5, 2009, at 11:14 AM, Alex Gaynor wrote: > > > >

Overriding the HTML id in ModelForm

2009-03-04 Thread Romain
() class B(models.Model): amount = models.IntegerField() class AForm(ModelForm): class Meta: model = A class BForm(ModelForm): class Meta: model = B Conflict of ids when forms printed: ... ... ... Thanks a lot, Romain --~--~-~--~~~---~--~~ You