Re: Django Admin does not use `get_FOO_display`

2023-04-05 Thread Opeoluwa Fatunmbi
The reason why your overridden get_status_display method is not being applied in the Django admin is because the admin's display_for_field function uses the flatchoices attribute of the field to retrieve the display value of the field's current value. The flatchoices attribute is a list of two-tup

Custom Unique Registration Number Required

2023-04-05 Thread chen...@gmail.com
Good day all I am new to django and I need assistance where I can make a unique registration number via model with the following format *ch2023ed0213* where *'ch'* stands for abbreviated school name, *'2023'* year of programme, *'ed'* for department and *'0213'* student unique number.. Urls

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

2023-04-05 Thread Jason
ahhh, no not at all. One db per project, yes. Application, no. That's really expanding complexity. If you need that requirement, that's one thing, but its something you really should have an explicit requirement for before designing. As far as the second question, no not at all. Just add lo

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

2023-04-05 Thread 'Martin Heitmann' via Django users
Dear Jason Thanks for all your effort. Yes, I have one db per application. Isn't that a way to keep the databases clean and strictly focused on one purpose? Thought that that would be a good idea. Regarding the router.py: It worked for quite a while, but I am not sure if I made changes to it p

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

2023-04-05 Thread Jason
so, for your original boolean migration, https://code.djangoproject.com/ticket/470 https://stackoverflow.com/questions/32280343/default-value-of-djangos-model-doesnt-appear-in-sql Adding a default value doesn't go to SQL, although there's work in the django ticket above. So its inserted via ap