On 10/5/06, carlwenrich <[EMAIL PROTECTED]> wrote:
>
> Models:
>
> ---
> class Week(models.Model):
>         beginning = models.DateField(core=True)
>
>         def __str__(self):
>                 return str(self.beginning)
>
>         class Admin:
>                 pass
>
>
> class Day(models.Model):
>         week = models.ForeignKey(Week, edit_inline=models.TABULAR,
> num_in_admin=7)
>         name = models.CharField(maxlength=50)
>         opens = models.TimeField()
>         closes = models.TimeField()
>
>         def __str__(self):
>                 return self.name
> ---
>
> The admin screen (add) comes up with a week and seven days. Each day
> has a name field, and opens field, and a closes field. I'd like it to
> come up with those fields pre-populated with default values.
>
> Can I do it? If so, how?
>
http://www.djangoproject.com/documentation/model_api/#default


-- 
----
Waylan Limberg
[EMAIL PROTECTED]

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to