Skip to content Skip to sidebar Skip to footer

Django1.9: 'function' Object Has No Attribute '_meta'

Django Gives an error message forms.py: from django import forms from django.contrib.auth import authenticate, get_user_model, login, logout from django.contrib.auth.forms import U

Solution 1:

You've set User equal to the functionget_user_model. You need to set it to the result of calling that function:

User = get_user_model()

Solution 2:

This library generates user model form:

from django.cotrib.authimport get_user_model

Connecting the auth user to user_model_form:

User = get_user_model()

Post a Comment for "Django1.9: 'function' Object Has No Attribute '_meta'"