Re: Custom manager and default admin manager

2007-04-12 Thread asrenzo
Hi, again Found a solution which doesn't seem to be documented: If you need a special manager for the admin interface, then you should add this one to the Admin class of your model: class Admin: manager = MyManager() Regards, Laurent On 12 avr, 15:39, "asrenzo" &l

Custom manager and default admin manager

2007-04-12 Thread asrenzo
Hi, We can read in the model reference that we can create an unlimited number of managers in a single model. The documentation gives example of how to create and use a custom manager. We can also read: """ If you use custom Manager objects, take note that the first Manager Django encounters (in

Custom admin interface (admin/change_list.html)

2007-04-11 Thread asrenzo
Hi, I'm wrtting a small web site with a limited number of apps and tables. Almost all my models can easely be managed throught the automatic django admin interface. I changed some minors points of the some change_form by subclassing the original ones and adding extra content in some usable block

Re: problem with auto_now date

2005-09-28 Thread asrenzo
But I only have this problem with a model involving an ImageField. Other models are working well. Strange ???

Re: problem with auto_now date

2005-09-28 Thread asrenzo
Hi, I'm happy to see that I don't seem to be the only one with this problem : I already posted a similar message a few days ago. http://groups.google.com/group/django-users/browse_thread/thread/1e7cb60de998d3cf

Expires header with cache middleware

2005-09-26 Thread asrenzo
Hi, Don't you think there should be an automatic Expires header send when using a cache middleware (like the Last-Modified one) ? This way, an apache frontend (or any squid) could cache entire pages for a while without any django access. Regards, Laurent.

Insert error

2005-09-24 Thread asrenzo
Hi, Here's my model : class Image(meta.Model): paragraph = meta.ForeignKey(Paragraph) creation_date = meta.DateTimeField(null=False, auto_now_add=True) update_date = meta.DateTimeField(null=False, auto_now=True) name = meta.CharField(maxlength = 255, blank = True) img = meta.

Re: Does anyboby know about this ??

2005-09-21 Thread asrenzo
Ooops, I just found a link in the http://code.djangoproject.com/ website. Sorry,

Does anyboby know about this ??

2005-09-21 Thread asrenzo
http://opensvn.csie.org/django_ajax/trunk/

Re: ForeignKey and delete in cascade

2005-09-07 Thread asrenzo
I agree with referential integrity but sometimes this way of deleting records can mess datas also. A simple example : Class Team(meta.Model): Class Family(meta.Model): Class Person(meta.Model): family = meta.ForeignKey(Family, null = False) team = meta.ForeignKey(Team

ForeignKey and delete in cascade

2005-09-06 Thread asrenzo
Hi, Here is my problem : Class Map(meta.Model): name = meta.CharField(maxlength=255) Class City(meta.Model): map = meta.ForeignKey(Map, null = True, blank = True) name = meta.CharField(maxlength=255) ... Now create a Map object : OK Now create a City with no Map related : OK No

multiple model files

2005-09-02 Thread asrenzo
Hi, I tried to do what's written in the doc (or in this group) to split my Poll.py model into several sub-files. I changed the __init__.py of my app to look for all other files. __ALL__ = ['Poll', 'Choices'] but a django-admin sql Poll only shows sql statments for Poll model. And this even if I

Re: _(pre/post)_save relative question

2005-08-30 Thread asrenzo
Is this so trivial that nobody will help me ;-( Regards, Laurent

_(pre/post)_save relative question

2005-08-30 Thread asrenzo
Hi, I got a too difficult problem for me : Here's is my model Poll : class Poll(meta.Model): question = meta.CharField(maxlength=200) pub_date = meta.DateTimeField('date published') class META: admin = meta.Admin() def __repr__(self): return self.question

Re: extending admin interface

2005-08-30 Thread asrenzo
I guess this could help you : http://code.djangoproject.com/wiki/ModelInheritance Regards, Laurent.

Re: Anyone working on Open Source Django Apps?

2005-08-29 Thread asrenzo
[EMAIL PROTECTED] a écrit : > Has anyone begun working on an open source apps for Django? Is there > any plan in the works for creating a repository of open source Django > apps? > > I am looking to start an open source forum software application and I > want to make sure I am not duplicating an

Re: Hand Made SQL execution

2005-08-29 Thread asrenzo
Thx a lot, that's what I missed. Regards, Laurent.

Hand Made SQL execution

2005-08-29 Thread asrenzo
Hi, Does anybody know how to execute an hand made sql query ? I've looked at django.core.db but I didn't find anything. Am I blind ?? Regards, Laurent.