Furious
Hi, I'm learing Django, I current installed python which version 3.9.6 and Django version 3.2.6 . I write the simple ('hello worde') correct code but show me error, anyone can help me.
IDK
So what is error
IDK
What error it showing
Furious
Actually I learn by telusko channel which is 2 years old then it is problem? Because I'm using new version?
Furious
What error it showing
Import libraries
IDK
Which file views models urls?
Furious
IDK
If you set debug True in settings.py it show in whixh file
IDK
To show hello word did you use httpresponse
IDK
urls and views
In urls did you import views.py to url
IDK
From .views import *
Furious
From .views import *
From . import views
IDK
From .views import *
It means import me all code from file views which located in this directory (.)
IDK
So when you write path
IDK
You dont need to write like views.main
IDK
You can write just main
Furious
Okay
IDK
And did you use httpresponse to show hello world
IDK
Or rendered html file
IDK
Can you write error what show when you try to open
Anonymous
Hi team, I hav an API to download a file, but I'm getting the error AttributeError: 'NoneType' object has no attribute 'get'
Anonymous
Can someone pls help
Margavya
Will my django project work, if I remove all the versions from requirements.txt and only keep the package name?
Alikhanov Jakhongir
if they are the latest ones maybe it is possible!
Margavya
I am getting a lot of errors when I am running this command 'pip3 install -r requirements.txt' to install all the pacakges from requirements.txt
Margavya
How to resolve those errors? Should I remove all the versions from the requirements.txt?
Tanu
How to make slider using form pllz help me
Vinay
Is there anything equivalent to dir(object) in django templating engine?
Vinay
Django docs
I tried searching several places but couldn't find the answer. Any help will be appreciated.
Margavya
What errors?
This is the error: ERROR: Could not find a version that satisfies the requirement pandas==1.0.3 (from versions: 0.1, 0.2b0, 0.2b1, 0.2, 0.3.0b0, 0.3.0b2, 0.3.0, 0.4.0, 0.4.1, 0.4.2, 0.4.3, 0.5.0, 0.6.0, 0.6.1, 0.7.0, 0.7.1, 0.7.2, 0.7.3, 0.8.0rc1, 0.8.0, 0.8.1, 0.9.0, 0.9.1, 0.10.0, 0.10.1, 0.11.0, 0.12.0, 0.13.0, 0.13.1, 0.14.0, 0.14.1, 0.15.0, 0.15.1, 0.15.2, 0.16.0, 0.16.1, 0.16.2, 0.17.0, 0.17.1, 0.18.0, 0.18.1, 0.19.0, 0.19.1, 0.19.2, 0.20.0, 0.20.1, 0.20.2, 0.20.3, 0.21.0, 0.21.1, 0.22.0, 0.23.0, 0.23.1, 0.23.2, 0.23.3, 0.23.4, 0.24.0, 0.24.1, 0.24.2, 0.25.0, 0.25.1, 0.25.2, 0.25.3, 1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.0.5, 1.1.0, 1.1.1, 1.1.2, 1.1.3, 1.1.4, 1.1.5, 1.2.0, 1.2.1, 1.2.2, 1.2.3, 1.2.4, 1.2.5, 1.3.0, 1.3.1)
William
..... Riply me
I only know about the HTML div card slider
Tanu
I only know about the HTML div card slider
Can you image upload in slider using form api
William
I only know about the HTML div card slider
You wanted this slider right?
Tanu
No
Tanu
You wanted this slider right?
Both using slider form api and html div slider
Tanu
Can u upload image in slider using form api
Tanu
According django not html css based slider
Rahkmanuly
Hello there! Can you give me any suggestions regarding db model creating? I want 2 types of user. How would you do that?
Rahkmanuly
I use that schema User -> Employee User -> Employer
Rahkmanuly
One general representation of user and 2 types that depends on it
Mirco
I use that schema User -> Employee User -> Employer
https://www.youtube.com/watch?v=f0hdXr2MOEA
Rahkmanuly
Thanq
Margavya
Also, I wanted to know that can we change the database of a django application from sqllite to MySQL?
William
YES
Margavya
is it a very difficult process? Like changing the complete code or something like that?
William
No. Just provide the mysql credentials and you have to apply migrate command. That's it.
Вин Король Саксов
is it a very difficult process? Like changing the complete code or something like that?
Changing database in django to postgresql, mysql, sqlite3, it is very easy, all you need to do is to change setting.py to your database (see documentation for each database), and run migrations
Margavya
Got it!
Margavya
Thanks a lot!
Margavya
I am referring a Udemy course where the tutor is teaching Ecommerce using SQLite, but I wanted to use MySQL database So, I just need to add the MySQL credentials to settings.py
Margavya
That's it?
Margavya
The code for CRUD operation would be the same for SQLite and MySQL? I am confused here
Shidhant
yess it will be same
Suman
just provide the credentials in seetings.py
Alex
That's it?
https://docs.djangoproject.com/en/3.2/ref/databases/#mysql-notes
Suman
That's it?
follow this its helpful: https://stackoverflow.com/questions/19189813/setting-django-up-to-use-mysql
Suman
What are the pros and cons using Class based views instead of Function based? I haven't used class based yet but have seen many using
Tanu
According django not html css based slider
Make One page update slider and second page add slider how to make this
N
Hello. I have a city field in my model. How can i make it so that only specific users can access records with their cities (in django admin), which are set by the admin?
Alikhanov Jakhongir
Is It possible to listen to Rest API Endpoint using django channels? Goal is to send the serilized data of the created Object of POST Method! Request will come from Android/IOS app built with Flutter/Dart
N3CRO
Where should i host my django website on?
Mirco
Where should i host my django website on?
wherever u prefer, a VPS, a PaaS etc etc
Anonymous
N3CRO
the easiest one is heroku
That i had done with one if my project