On Wednesday, February 8, 2017 at 7:09:12 AM UTC+8, Gerald Brown wrote:
>
> I have just started an app on Ubuntu 16.04 Server using Python 3.5 and 
> Django 1.10.5.
>
> When I do "@admin.register(Province)" in my admin.py file I get the error 
> that is the subject of this post.
>
> Of course there is NO app with label of 'province' as that is the label of 
> a 'Model'.
>
> Why is Django trying to register an app instead of the Model?
>
> Thanks,
>
> Gerald
>
> I am still not able to solve this problem.  I tried deleting Django 1.10.5 
> and installing 1.8.17 & also 1.11a1 all with the same results.  I have 
> studied several tutorials which all same to use the same code "from .models 
> import ModelName, then admin.site.register(ModelName)" When I do that and 
> restart the server and go to 127.0.0.1/admin/ in my browser it gives me the 
> error: "LookupError at /admin/ 
>
> No installed app with label 'visits'." 
>
>  If I comment out  the statement "admin.site.register(ModelName", restart 
the server and then open the browser it brings up the screen to log-in if I 
am currently not logged-in, otherwise it brings up the admin page, of 
course with out the models.

Because of this problem I am NOT able to proceed with my project so any and 
all help will be appreciated.

Thanks  

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/d8c33e9c-040f-4f02-b5da-79fa78ce4f83%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to