hi views.py -------------------------------------------------------------- from django.http import HttpResponse from django.template import Context, loader from django.http import HttpResponse #from adv.models import User from adv.models import *
def adv_index(request): return HttpResponse("hello to index page") def adv_detail(request,adv_id): return HttpResponse("hello to detail page %s"%(adv_id)) -------------------------------------------------------------------- models.py -------------------------------------------------------------------- from django.db import models class User(models.Model): name = models.CharField(maxlength=50) email = models.EmailField(maxlength=50) passwd = models.CharField(maxlength=50) def __str__(self): return self.name class Admin: #list_display("name","email","pwd") pass -------------------------------------------------------- the problem is : if i include this line "from adv.models import *" it gives an error : Error when calling the metaclass bases unbound method contribute_to_class() must be called with CharField instance as first argument (got ModelBase instance instead) what's wrong ? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---