Rose
Does anyone want to learn Django with me?
Looking for Django tutorials? you can follow these three recommended ones: * Official documentation and tutorial (https://docs.djangoproject.com/en/dev/intro/tutorial01/) * Tutorial from MDN (https://developer.mozilla.org/en-US/docs/Learn/Server-side/Django) * Tutorial from django-girls (https://tutorial.djangogirls.org/en/)
Maxim
Does anyone want to learn Django with me?
this is neither a job board nor a bulletin board
You
Hello, does anyone know how to make the product purchase section with Django Rest?
AB
How much time need to learn Django
AB
I mean Avg time
Ahmad
How much time need to learn Django
it depends on your previous experience and the learning method you use. typically, it can take anywhere from a few weeks to a few months to learn Django proficiently.
Shan
Provide full context
I have main table with 20 columns and it have 7 column contain foreign keys of table. I used django rest framework to load 1000 records data and it take 15min complete
Davide
Hi all someone can help me to translate a SQL statement in the orm ? I cannot find a way to do it except the raw but I think it's absurd. The statement is this: select gestione_blocco_elenco_blocco.elemento_blocco,agcom_ps_ticket.ticket_id from agcom_ps_ticket,gestione_blocco_elenco_blocco where agcom_ps_ticket.id = gestione_blocco_elenco_blocco.id_sorgente_blocco and gestione_blocco_elenco_blocco.codice_sorgente_blocco = 'APS' and gestione_blocco_elenco_blocco.tipo_elemento_blocco = 'fqdn' The two model are in different APP.
Davide
and between the two models there is no FK
Davide
it's seems that it's impossibile to have a simple queryset between two model without a FK... absurd. The only way is the raw with the sql.... i didn't think how can be limited the orm of django.
Anonymous
Not Found: /service-worker.js while using django channels
Anonymous
how to solve?
Rose
how to solve?
Read this please: http://catb.org/~esr/faqs/smart-questions.html#intro
Sunken
Hi everyone how can I have redirect urls in my swagger documents? I want to test my viewset API but I don't know how to use it.
Rose
User Ram has 1/3 warnings; be careful! Reason: contextless link to offtopic github repo without LICENSE
Arneeth
Hello guys I was able to login in successfully using accounts/login but it is not logging out when using accounts/logout it is saying this page is not working
Afshin👀
Hi guys I have a problem with signout user model in my PC signout is working but on server it is not work I have GET error what is issue? Anyone knows?
Icarus
Hi, What is the next step after programming an API using Django Rest Framework? Should the front-end developer provide me with the front-end and I integrate it into my project? Or should I provide the API documentation to the front-end developer for them to use? Note that I do not want to use regular Django.
Maxim
Hi, What is the next step after programming an API using Django Rest Framework? Should the front-end developer provide me with the front-end and I integrate it into my project? Or should I provide the API documentation to the front-end developer for them to use? Note that I do not want to use regular Django.
neither that's usually agreed upon in advance or agreed at the stage you are at either way, it's either agreed upon or it's regulated by some internal team rules P.S. i haven't actually said a word that wasn't obvious
Nat
Hello everyone, Do you have an idea how can i create a factory using factory boy, for test-only models?
Nat
I've tried but this happened Model class models.ModelUnderTest doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS.
Icarus
neither that's usually agreed upon in advance or agreed at the stage you are at either way, it's either agreed upon or it's regulated by some internal team rules P.S. i haven't actually said a word that wasn't obvious
Well, I'm doing the project with my friend, he's the front end and I'm the back end But I want to understand how to use the api? Just give him the API documentation and he will use it in JS? Isn't this method unsafe? Because everyone has the ability to see the code and how the API works.. I don’t know. Tell me what to look for or what is the best way.
Icarus
API documentation can be protected by auth and it won't be public
yeah, but i mean if the front-end use the api in js code.. i think everyone has the ability to see the code in the browser
Mirco
yeah, but i mean if the front-end use the api in js code.. i think everyone has the ability to see the code in the browser
APIs will require auth, so random people won't have access to them even if taken by network listener / browser tool
A
guys im working on a project to store the username n password with jwt token anyone has reference to study ?
cj
guys im working on a project to store the username n password with jwt token anyone has reference to study ?
you don't store user&password with JWT... you use JWT after you authenticate your user with his password... you never store JWT
Arman
Please recommend Django books to strong junior developer who want to become middle
Afshin👀
Impossible to help without details.
this is my urls.py in myproject/config/urls.py path('activation/logout/', LogoutView.as_view(), name='logout'), and this is in my settings.py LOGOUT_REDIRECT_URL = 'main' it is work on my pc enviroment but it is not work on ubuntu server i use http not https can be for this or not?
Redhat
Which books are best for learning django for beginners
SI
In my urls.py I have defined just a single path .. which looks like this urlpatterns = [ path('admin/', admin.site.urls),] Now when I try to run django server http://127.0.0.1:8000/ it is redirected http:// 127.0.0.1:8000/api/user
SI
Can someone plz share some insight
Trust
Can someone plz share some insight
Maybe you have another project running on the same server If that's the case stop it and rerun your new project
SI
Sure let me try
SI
127.0.0.1:8000 does not work but 127.0.0.1:8000/admin works am i missing something
Trust
127.0.0.1:8000 does not work but 127.0.0.1:8000/admin works am i missing something
Can you share screenshots of your project urls.py not the app but main project
Charly
Can you share screenshots of your project urls.py not the app but main project
Screenshots are not allowed here, Read the rules please
Rose
User OceanMan has 1/3 warnings; be careful! Reason: Offtopic: adsense has nothing to do with django
Elvis /
Who is watching mohammad ordookhani django course?
Charly
Who is watching mohammad ordookhani django course?
is hard to have someone whatching the same random course, better if you just ask your question if it is related to django
Maxim
Who is watching mohammad ordookhani django course?
no polls, no surveys, no roll calls here especially about something in a language other than English i'm not kidding please delete your post
(⌐■-■)
Where can I host my django project?
Mirco
Where can I host my django project?
fly.to, AWS, GCP, PythonAnywhere etc etc
(⌐■-■)
thanks
ali
Hello friends I used Ajax for the pagination of product comments, and when I go to the second page, when I click on the answer, it does not show the part related to writing the answer. But when I refresh the page and click on the answer, it does. You know the problem what?
Vishu...
Render.com
Azizbek
HI. I was creatinf simple Django Blog site. I put LOGIN_REDIRECT_URL = 'home' LOGOUT_REDIRECT_URL = 'home' that for login/logout but now I can only login via admin page, login and logut even signup are now working. Please, i need a guidance.
Jimmies San
Method Not Allowed (GET): /accounts/logout/ Method Not Allowed: /accounts/logout/
did you try to search this in some search engine? because you will find tons of docs about it.
Azizbek
did you try to search this in some search engine? because you will find tons of docs about it.
yeap, i'm working on that 2 days in a row, but didnt find any solution 😐
Qwerty
kha ~
Hello , if I want to deploy Django with MySQL for free, which sites provide this service for free?
John
Hello, can I send a request to Django admin using requests? I want to check that all pages in the admin have a positive response code I am concerned about csrf token
Cmd
Hi Iset every thing about static files.i imported template file in django project but on local host css and js files not applied.can anybody explain about that?
Vamsee
Hi all, https://stackoverflow.com/questions/78162065/how-do-i-save-the-pasword-as-hashed-password-in-postgressql-database I have posted my question on Stackoverflow please take a look if anyone knows anything regarding this problem, please let me know 🙂. Many thanks for considering my request.
sanket 💜
Hi all, https://stackoverflow.com/questions/78162065/how-do-i-save-the-pasword-as-hashed-password-in-postgressql-database I have posted my question on Stackoverflow please take a look if anyone knows anything regarding this problem, please let me know 🙂. Many thanks for considering my request.
For EmployeeSerializer you have to write create method and in that method you have to use set_password method to save hashed password in DB. class CreateUserSerializer(serializers.ModelSerializer): class Meta: model = User fields = ['email', 'password', 'terms_conditions'] def to_representation(self, instance): data = super().to_representation(instance) data.pop('password', None) return data def create(self, validated_data): password = validated_data.pop('password') business_user = User(**validated_data) business_user.set_password(password) business_user.save() return business_user
Don
Please base on this model how can I select every fields groupby date " class Sales(models.Model):     client_Name= models.CharField( max_length=50)     product= models.ForeignKey(Medecine, on_delete=models.CASCADE)     date = models.DateField( auto_now_add=True)     quantity= models.CharField( max_length=50)     Admin= models.ForeignKey(Administrateur, on_delete=models.CASCADE)         "
Pedro
Good evening everyone, I'm taking a look at FIlterRelation and I came across a question. Would it be possible to make it join two tables? I need to join a table that has no direct relationship with mine and ON it. Example: https://gist.github.com/pedrohsbarbosa99/5d12c34f7eb138090adef507ef661a56
T
I have doubt ! Is ckeditor in django for RichTextField is only works in forms.py?☹️
Shawna
hi building user model for different users such as "teacher" , "student" if each user has different fields requirements then how would i do that while keeping authentications the same ?
Anonymous
Seperate model for teacher and student with user as fk
Shawna
Seperate model for teacher and student with user as fk
you suggest keeping User model the same just create for Teacher, Student that takes in user as fk ?
Shawna
thank you very much !!!
Anonymous
Keep an usertype field in user
Shawna
Keep an usertype field in user
got it much appreciated !!