Home ProgrammingError at / relation does not exist
Reply: 0

ProgrammingError at / relation does not exist

Adam Smith
1#
Adam Smith Published in 2018-01-12 16:43:07Z

I can not find answer in other places. (Sorry for asking again but)

what is wrong? Did anyone have such an error?

ProgrammingError at /register/ relation "user_user" does not exist LINE 1: SELECT (1) AS "a" FROM "user_user" WHERE "user_user"."userna...

I extended user abstract model and error saying no relation When i extend user in sqlite3 no errors such this but postgre is full databse error

 class User(AbstractUser):
    social_username = models.CharField(max_length=100, null=True, blank=True)

views.py

def registration(request):
    if request.method == 'POST':
        form = RegisterUserForm(request.POST)
        if form.is_valid():
            form.save()
            username = form.cleaned_data.get('username')
            raw_password = form.cleaned_data.get('password1')
            user = authenticate(username=username, password=raw_password)
            login(request, user)
            messages.success(request,'You were successfully registered  %s' % user.first_name)
            return HttpResponseRedirect('/')
        messages.error(request, 'Something went wrong while authenticating')
        return render(request, 'project/register.html', {'form': form})

    else:
        form = RegisterUserForm()
        return render(request, 'project/register.html', {'form': form})

settings.py

AUTH_USER_MODEL = 'user.User'
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.303309 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO