2009/12/1 rebus_ :
> I hope this casts some light on what i am trying to say.
> Anyway, the best way is to read docs and look in django code. Sorry i
> can't help more.
You helped a lot. Thank you.
Greets,
--
Kai Timmer | http://kaitimmer.de
Email : em...@kaitimmer.de
Jabber (Google Talk): k...
models.py
=
from django.db import models
class Country(models.Model):
name = CharField(max_length=70)
def __unicode__(self):
return '%s' % (self.name)
admin.py
=
from django.contrib import admin
from your_app.models import
2009/11/30 Kai Timmer :
> 2009/11/29 rebus_ :
>> I imagine some of core devs or django gurus would maybe have better
>> ideas on how to do this (or can even tell you if this is documented
>> somewhere).
> What i wonder is: Isn't this a fairly common thing? I could think of
> so many situations whe
2009/11/29 rebus_ :
> I imagine some of core devs or django gurus would maybe have better
> ideas on how to do this (or can even tell you if this is documented
> somewhere).
What i wonder is: Isn't this a fairly common thing? I could think of
so many situations where you would preset fields with v
2009/11/29 Kai Timmer :
> 2009/11/29 rebus_ :
>> Have you tried using fieldsets [1] in you ModelAdmin. Also you can
>> override save_model method on the ModelAdmin to set values for some
>> object attributes when the object is being saved [2].
>
> I don't see how I can use fieldsets to achieve this
I do not know how to do this in admin,
but in your own form do this
peter = article( author = "Peter" )
myform = TheFormClass ( instance = peter )
hope that helps,
--Vardhan
On Sun, Nov 29, 2009 at 8:41 PM, Kai Timmer wrote:
> 2009/11/29 rebus_ :
> > Have you tried using fieldsets [1]
2009/11/29 rebus_ :
> Have you tried using fieldsets [1] in you ModelAdmin. Also you can
> override save_model method on the ModelAdmin to set values for some
> object attributes when the object is being saved [2].
I don't see how I can use fieldsets to achieve this. I thought with
the fieldsets I
2009/11/29 Kai Timmer :
> Hello,
> I'm new to django, so this question may look a bit stupid, but I
> couldn't find the information in the documentation.
>
> I have a pretty simple model which looks like this:
> class article(models.Model):
> headline = models.CharField(max_length=140)
> newsentr
Hello,
I'm new to django, so this question may look a bit stupid, but I
couldn't find the information in the documentation.
I have a pretty simple model which looks like this:
class article(models.Model):
headline = models.CharField(max_length=140)
newsentry = models.TextField()
pub_date = m
9 matches
Mail list logo