Re: Migration running in shell, but no change in DB

2023-04-06 Thread 'Martin Heitmann' via Django users
So, I put this at the start of my router.py: import logging logger = logging.getLogger(__name__) I have never used that, but I hope it is right. Then below at the app's router and the allow_migrate def I did this: def allow_migrate(self, db, app_label, model_name=None, **hints): if

Re: Migration running in shell, but no change in DB

2023-04-06 Thread 'Martin Heitmann' via Django users
Yes I will do that. In the meantime I tried this and that and saw that the migrations do not lead to new tables in the database, but the entries appear in the default db's django_migrations table and not in the one of this app. On Thursday, April 6, 2023 at 6:13:01 PM UTC+2 Jason wrote: > you

Re: Migration running in shell, but no change in DB

2023-04-06 Thread Jason
you said you have a router.py file in your project? put it in there. On Thursday, April 6, 2023 at 10:50:15 AM UTC-4 Martin Heitmann wrote: > Dear Jason > > db per project/app: Okay, I will keep that in mind for the future. I just > thought that it would be a cleaner way when each db and app

Re: Migration running in shell, but no change in DB

2023-04-06 Thread 'Martin Heitmann' via Django users
Dear Jason db per project/app: Okay, I will keep that in mind for the future. I just thought that it would be a cleaner way when each db and app would serve a single purpose logging: I am sorry, but I have to ask again, where do I put that what you wrote ( logger.info("db does not match db

Re: Custom Unique Registration Number Required

2023-04-06 Thread Amine Khetim
Hi, You can add a validator to your field with a custom alogithm to verify that the format is correct : Validators | Django documentation | Django (djangoproject.com) Don't hesitate if you need more information Le jeudi 6 avril 2023 à