--
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+unsubscribe@googlegroups.com.
To post to this group, send email to django...@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/5e94b0d3-c6cd-4b24-b323-544d10e97923%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hi Gerald,Have you added your new app in 'INSTALLED_APPS' in `settings.py`? No, because "province" is the name of a MODEL, not an app.
Can you tell more about context of ther error, e.g. this error occurs on `python manage.py runserver` or when you access a page on django admin?
Also, it would be much easier to find the issue if you can share the traceback of error.
On Tue, Feb 7, 2017 at 6:19 PM, Gerald Brown <gerb...@gmail.com> 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
--
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...@googlegroups.com.
To post to this group, send email to django...@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/5e94b0d3-c6cd-4b24-b323-544d10e97923%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
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'."
On 09/02/17 14:01, Gerald Brown wrote:
> Because of this problem I am NOT able to proceed with my project so any
> and all help will be appreciated.
Maybe somebody could help you if you provide more information about what
you are doing.
Following information could give some starting points for investigating
the problem:
* What does you INSTALLED_APPS look like?
* The code of your ModelAdmin wogether with where you trying to register
it. (including imports)
* Are your models working correctly? Did creating migrations and
applying them work? YES
--
regards,
Florian
class Meta
to a model is completely optional."