Hi Eric. Take a look at Django's generic views ( http://www.djangoproject.com/documentation/generic_views/), especially the List/Detail generic views and the Create/Update/Delete generic views on that page. If these generic views suit your needs then you may be able to get away with writing only some template code.
-- Scott On Mon, Jul 21, 2008 at 5:45 AM, Eric Liu <[EMAIL PROTECTED]> wrote: > Hi all, > after I readed the djangobook,I found if I wrote following code and I > want to get some cool stuff.like auto generate the CRUD logic,I found that I > have to use the Django Admin tool.I mean if I use Rails Or Grail,it can auto > generate the code for me (both logic code and page code).but it seems that > Django didn't provide these feature.I think if I want to some "user_define" > feature ,and I don't use the Django Admin tool,that means I have to write > some redundancy,for example every model with same CRUD method.and even if I > extend the Django Admin template ,and I want to custom some behavious of > page logic,it's tough. > > Is there some better methods I can use under Django,like Rails or Grails? > > Thanks > > > > > class Publisher(models.Model): > name=models.CharField(max_length=30) > address=models.CharField(max_length=50) > city=models.CharField(max_length=60) > state_province=models.CharField(max_length=30) > country=models.CharField(max_length=50) > website=models.URLField() > > def __str__(self): > return self.name > class Meta: > ordering=['name'] > class Admin: > pass > > > > -- http://scott.andstuff.org/ | http://truthadorned.org/ --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---