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
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
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
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.
Thx a lot, that's what I missed.
Regards,
Laurent.
[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
I guess this could help you :
http://code.djangoproject.com/wiki/ModelInheritance
Regards,
Laurent.
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
Is this so trivial that nobody will help me ;-(
Regards,
Laurent
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
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
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
http://opensvn.csie.org/django_ajax/trunk/
Ooops, I just found a link in the http://code.djangoproject.com/
website.
Sorry,
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.
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.
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
But I only have this problem with a model involving an ImageField.
Other models are working well.
Strange ???
18 matches
Mail list logo