Re: dotenv - django-environ - etc

2021-12-28 Thread Bernard Mallala
In all cases below, the .env file will exist outside of the Django project and will be referenced from the settings file. This allows you to customize and secure each environment while automating the whole build. *Developers* Local settings will point tot he location of the .env file. This

Re: are migrations the same regardless of database type?

2021-12-28 Thread Bernard Mallala
Migrations are different depending on your DBMS. Why? Briefly, here are a few reasons : 1. RDBMS or DBMS (Database management system) is a software that organizes the data in a database thus allowing for easy management, administration, retrieval and manipulation of data by users or

Re: Eliminating inter-request race conditions

2021-12-28 Thread Nick Farrell
Thanks for the reference Carsten. I believe the approach I am taking, regarding optimistic locking, is superior to what is proposed in that thread. Specifically: - there is no need for a special version field to be added to the model - because forms only update specific fields in the associated

Re: dotenv - django-environ - etc

2021-12-28 Thread Jason
an env file is basically imported into your OS environment, so you can retrieve them with the same interface. That means you can easily include that with your build environment, or inject in some other means. Can't do that with settings. Also, lets you keep one settings file, and use

dotenv - django-environ - etc

2021-12-28 Thread bnmng
Hi everyone, I can't wrap my mind around why having my settings in a .env file is more secure than having them in a local_settings.py file, or why one of the various methods is better than another as long as you keep your local settings out of your version control. Any opinions? -- You

Re: What it takes to bring web application to a mobile app

2021-12-28 Thread Ram
Thank you all for your replies. Best regards, ~Ram On Wed, Oct 20, 2021 at 9:07 AM Lalit Suthar wrote: > you can create apis with django-rest-framework and then can use them at > all the backends for web and mobile. > > On Wed, 20 Oct 2021 at 12:58, Stijn Verholen wrote: > >> :D >> On

Re: are migrations the same regardless of database type?

2021-12-28 Thread Jason
Not exactly. Migrations try to be generalized across db types, but that doesn't mean that you can be using db-specific features in your models and ORM usage. Thats one reason its highly, highly recommended to use the same database and version at all layers of your stack. In other words, if

Re: are migrations the same regardless of database type?

2021-12-28 Thread Lars Liedtke
As far as I know, the migrations are "Python-Code" in themselves, only defining which tables change in what way. Only when they are being applied, this is turned into actual database code. But you can test this easily by creating migrations and look at them. Or use e.g. a postgres docker

are migrations the same regardless of database type?

2021-12-28 Thread Anil Felipe Duggirala
hello, I running an app locally using an SQlite database (I have not been able to set up postgresql locally). I am running the same app in Heroku, using Postgresql. If I run "makemigrations" locally, then push those migrations to Heroku (which is using postgresql), will those migrations be

Re: Eliminating inter-request race conditions

2021-12-28 Thread Carsten Fuchs
Hi Nick, maybe this is a case for optimistic locking? Does the thread at https://groups.google.com/d/msg/django-users/R7wJBTlC8ZM/MIzvYkWyCwAJ help? Best regards, Carsten Am 27.12.21 um 06:36 schrieb Nick Farrell: > Hi all. > > I've been using Django for quite a number of years now, in

Re: CSRF token missing on models with a file/imagefield

2021-12-28 Thread Yorben Verhoest
Hello Thanks for the answer, but like I said, I'm working with DjangoAdmin and not a custom form. So DjangoAdmin already does this. Also when I inspect the source code in DjangoAdmin it does have the "multipart/form-date" in my form tag. Regards On Tuesday, 28 December 2021 at 09:35:42

Re: CSRF token missing on models with a file/imagefield

2021-12-28 Thread Sebastian Jung
Hello, try in your html template- I think this works... Regards Am Di., 28. Dez. 2021 um 08:26 Uhr schrieb Yorben Verhoest < yorben.verho...@gmail.com>: > So, turn out that the problem occurs because for some reason my > request.POST data is empty. > > I found out because I wrote a custom