Re: How to compare two image field properly

2022-02-27 Thread Azzam Codes
one way that i know, not sure if best way to do it, but you could first extract the fields of your model as: `modelAFields = ModelA._meta.fields` `modelBFields = ModelB._meta.fields` then extract your image field eg.: `imageAField = modelAFields[0]` `imageBField = modelBFields[0]` then to disp

Re: How to make a field within a class which propose all the Ids of instances from that class

2022-02-27 Thread Sebastián Bevc Costa
A choice to the Scene model can be done with a foreign key to self: `models.ForeignKey("self", ...)`. I'm not sure what this part means though: "Several choices can lead to the same scene instance." On Sunday, February 20, 2022 at 11:34:35 AM UTC-3 stefo...@gmail.com wrote: > Hello everybody, >

New contributor

2022-02-27 Thread steven samy
Hey, I am a beginner on this project, can you suggest to me some beginner friendly issues to contribute to -- 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 dja

Re: How to create dynamic models in django??

2022-02-27 Thread Heman Okumbo
Refer here.https://docs.djangoproject.com/en/4.0/topics/db/models/ On Sun, Feb 27, 2022, 06:42 Prashanth Patelc wrote: > How to create dynamic models in django rest framework? > Is there any chance to create dynamic models with APIs > > Any examples please send me thanks in advance.. > > 1) Requ

Re: How to create dynamic models in django??

2022-02-27 Thread Steve Smith
My two cents. I've been trying to do a very similar thing...I've accomplished it in Djangousing FormsetsIt was painfulthe documentation on Formsets is scarce in my opinion and to get them to work is a lot of trial and error, not to mention complexity with corresponding Javascript.

The SECRET_KEY setting must not be empty - os.environ.get('SECRET_KEY')

2022-02-27 Thread Valdinia - Office
On W10 I defined an environment variable: SECRET_KEY In shell I can read the key: *>>> import os* *>>> os.environ.get('SECRET_KEY')* 'mysecretkey...' But when I'm doing the same thing in *settings.py* I get: \lib\site-packages\django\conf\__init__.py", line 90, in __getattr__ raise *Impro

Re: How to create dynamic models in django??

2022-02-27 Thread Shaheed Haque
Check out the api mentioned here https://stackoverflow.com/questions/34768732/temporary-models-in-django#48042468 On Sun, 27 Feb 2022, 03:42 Prashanth Patelc, wrote: > How to create dynamic models in django rest framework? > Is there any chance to create dynamic models with APIs > > Any examples

Re: An error with my code

2022-02-27 Thread Dushime Mudahera Richard
hey According to your issue you can verify first if the application is registered in in settings.py then also the import you may have forgotten to import some modules in yr urls.py the better way is share your codes here so that you can get a better help while looking at your codes you can use ht

Re: The SECRET_KEY setting must not be empty - os.environ.get('SECRET_KEY')

2022-02-27 Thread Madhusudhan Reddy
Secret key will be in settings.py file and you have to import that and use… On Mon, 28 Feb 2022 at 1:48 AM, Valdinia - Office wrote: > On W10 I defined an environment variable: SECRET_KEY > In shell I can read the key: > > *>>> import os* > *>>> os.environ.get('SECRET_KEY')* > 'mysecretkey...' >