location based web app with django and geodjango

75 views
Skip to first unread message

Stathis Angelou

unread,
Jun 14, 2021, 8:16:46 PM6/14/21
to Django users
good evening all,

I have started building a webapp using python, django and linux, but i'm afraid the app does not appear under admin tab in 127.0.0.1:8000/admin
I am sure I am missing something, attached is my code

Thank you in advance
Stathis

admin.py
models.py
apps.py
settings.py

Nikeet NA

unread,
Jun 14, 2021, 8:27:03 PM6/14/21
to Django users
Replace admin.site.register(Report) with this @admin.register(Report)

Stathis Angelou

unread,
Jun 15, 2021, 4:20:29 AM6/15/21
to django...@googlegroups.com
Good morning Nikeet and thank you for your response, i am afraid i am
still not getting the web app yet on my admin page

Kind Regards

Stathis

Στις Τρί, 15 Ιουν 2021 στις 1:27 π.μ., ο/η Nikeet NA
<nik...@exiverlabs.co.in> έγραψε:
> --
> 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 view this discussion on the web visit https://groups.google.com/d/msgid/django-users/15cbe9a7-fb69-4498-a726-1b6613c6536an%40googlegroups.com.
admin.PNG
Message has been deleted

Aritra Ray

unread,
Jun 15, 2021, 4:52:45 AM6/15/21
to django...@googlegroups.com
Hello, 
Register your app in setting.py-> INSTALLED_APPS like 'appname.apps.appnameConfig' from your apps.py. Alternatively, you can write 'app_name' instead of the whole sentence.

Regards,
Aritra.

--
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.

Nikeet NA

unread,
Jun 15, 2021, 5:05:16 AM6/15/21
to Django users
Your app is not registered in settings file as stated by Aritra.

Stathis Angelou

unread,
Jun 15, 2021, 7:01:19 AM6/15/21
to Django users

Good morning Both and thank you very much for your help,

Yes that worked!!?
Thank you again,
off for the next step!!

Kind Regards

Stathis
model.JPG

Stathis Angelou

unread,
Jun 20, 2021, 6:49:43 PM6/20/21
to Django users
Good evening all,
following my application development, I have reached to the stage where I am about to add some data using data migrations.
I did download some data from OSM (saved as json), added a load data function but when i run the migrate command I get a keyerror in my migration files:   

File "/home/qgislinuxadmin/nearbyshops/shops/migrations/0002_auto_20210618_2102.py", line 18, in load_data
    for obj in objects['elements']:
KeyError: 'elements'

which would mean that the key in not in a dictionary.
Any help or advice would be appreciated

Kind  Regards

Stathis 
0002_auto20210618_2102.txt
Reply all
Reply to author
Forward
0 new messages