Good morning all and thank you for your time in this, as suggested once again I did delete my migrations and re-run them again, I am still getting the same error message though and that is when I try to add data to my app.
as mentioned before you can find my code on the link below: https://github.com/sangel667/Nearby_Shops_Project Thank you once more very much Stathis On Thursday, July 8, 2021 at 8:01:32 AM UTC+1 sutharl...@gmail.com wrote: > you can try this > https://stackoverflow.com/questions/26283159/django-1-7-migrations-how-do-i-clear-all-migrations-and-start-over-from-scrat#comment41239691_26283159 > if that also doesn't work and you are working on a personal project then > you can try deleting your db, migration files and re running migrations > > On Thu, 8 Jul 2021 at 04:48, Stathis Angelou <staka...@gmail.com> wrote: > >> Good evening all and thank you for your messages, >> >> as suggested i did delete all migrations in my shops project and did do >> them again, >> but i'm getting the same error message, i did use again makemigrations >> and migrate. >> show migrations show everything applied ok. if it makes it easier for you >> i can share my github repository: >> https://github.com/sangel667/Nearby_Shops_Project >> >> Once again thank oyu very much for your time >> >> Stathis >> On Wednesday, July 7, 2021 at 5:07:50 PM UTC+1 jacobgr...@gmail.com >> wrote: >> >>> Oh actually, it looks like the table doesn't exist. I misread the SQL. >>> Something is wrong with your migrations. Are you sure you ran >>> "makemigrations" after creating the shop model? >>> >>> On Wed, Jul 7, 2021, 11:03 AM Jacob Greene <jacobgr...@gmail.com> wrote: >>> >>>> Do you have any other attributes set in the modeladmin? Something is >>>> telling the ORM to do a query on the "shop" field, and that field doesn't >>>> exist in the DB and it's not defined in the model. Possibly a filter field >>>> in the ModelAdmin class? A full back trace might help illuminate where you >>>> have this set. >>>> >>>> On Wed, Jul 7, 2021, 8:13 AM Samin Serge <gloirea...@gmail.com> wrote: >>>> >>>>> in admin.py put this code to see. >>>>> @admin.site.register (shop) >>>>> >>>>> >>>>> Le mer. 7 juil. 2021 à 00:16, Stathis Angelou <staka...@gmail.com> a >>>>> écrit : >>>>> >>>>>> Good evening all, i have created a new app and added a model. Added >>>>>> the app under installed apps, and run python manage.py makemigrations >>>>>> and >>>>>> migrate and everything worked as expected. >>>>>> >>>>>> But i believe there is an issue with the admin.py file >>>>>> >>>>>> from django.contrib import admin >>>>>> >>>>>> # Register your models here. >>>>>> from django.contrib.gis.admin import OSMGeoAdmin >>>>>> from .models import Shop >>>>>> >>>>>> @admin.register(Shop) >>>>>> class ShopAdmin(OSMGeoAdmin): >>>>>> list_display = ('name', 'location') >>>>>> >>>>>> Error message: >>>>>> "ProgrammingError at /admin/shops/shop/relation "shops_shop" does not >>>>>> exist LINE 1: SELECT COUNT(*) AS "__count" FROM "shops_shop" " >>>>>> >>>>>> Any advice or hint would be really appreciated >>>>>> Kind Regards >>>>>> >>>>>> Stathis >>>>>> >>>>>> -- >>>>>> 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/60ca7670-d423-49e1-9d4a-ea978e193dd4n%40googlegroups.com >>>>>> >>>>>> <https://groups.google.com/d/msgid/django-users/60ca7670-d423-49e1-9d4a-ea978e193dd4n%40googlegroups.com?utm_medium=email&utm_source=footer> >>>>>> . >>>>>> >>>>> -- >>>>> 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/CAKRM%3DdFUzUj37o%3DxgqfQZU-Dj9FeH7CTZCUbCpRdkZ-nHAM-oQ%40mail.gmail.com >>>>> >>>>> <https://groups.google.com/d/msgid/django-users/CAKRM%3DdFUzUj37o%3DxgqfQZU-Dj9FeH7CTZCUbCpRdkZ-nHAM-oQ%40mail.gmail.com?utm_medium=email&utm_source=footer> >>>>> . >>>>> >>>> -- >> 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/46a597f2-bfe1-4049-9c15-4d03ed4ac4b7n%40googlegroups.com >> >> <https://groups.google.com/d/msgid/django-users/46a597f2-bfe1-4049-9c15-4d03ed4ac4b7n%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/django-users/baae7818-bbf2-4d9d-90b6-05b5e21c94d1n%40googlegroups.com.