Doragonsureiyā
Yeah. I can see clearly –Django. I'm not here for Python
Looking for Django tutorials? you can follow these three recommended ones: * Official documentation and tutorial * Tutorial from MDN * Tutorial from django-girls
Toheeb Àdúràmọ́mi
I'm looking towards back-end development
حمید رضا عدالت نژاد
Hi guys, I'm kinda new. I'm trying to test my API's (DRF), but my test keeps failing and I don't understand why. here is the test: https://pastefy.app/gz3G5hum the request returns a 401 response but I can't understand what I'm doing wrong. can someone help?
in api's request returns what ever you want, you defined that it send you a 404 , you need to check your code. only the get_object_or_404 method return something if it don't find what ever you requested for , and in other cases you define the 404 code base on the situation, you could use print if you are not sure if it is in what endpoint
حمید رضا عدالت نژاد
Many thanks @dora
although those documents are great. but I feel you better to start your way by learning video tutorials and do some easy projects and then in the related subject go to the Django documents and learn it deeper. In the mean time you need to be good at OOP , especially in Inheritance , there are lots of Django "magics" that are done via the advanced techniques of object orienting programming and classes are the important tool in Django. I don't see these kinds of techniques in node js , but django uses them a lot.
FORTUNATE
I'm find in difficult to start django startproject on my new system(First time running on the system) Python installed Vscode installed Python, django and other extensions installed Pip install django done successfully If I run django-admin startproject myproj I'm getting error saying "Django-admin is not recognized as the name of a cmdlet" What could be the issue?
FORTUNATE
Have you enabled the virtual environment?
Actually I don't work with virtual environment
FORTUNATE
Its option, I think
pranav
Its option, I think
Make it a need them , and try again in the virtual environment
mohammad
hi
mohammad
for send image with postman, i'm use form_data?
FORTUNATE
Make it a need them , and try again in the virtual environment
Py -m venv myenv Error: no such option: -m
حمید رضا عدالت نژاد
Have you enabled the virtual environment?
you need to install Django in a virtual environment and activate it so your commands work, never install Django and its packages globally this is a bad practice, keep your projects and its dependencies completely isolated from the system files. if you use IDE's like Pycharm professional, you have the option to start a Django project with its app name installed and configured your run configuration so you can run the project on a specific port with some especial settings with play button, and you have a special window for Django apps. also your app files and project will differ in the color and it is much easier to work with the same name files in different apps. the most important thing is that pycharm will detect django template files cause their extension is not like ejs , hbs , or pug different and they are like normal html files but they are not and you need to install a django extension in the vscode and to change the setting the html file by hand every time you work with these files to have the benefits in regard to template language. but you don't have these trouble in pycharm cause the IDE already detect it and handle it
Rajesh
Hello everyone I'm familer with Django by using html css and bootstrap as a front. After developed some projects like Ecommerce and gym websites. I got to know that we can make really cool animations in react so I need a proper tutorial to connect react and django.
FORTUNATE
Python -m venv myvenv
I'm using windows not mac/OS Tho, it work but not activated Only created
Isaac
Hello
Isaac
What does form.as_p mean
Isaac
And why am I getting an error
Ping
What does form.as_p mean
we use it to show forms as html without coding just by giving them the model and form
Isaac
Yeah I have done that
inactive
What does form.as_p mean
{{ form.as_p }} – Render Django Form as paragraph (<p> html tag)
Isaac
But I am getting an error
Ping
Isaac
I can't
حمید رضا عدالت نژاد
I can't
does form.as_p prints unwanted fields in your screen ? if that is the case , you need to exclude them or use whatever field that is in form like form.username , form.password form object sometimes have some fields and in html there are some check boxes and other settings that you don't want to be shown
Doragonsureiyā
I can't
Rule 5️⃣: To share code or error tracebacks, use an online pasting service like: - https://dpaste.org - https://hastebin.com - https://bin.kv2.dev If you posted a wall of text, go back and delete it.
Maxim
Isaac
Oh ok
Bujji
Bujji: At the moment user registration is sending  email notification to reviewer Replicate the emailsend trigger from the user registration in the comment create in commentlogview set Please help this task
Charly
Bujji: At the moment user registration is sending  email notification to reviewer Replicate the emailsend trigger from the user registration in the comment create in commentlogview set Please help this task
Only you can do it. We can't see what's the thing you need to replicate. And that seems a lot like an assignment you should do yourself
🄰🅈🄳🄰.🅃 | 🛆 : ̓̇̌̈́͑̽͌̀̎͐͊̂̉̓̇͐͊̂͛̏̔̓͋͛̆̈̀̇̐̽͂̏͋̓̂̅͐̔͌͆͒̉̌̈́̉̀̋̀̀
Hello I wanna use multiple languages in my backend services Django for authentication and products... And Actix for real time communication such chat and real time data How can I do this Please any one can help me?
Charly
Hello I wanna use multiple languages in my backend services Django for authentication and products... And Actix for real time communication such chat and real time data How can I do this Please any one can help me?
From the Django side is just making sure your templates use the right urls for the chat and so on. For anything else you better ask at offtopic group because it has nothing to do with Django
aditya
As a beginner to intermediate Django developer, could you suggest essential Django topics I should master to reach an advanced level?
Doragonsureiyā
As a beginner to intermediate Django developer, could you suggest essential Django topics I should master to reach an advanced level?
Looking for Django tutorials? you can follow these three recommended ones: * Official documentation and tutorial * Tutorial from MDN * Tutorial from django-girls
Siva
How to link connect bg img using css
Siva
Anyone explain mee.... I have given bg-img: url("% static 'img/bg.png' %")
Даниил
Hi everyone! Please, tell me someone what should I know before I start learning to work with DJango?
Даниил
Sorry May be some other stuff? Or is it enough?
Douglas
Hi everyone am using Django Allauth as my signup ND login with other features now I want over ride the login function to check if a boolen field is true before login in how can I do that
Ali
Hi How can I get the data from crm and send it to Flutter? Is it reasonable to give it to the serializer first and then send it?
Doragonsureiyā
🚫 ‎Binary [1868147043] is already banned.
KAKASHI
Sorry May be some other stuff? Or is it enough?
It's enough And you don't need to know all the python
Douglas
Maxim
Hi All! I have "django.contrib.sessions" in INSTALLED_APPS, "django.contrib.messages.middleware.MessageMiddleware" in MIDDLEWARE SESSION_ENGINE = 'django.contrib.sessions.backends.signed_cookies' in settings.py But I getting None in self.request.session.session_key in class based view What am I doing wrong? settings.py: https://dpaste.org/ieueU
Maxim
Do you use Django REST?
nope, pure Django
ZAHER.KRYEM
nope, pure Django
Can you share the settings file
Maxim
Can you share the settings file
added the link to the main message
Maxim
Do you use Django REST?
is it even possible to use sessions without authentication?
Maxim
What's the point of that?
adding shopping cart functionality without login or any other functionality that requires the ability to distinguish one visitor from another without authorization
ZAHER.KRYEM
adding shopping cart functionality without login or any other functionality that requires the ability to distinguish one visitor from another without authorization
I don't think this works because the session is tied to the user id. You can distinguish between users by IP address, but this is not secure.
Maxim
Thank you both!
ZAHER.KRYEM
you are welcome
Muhammed
Hi all, I am trying to change my database name from “Class Meta: db_table = 'master"."language' ” to 'master"."languages'. However, I encountered an error with the '.' character.
Muhammed
“ Class Meta: db_table = ‘master”.”language ‘ ”
Christian
Hello everyone, i'm sorry upset on what i'm doing on Django, i want to login and i reaceved de Bad request 400, whereas i Can créate a user simply. I don't know what i Can do
Muhammed
why did you add quotation marks around the dot?
With out quotation it saves to public schema with.
harvest
What could be the problem when creating an HTML link and adding the icon code, an empty square appears?
Doragonsureiyā
What could be the problem when creating an HTML link and adding the icon code, an empty square appears?
Impossible to help without details. Read this please: http://www.catb.org/~esr/faqs/smart-questions.html
harvest
thx bro
.....
Hello everyone how to solve this https://dpaste.org/dS7rg
.....
please open link and read options
.....
after I changed some models, it asking options
.....
If you are lazy to read my error or option. " ) PS D:\PycharmProjects\PARK\PARK_API> py manage.py makemigrations ​ D:\PycharmProjects\PARK\.venv\lib\site-packages\django\core\management\commands\makemigrations.py:160: RuntimeWarning: Got an error checking a consistent migration history performe d for database connection 'default': connection failed: database "PARK API" does not exist ​ warnings.warn( ​ It is impossible to add a non-nullable field 'video' to catproduct without specifying a default. This is because the database needs something to populate existing rows. ​ Please select a fix: ​ 1) Provide a one-off default now (will be set on all existing rows with a null value for this column) ​ 2) Quit and manually define a default value in models.py. ​ Select an option: "