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 = models.DateTimeField('date published', null=True,
blank=True)
  write_date = models.DateTimeField('started writing')
  published = models.BooleanField()
  author = models.CharField(max_length=20)

What i want to do now, is that some of these fields are preset when a
new article is written. Lets say a user named Peter is going to write
a new article, then the author field should be preset to "Peter" and
shouldn't be editable. Same thing for write_date, which should be set
to the time Peter started to write this article. How do I do this?

Greets,
Kai

--

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 unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.


Reply via email to