Anonymous
it will make the path absolute.
So basically, absolute means exactly https://localhost:8000/
Anonymous
Isn't it
Morteza
So basically, absolute means exactly https://localhost:8000/
basically, it means any path that this page is, ignore it and return me to this full path but relative paths are relative to the existing page path, i will be front of the existing path.
Morteza
basically, it means any path that this page is, ignore it and return me to this full path but relative paths are relative to the existing page path, i will be front of the existing path.
for example if you are in domain.com/any-url/ page and you are using absolute path in this page like: /news/ if the user clicks, the browser will return him to domain.com/news/ but in relative paths for example news/ the browser will return him to domain.com/any-url/news/
Anonymous
:D I think there is
On rare occasions, a few might be found
Mohan
How to create a table in the database when pressing add table button on the web page in django
Anonymous
How to create a table in the database when pressing add table button on the web page in django
Forms -> Url -> Views -> Inside views you write the logic where you create a database using Models
Anonymous
Forms -> Url -> Views -> Inside views you write the logic where you create a database using Models
Add Table button should be your Form. As far as I know, I probably would do this way
Chikal
is cloudlinux in problem ? because my hosting provider tell me that cloudlinux has a problem so my python3 in hosting cant run well and it's sure affecting my django app.. :(
Charly
is cloudlinux in problem ? because my hosting provider tell me that cloudlinux has a problem so my python3 in hosting cant run well and it's sure affecting my django app.. :(
It shouldn't, but we don't know to what problem is referring your provider, but if they say that without a solution then change providers
Raj
Can someone tell me vs code to view source code of inbuilt class in django like PasswordResetDoneView
Eng.
I am a software engineer, when I learned Django I found a great opportunity to manage software components into "apps". Do you have articles that explain what is the best way to distribute app? Thank you
Shazeb
can someone help, my website went down
Shazeb
and i can't understand what is going on
Егор
can someone help, my website went down
Please describe what happened in details before.
Shazeb
it was working fine and then i'm getting 500 err
Maxim
it was working fine and then i'm getting 500 err
it's not enough for someone to help
Егор
Set DEBUG to True and show us what exactly happened. Otherwise, we can’t help you.
Shazeb
What to provide please tell me, i'll provide here
Егор
Man please read the rules before texting in groups like this.
Maxim
What to provide please tell me, i'll provide here
check first of all that you have not run out of disk space
Егор
check first of all that you have not run out of disk space
OutOfMemory on the server can be possible, too.
Shazeb
Reverse for 'recipe-details' with keyword arguments '{'slug': ''}' not found. 1 pattern(s) tried: ['recipes/(?P<slug>[^/]+)/\\Z']
Егор
So find the code it refers to and send it to us via pastebin.com or something.
Shazeb
Fixed it
Shazeb
Thanks guys
Shazeb
It was empty slug error
Anonymous
how to create Modelform ?
Ruzan
how to create Modelform ?
myform(forms.modelform)
Prathmesh
How to create login in django without using django authentication system??
cruelwarrior
How to create login in django without using django authentication system??
Build your own Authentication Backend and define there what is legitimate and what is not. https://docs.djangoproject.com/en/4.0/topics/auth/customizing/
Prathmesh
Means just using model data and not using authentication and authorization
Prathmesh
Not like user
Prathmesh
But I have made user. Not I want to made worker login
Morteza
But I have made user. Not I want to made worker login
Custom User system? without using Abstract models?
Prathmesh
Yes
Morteza
Yes
this is not a good way
Prathmesh
But I'm not getting it on youtube
Prathmesh
this is not a good way
Yes but we can't create 2 users
cruelwarrior
So in your view you can check for username and password from request and see if it matches user in database via model. This is not a good way to authenticate, but sure you can do it if eager to do so.
cruelwarrior
Yes but we can't create 2 users
you don't need to create users, authentication backends do the check usually
Morteza
Yes but we can't create 2 users
Just use groups or add boolean fields as your needs if djangos default boolean fields are not enough.
Prathmesh
So I have to create it in accounts right??
Prathmesh
??
Prathmesh
Btw thanks @imortezaw and cruelwarrior
cruelwarrior
use username = request.data.get('username', '') to get username, same for password
cruelwarrior
then read user object from User.objects.get(username=username)
cruelwarrior
verify password is same and then return success if success failure if failure
Morteza
So I have to create it in accounts right??
i cant understand whats you mean but you don't need 2 Users management system it's not a good approach at all, just use groups and boolean fields to seperate the users.
Anonymous
Mates, is Django For Everybody by Dr.Chuck = a good course?
Sardor_B_Mamirov
raise AppRegistryNotReady("Models aren't loaded yet.") django.core.exceptions.AppRegistryNotReady: Models aren't loaded yet
Sardor_B_Mamirov
anrays
Hello guys Why when change DEBUG for false dont working my static file Can help for me , thanks,?
Anonymous
Static files not loading while deploying django website on digital ocean It works perfectly when hosted locally.
Charly
Static files not loading while deploying django website on digital ocean It works perfectly when hosted locally.
You need to serve the static files with your web server (apache, nginx or whatever are you using)
Doragonsureiyā
Looking for Django tutorials? you can follow these three recommended ones: * Official documentation and tutorial * Tutorial from MDN * Tutorial from django-girls
basir davaji
Which database is suitable for working with Django?