Using django 10 and postgres 9.4.

After the website full setup I noticed that I cannot create new objects from my applications, default django apps like users are OK.

ran makemigrations and migrate afterwords, and when re trying it says nothing to migrate. To make it simple: When entering django shell and typing

from users.models import *
User.objects.all()
Out[3]: [<User: root>]

but :

UserProfile.objects.all()
Out[4]:
<repr(<django.db.models.query.QuerySet at 0x39b4610>) failed: django.db.utils.ProgrammingError: relation "users_userprofile" does not exist
LINE 1: ...."is_superuser", "users_userprofile"."wight" FROM "users_use...
                                                             ^

UserProfile is my site users with onetoone to django.contrib.auth

class UserProfile(models.Model):
    user = models.OneToOneField(User)

Thanks

share|improve this question
3  
What happens if you run makemigrations <yourappname>? – 4140tm Aug 30 at 15:10
    
that did the trick :) thanks, thought i did it earlier – Ohad the Lad Aug 30 at 15:17

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.