clouded
That's using AJAX. Then you can do it without (much of) it as well. And you can serve all the necessary data to be used by JavaScript in the first response and completely omit a second request to the backend.
clouded
I really don't want to explain all the details, but I strongly recommend to try to understand them, which requires you to think about how servers and clients communicate using HTTP, browser and with and without JavaScript (AJAX is a good term to google).
clouded
Personally, I don't think it's a good way to give people "the way" to do something and they just try to follow it without understanding why and which other options there are. That does not help much in the long run. But yet, I gave you something you can follow with the strong recommendation to try to understand the options.
∴
Hello everyone. what is the most used and known lib for authentication in django?
∴
do you recommend use the native lib called "authetication"?
begzod
do you recommend use the native lib called "authetication"?
Djoser как по мне лучший и удобный
Dj - 505
Hi everyone, When i start to deploy my project to Render, after settings of postgresql database and do migrate, give me this error ! line 126, in parse     raise ValueError( ValueError: No support for ''. We support: cockroach, mssql, mssqlms, mysql, mysql-connector, mysql2, mysqlgis, oracle, oraclegis, pgsql, postgis, postgres, postgresql, redshift, spatialite, sqlite, timescale, timescalegis My files: # settings.py   file : #------------------ import os from dotenv import load_dotenv load_dotenv() import dj_database_url DATABASES = {     'default': dj_database_url.parse(os.getenv('DATABASE_URL')) } # .env   file : # ------ DATABASE_URL = postgres://blogger_db_0000_user:aOBm5pIJEWzj6YczxXrhpbQwuM5bArYQ@dpg-cmslkamcn0vc73bjkh40-a.oregon-postgres.render.com/blogger_db_ca0j
Anonymous
{% if user.is_authenticated %} {% extends 'account/ac_base.html' %} <h1>authenticated</h1> {% block title %}Password Reset{% endblock %} {% block ac_content %} {% endblock %} {% else %} {% extends 'base/base.html' %} {% block title %} Password Rese{% endblock %} {% block content %} {% endblock %} {% endif %} Invalid block tag on line 8: 'endif'. Did you forget to register or load this tag? how to solve this?
Мark
And as I remember tag extends must be the very first on the page, but maybe not
01110010
I had similar use case like this but, I used include instead of extends . I wrote some HTML snippets and included it base on the user
Vijay
Hi friends, Can you tell me any methods in django for compressing the json file when we upload that file in the cloud to avoid the 413 size limit error.
Vijay
just configure your webserver
Instead of this suggest any methods
Maxim
Instead of this suggest any methods
an elephant can't go through the eye of a pin
Maxim
No one can help you until you explain your difficulties.
Maxim
no
Maxim
yes read the rules
Maxim
If you need help, don't just say "not working", explain in detail what's not working the way you expect it to
Rose
User عباس خان has 1/3 warnings; be careful! Reason: flooding to draw attention
Hituuuuu
Only endblock remove content
ali
And chand method name to uppercase
Rose
User 𝚞𝚙𝚐𝚛𝚊𝚍𝚎 has 1/3 warnings; be careful! Reason: rule #1: speak English
Maxim
wrong person
Prabhat
Why username are case sensitive in authentication??
Charly
Why username are case sensitive in authentication??
because it was designed that way, probably
01110010
Make sure that block content is defined in the base.html
Dj - 505
Print what's returned from dj_database.url.parse The engine seems not being set
The problem come from os.getenv( ) ! because if i use it the parse print give me error result ! empty database ! But when i put url directly in settings.py , the print result is ok and give all database information .. So how i get database information from .env file using envirment variable ??
Dj - 505
I don't know render Are you sure it uses the env files?
Yes in myproject/settings.py i must use environment varialbe to safe my personal information. That not work with me !
Mohammed
hello
Mohammed
0 I have a Django web application, I want to install it for a client who doesn't want to use the internet so I have to install it locally on his pc, My question: what should I do to protect my source code. See that I have to put all my source code on his pc to be able to install the application, is there a possibility to encrypt the source code or to convert the django project into exe? thank you !
Mohammed
anyone can help me?
Dj - 505
anyone can help me?
I think you can put password for the project folder that contain all your source codes, python files.
AZ
0 I have a Django web application, I want to install it for a client who doesn't want to use the internet so I have to install it locally on his pc, My question: what should I do to protect my source code. See that I have to put all my source code on his pc to be able to install the application, is there a possibility to encrypt the source code or to convert the django project into exe? thank you !
there's a few consideration: well for starters you can consider hosting on a separate cheap PC like raspberry pi, or maybe host on a password-protected VM. if non of those is viable, you can consider code obfuscation (still reversible, still provide some hindrance), can consider compiled python (or even changing sensitive parts of your code to compiled languages like C instead).
Poya
Hello, I hope everyone is doing well I just started to learn Django and I ran into problems at the very beginning and I don't understand where my code has problems. I sent my code to one of my friends, he executed it and got the correct output The only difference was the version of Python and Django. For me, Python version 3.11.4 and Django 5.0.1 were installed, while for my friend, Python version 3.10 and Django 5.0.0 were installed. I converted the code based on the new version of Python and Django But my bug was not fixed and it still exists Thank you for helping me
Poya
https://github.com/PoyaNoredini/python_project01.git
iam
https://github.com/PoyaNoredini/python_project01.git
can you share the bug/error you are getting?
Maxim
sure
just share, don't send useless messages
Tejas
Hi, can anyone help me with the authentication system in Django? I'm looking for resources that demonstrate how to implement authentication.
san
Django has builtin authentication system from django.contrib.auth import authenticate,login,logout import this lib
Tejas
I'm aware of that, but I'd like to know if there are alternative methods for implementing authentication.
Prabhat
I'm aware of that, but I'd like to know if there are alternative methods for implementing authentication.
Django provide some in-built decorator like @login_required You can also check it.
Tejas
Okay 👍
ali
I'm aware of that, but I'd like to know if there are alternative methods for implementing authentication.
If you are looking for an alternative way, you can use the django all-auth package or djoser package for JWT authentication in API. Also, you can use OAuth2 for authentication using social networks.
John
I am seeking to implement a dependent dropdown feature for the fields ‘State’ and ‘District’ in my application. Could you provide guidance on how to achieve this, preferably through the use of APIs? I am open to any suggestions or best practices you might have.
clouded
The one who enforces the rules.
Rose
User Ammu has 1/3 warnings; be careful! Reason: this is neither a job board nor a bulletin board
PAYAM
Hello, I ran into a problem, if you can help me, I created the local host, when in the command prompt, the python manage command. I enter py runserver, there is no problem, but when I enter this command in PyCharm or vs code, I encounter the following error Files\Python312\python.exe: Cannot open file 'C:\\Users\\USER 1\\Desktop\\DJANGO\\manage.py': [Errno 2] No such file or directory
iam
so cd to blog or any project folder u have and run the cmd there.
iam
and it's not a django related issue, it's a skill issue.
iam
and it's not a django related issue, it's a skill issue.
instead of taking this you could have taken the solution and replied with saying worked.
PAYAM
you're right
Rose
User Ал has 1/3 warnings; be careful! Reason: speak English only
Ал
Hi all Need help learning Django. Stuck on one topic. 1) how to quickly transfer tables from different database files to the models.py file, where migrations are created. 2) how to display these tables on the site beautifully, without writing an attribute each time in the for loop in order to display the table by the number of columns? I roughly understand if you work with one database and display data on the page. How to scale this business?
PAYAM
in the sense your project folder is blog// but you are running it in desktop// folder
Well, my project folder is on the desktop and does this cause a problem?
vivek
Hello Everyone
vivek
How to deploy django project in window iis server
vivek
Please guide me
Tanzid
facing this error for corsheader SystemCheckError: System check identified some issues: ERRORS: ?: (corsheaders.E013) Origin '*' in CORS_ALLOWED_ORIGINS is missing scheme or netloc HINT: Add a scheme (e.g. https://) or netloc (e.g. example.com). can anyone help me please..?
Tanzid
can I use dj-rest-auth with cors header?
Tanzid
Yes
can we talk in private, image share is off here..
Rose
can we talk in private, image share is off here..
To share code or error tracebacks, use a pasting service, like: - https://dpaste.org - https://hastebin.com - https://nekobin.com - https://bin.kv2.dev
Tanzid
Yes
my error: https://dpaste.org/YzD1X
Tanzid
Yes
full settings.py https://dpaste.org/gFvYt
Tanzid
can you help me to solve this..?
Mirco
can you help me to solve this..?
CORS_ALLOWED_ORIGINS = ['*'] You cannot and also you have duplicated