I've got a site where users make articles for the newsletter. The content of their articles is a flatpage. My article model is below. My goal is to make it so that when the model is saved, and the status is changed from pending to accepted, it creates a flapage that is an html version of the original file (the html version will be uploaded by me before saving). I thought of over- riding the save method, but that doesn't get arguments of what data is being changed.
class Article(models.Model): categories = [('sports', 'Sports',), ('other', 'Other'), ('school', 'School')] user = models.ForeignKey(User) file = models.FileField(upload_to="articles/%Y/%m/%d") friendly_name = models.SlugField(max_length=100) original_name = models.CharField(max_length=100) date = models.DateTimeField(auto_now_add=True) summary = models.CharField(max_length=500) title = models.CharField(max_length=200) category = models.CharField(max_length=6, choices=categories) status = models.CharField(max_length=11, choices=STATUS_CHOICES, blank=True, default='pending') reason = models.TextField(blank=True, null=True) --~--~---------~--~----~------------~-------~--~----~ 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 django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---