Anonymous
Okay. Let me Try. Thanks
Anonymous
Well create an endpoint in django
Any quick reference ? link ?
Anonymous
Do you have experience with Django?
Anonymous
Not Much
Anonymous
been two months working
Anonymous
django.core.exceptions.ImproperlyConfigured: Requested setting INSTALLED_APPS, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.
Anonymous
what is this error???
Anonymous
i cant migrate my app
Anonymous
i am using psql
꧁ࣩࣩࣩࣩࣩࣩࣩࣩࣩࣩࣩࣩࣩࣩࣩࣩࣩࣩࣩࣩࣩࣩࣩࣩࣧࣧࣧࣧࣧࣧࣧࣧࣧࣧࣧࣧࣧࣧࣧࣧࣧࣧࣧࣧ)➣ {{ peace of code
Anonymous
I think u don't add the app name in settings
no...i had already run this project....but after editing model this will happen
Adonis
Welcome alain
Anonymous
Thanks Adonis
Rajjix
did you change your project name or something
Rajjix
?
Rajjix
it can't find ur settings file, or as a start it can't find the installed apps in your settings,
Rajjix
/manage.py os.environ.setdefault('DJANGO_SETTINGS_MODULE', '<project_name>.settings')
Anonymous
did you change your project name or something
No... Only add a new field in model
Rajjix
What a naughty field you added
Sergei
Good day / night everybody
Sergei
I need advice I am developing an e-shop. I need to make it possible to add products to favorite and to cart, also to change the amount without sending requests to my database .
Anonymous
Well then it won't be synced
Anonymous
What good would that do?
Sergei
When a user press button " make order ", only then send request
Sergei
Like https://m.zara.com/
Sergei
Study Django signals and especially m2m_change signal
I thought , I would need something of JS
Mirco
I thought , I would need something of JS
If u need to change amount on adding prod, study Django signals Here
Anonymous
Still it may send a request to database
Rajjix
maybe make a separate cart session? 🤔that will start whenever an item is added to that cart and temporarily store changes until submitted ?
Anonymous
Again still use database IO
Anonymous
There is no simple way to about database IO
Anonymous
It's just if you want to avoid doing it explicitly
Mirco
If he makes m2m between prods and carts, it's easier to use m2m_change signal imho
Rajjix
well that would be how i work out such task, i don’t know why he doesn’t want the database stuff
Naresh
how can we learn django orm and where we we can execute those queries i mean which ide
Mirco
how can we learn django orm and where we we can execute those queries i mean which ide
You can learn it on Django docs You can run them on Django shell
Mirco
thank you
Yw 😀
Manish
hi
Manish
have anyone used django-admin-tools
Manish
or please tell me how to add custom links on django admin panel next to view site a tag.
George
Verbose namem
Rajjix
you want to name ur model fields in the admin panel?
Manish
a href tag with external link
Manish
https://screenshots.firefox.com/IDjQV8q5mm6dqQQ4/localhost
Rajjix
well u can always inherit the admin templates and edit them
Rajjix
i’ll see if i can find a link for that
Rajjix
https://medium.com/crowdbotics/how-to-add-a-navigation-menu-in-django-admin-770b872a9531
Rajjix
this should give you an idea about how to do it
Rajjix
basically u need to learn how to play around with the admin templates, for content and the admin static file you get when you do the collect static command for styling, u can inherit those templates just do some googling about editing admin templates in django you'll find may responses
Manish
okay
Daniel
hi people!
Anonymous
Hey
Daniel
I am new in Django ... I add two field in my model, y then I type python manage.py makemigrations but I got: No changes detected. My questions is: How I do to detect changes in the models ?? ..
Rajjix
1- add the app to the apps list in settings 2- python manage.py makemigrations <app_name>
Rajjix
👍🍌
Sergei
well that would be how i work out such task, i don’t know why he doesn’t want the database stuff
https://m.zara.com/ Check this site When you add a product to cart it doesn't send a request ( or mark as favorite) I want to understand what is happening behind the scenes
Rajjix
When i was checking zara the pages don’t refresh when you switch uris, my assumption would be a js framework on the frontend that handles states i guess this is probably something u can’t do with python
Rajjix
some redux maybe flux, idk just my opinion and i’m not very deep on how far frontend frameworks can go
Sergei
With dev tools I found, it uses something of Ajax
I guessed somebody might have implemented something like Zara
Rajjix
Sadly most advanced stuff u need to figure out on your own, because such topics don’t withdraw viewers so why bother writing about them, in the developer’s point of view
Sergei
Ok
Sergei
I am afraid that If I implement functions that alter db every time something occurs , my site would become more vulnerable
Rajjix
you’ll get there, and you’ll find what you need, keep trying 🤓
Sergei
Thanx , man
Anonymous
Cron tab in windows