Dear all, Today I'm learning to use generic views for create and update objects. It required form_class or model for the argument. My model is User from django.contrib.auth.models.User and my form as per below :
from django.contrib.auth.models import User from django.forms import ModelForm class RegistrationForm(ModelForm): class Meta: model = User fields = ('username', 'email', 'password') class UserProfileForm(ModelForm): class Meta : model = User fields = ('email',) I call the generic views in urls.py as per below : from django.conf.urls.defaults import * urlpatterns = patterns('django.views.generic.create_update', (r'^register/ $','create_object'{'form_class':'fintoo.apps.authorization.forms.RegistrationForm'}), (r'^update/ $','update_object'{'form_class':'fintoo.apps.authorization.forms.UserProfileForm'}), ) but it always raise error 'str' object has no attribute '_meta' really appreciate for your kind help thank you regards, -vierda- --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---