Y
Hello. Please, I want to know how update django project that is deploy on pythonanywhere?
Y
I modified project locally and pushed it on github, so I want update it on pythonanywhere. Somebody can help me please?
Ravi
Hi, How to CREATE DJANGO USER, BASED ON EXISTING MODEL OBJECT-DJANGO
Dhanush
Even after did cd ,when i execute the command python manage.py runserver It shows me no file or directory exists
Dhanush
Can anyone suggest me to reslove it
Doragonsureiyā
Hi, How to CREATE DJANGO USER, BASED ON EXISTING MODEL OBJECT-DJANGO
These single steps will help you a lot: Step 1️⃣: Open a browser Step 2️⃣: Write down https://google.com or https://duck.com and press Enter Step 3️⃣: In the search box, write down the same words you asked here Step 4️⃣: Read the first results
Dhanush
You’re in the wrong path
Don't know what to do
Даниил
Don't know what to do
You should launch command manage.py runserver from the folder where is file manage.py
virat kohli
What is multi tenant architecture? How it used in django ?
virat kohli
Doragonsureiyā
What is multi tenant architecture? How it used in django ?
These single steps will help you a lot: Step 1️⃣: Open a browser Step 2️⃣: Write down https://google.com or https://duck.com and press Enter Step 3️⃣: In the search box, write down the same words you asked here Step 4️⃣: Read the first results
GOJO
Anyone help me to set up static url
Doragonsureiyā
Anyone help me to set up static url
Don't ask meta questions like: "Any user of $x here?" "Anyone used technology $y?" "Hello, I need help on $z!" Just ask directly! The better you are at explaining the problem, the more likely you are to get help. Asking smart questions
Md
Anyone help me to set up static url
Settings.py STATICFILES_DIRS = [ BASE_DIR / "static", ] Main urls.py urlpatterns = [ # ... the rest of your URLconf goes here ... ] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
Aleksandr
Redirecting to HTTP_REFERER is like refreshing the page. That’s why it stays there after logging in
Solved the problem by adding the line <input type="hidden" name="next" value="{{ next }}"> to the template. Link to manual: https://developer.mozilla.org/en-US/docs/Learn/Server-side/Django/Authentication#login_template
Issa N'golo
Hi everyone. I carefully followed the digitalocean tutorial to deploy a django project. The site is well deployed but the static files do not load. I am sending you the nginx configuration please so you can see what is wrong.
Issa N'golo
server { listen 80; server_name my_ip_adress; location = /favicon.ico { access_log off; log_not_found off; } location /static/ { autoindex on; alias /home/incdev/mupeppbo/static/; } location / { include proxy_params; proxy_pass http://unix:/run/gunicorn.sock; } }
Issa N'golo
STATIC_URL = '/static/' STATIC_ROOT = BASE_DIR / 'static/'
Issa N'golo
it's been several times that I repeat the procedure but always problems with my static files
MUNAWAR
When we make migrations django creates some tables like user ,auth etc How can we create user other than inbuilt user and how to authenticate that user after registration
764456
When we make migrations django creates some tables like user ,auth etc How can we create user other than inbuilt user and how to authenticate that user after registration
You can create your own custom user model and then implement your own custom authentication backend. Check out https://www.agiliq.com/blog/2019/11/django-custom-authentication-backend/ and https://docs.djangoproject.com/en/4.1/topics/auth/customizing/
Issa N'golo
I solved my problem with this comment. "Everything works fine unless I get 404 error with static resources. The solution is to edit /etc/nginx/nginx.conf and change the user from www-data to myusername. Is this normal because this article doesn’t mention that? "
Jal ⬡
Hello, how are you? I leave the following link to see if someone can help me http://linkode.org/#JJK7Le7E2Qa16zcsiJTPr4 , the issue is that it gives me the error django.db.utils.OperationalError: no such table: users_user and indeed not Create the USERS table in my database, I already deleted the database, I created it again, I deleted the migrations mask that is created when doing the migrations, could someone please help me
The Inspired
since that is your actual app
Aji
Hi all.. I'm stuck in a problem, can someone help me. I've an html form with input fields generated dynamically using a FOR loop. How can I fetch the data to backend
Aji
The same as normal forms?
Yes, can I dm you I'm unable to post the pictures here
Charly
Yes, can I dm you I'm unable to post the pictures here
No, and pictures are not useful share the code as text using a paste service
Doragonsureiyā
Yes, can I dm you I'm unable to post the pictures here
Rule 5️⃣: Never post walls of text or screen photos. Use paste bins like https://linkode.org, https://nekobin.com (or your favorite one)
Charly
No lol, i did it myself
What? I'm asking you to share the code
Rajat
What is session in Django
.
What is session in Django
https://t.me/django/232116
Hamid
hello drf does have any deafult option to seprate serializer class for request and response in veiwsets??
Shrey
How do we assign roles to cutom user model and access the same pages differently !? I have read about PermissionMixin, has_per() and decorator methods....... What should be the approach
Shrey
like mod or admin?
Yaa something like that... Like for example there's an html form, if a user visits the URL only if he is an admin, he should be able to see that
lina
When i do login system i can't redirect the page to specific location
Aleksandr
Mr Moha
django for beginners book best book for beginners
×__×
Just put this?
Type your specific location between ' '
Mr Moha
When i do login system i can't redirect the page to specific location
in the settings.py put LOGIN_REDIRECT_URL = '/'
lina
Ok
lina
And if i will make sign up?
Mr Moha
And if i will make sign up?
success_url = reverse_lazy("login")
Mr Moha
in models.py
lina
Yes
lina
Thank you
lina
In form auth
lina
How do I add an error message?
Mohammad
lina
No
lina
I make sign up and I use django auth
lina
I need put error in form
Vaibhav
I need put error in form
Is it an admin form?
Vaibhav
I need put error in form
You can try validation and clean method if you are using native forms
Mr Moha
I make sign up and I use django auth
are U using classbased views or fbv ? , if u CBV you dont need to add error bcz it has the native html form error
Riad
Can anyone explain me what is the purpose of explicit trailing slash with route names? what will happen if I don't include it explicitly? path("ict", views.ict, name="blog-ict") versus path("ict/", views.ict, name="blog-ict")
Vaibhav
404
And which url do you hit in both cases
Riad
Django can't find any pattern
Isa
I have two models Post and Tag. Is it exist rule where I should put models.ManyToManyField link? in Post or in Tag?