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
begzod
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
М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
Anonymous
Мark
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.
Maxim
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
01110010
Make sure that block content is defined in the base.html
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
I am still need help for the same error !
Muflone
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
Print what's returned from dj_database.url.parse
The engine seems not being set
Muflone
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
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
Poya
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
Tejas
Okay 👍
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.
Mohammed
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
iam
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.
PAYAM
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
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..?
Mirco
Tanzid
can I use dj-rest-auth with cors header?
Mirco
Tanzid
Yes
can we talk in private, image share is off here..
Tanzid
Yes
my error: https://dpaste.org/YzD1X
Tanzid
Yes
full settings.py https://dpaste.org/gFvYt
Mirco
Tanzid
can you help me to solve this..?