Macara
hi family, I'm looking for someone who has already created an online chat application with django
py
I'm developing a website using Django where students can send requests to tutors. The request form will contain basic information such as address, full name, and more. Tutors will then have the ability to accept or reject these requests. To implement this feature correctly, What things I have to know any clue ?
Any input is welcome
Maxim
Charly
Anonymous
hi guys, how can i send css file link from home.html to base.html using jinja?
Anonymous
Rose
User S has 1/3 warnings; be careful!
Reason:
totally offtopic
𝑴𝑼𝑯𝑨𝑴𝑴𝑬𝑻𝑨𝑳𝑰
The models code in the admin should be extracted from the template folder in the admin
Rose
User 😎 has 1/3 warnings; be careful!
Reason:
crossposting
Tb10
HI, django tests usually create a one time use database, is ther a way to combine this with testcafe?
Anton
guys really need help in understanding best way pass complicated data to templates
https://stackoverflow.com/questions/78230383/django-correct-way-to-get-and-pass-complicated-data-to-template
Nushh
Hi everyone, I have been using Django framework for my OCR project, but my localhost is stuck at: "Watching for file changes with StatReloader
Performing system checks..." without displaying any error. I would be so grateful if anybody helps me out.
Anonymous
Nushh
Anonymous
Nushh
yes
I mean, the server is stuck.
Anonymous
Nushh
Yws
Anonymous
Nushh
I have already installed all the dependencies
Nushh
ultralytics
Tensorflow
silence_tensorflow
numpy
scikit-image
autocorrect
protobuff
Anonymous
you can use the some bunch of print statements in your code co that you easily find the point where the bug is
Nushh
Anonymous
What bunch of statements?
i mean let say you wrote this code and you want to debug it
import pytesseract
from django.http import JsonResponse
def extract_text_from_image(request):
if request.method == 'POST' and request.FILES.get('image'):
# for example add print statemet here
print("getting the image request")
image = request.FILES['image']
# Print("Extract the the text")
extracted_text = pytesseract.image_to_string(image.read())
return JsonResponse({'extracted_text': extracted_text})
else:
return JsonResponse({'error': 'Please upload an image.'})
This will help you you to find the point the bug is
Nushh
Rose
User ! has 1/3 warnings; be careful!
Reason:
request for pirated book (rule #8)
Nushh
Anonymous
ok no problem
Anonymous
please check
let me just create a django app and check the potential error, give me some moments
Nushh
Anonymous
yes
Nushh
If you could tell me potential errors ?
Anonymous
Nushh
Anonymous
Rose
User Bright C Web has 1/3 warnings; be careful!
Reason:
crossposting
Sharafudheen
Ihave installed django but the default admin panel is in disorder what cn i do?
Anonymous
Charly
Naresh
ßinary403
greetings.. please i have an issue when i try to use tuncateworlds_html ... for example on my html page
i have {{ members.bio }} which renders the content from database.. but when i use {{ members.bio | truncatewords_html :50 }} it throws and error.. please i need help
Charly
ßinary403
Which error?
"only one argument is provided for truncatewords_html"
Charly
ßinary403
Sharafudheen
Charly
How to check
Check any errors loading these files on your browser
Nani
in model cretaed an signup from then after register the model,view,py post the data in databse using template file signup.html but signup form not open any any body pls respond
Charly
Nani
If request.method=="post"
Nani
Not got inside the if condion
Nani
I ready added
Luiz H.
hello .
how to solve this ,
->> python manage.py makemigrations
myproj-py/env/lib/python3.11/site-packages/django/core/management/commands/makemigrations.py:160: RuntimeWarning: Got an error checking a consistent migration history performed for database connection 'default': (2002, "Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)")
I'm accessing my mysql from localhost normally using another vscode and another projects . but I cant access from this new project that i donwloaded from creative-tim.com , the 'Soft UI Dashboard Django' template
DB_ENGINE = os.getenv('DB_ENGINE' , None)
DB_USERNAME = os.getenv('DB_USERNAME' , None)
DB_PASS = os.getenv('DB_PASS' , None)
DB_HOST = os.getenv('DB_HOST' , None)
DB_PORT = os.getenv('DB_PORT' , None)
DB_NAME = os.getenv('DB_NAME' , None)
this is the settings.py
if DB_ENGINE and DB_NAME and DB_USERNAME:
DATABASES = {
'default': {
'ENGINE' : 'django.db.backends.' + DB_ENGINE,
'NAME' : DB_NAME,
'USER' : DB_USERNAME,
'PASSWORD': DB_PASS,
'HOST' : DB_HOST,
'PORT' : DB_PORT,
},
}
else:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': 'db.sqlite3',
}
}
This is my .env
# True for development, False for production
DEBUG=True
SECRET_KEY=(mysecret)
DB_ENGINE=mysql
DB_HOST=localhost
DB_NAME=myDb
DB_USERNAME=root
DB_PASS=(mypassword is ok)
DB_PORT=3306
Luiz H.
and my mysql is up
f13f43ede2ab mysql "docker-entrypoint.s…" 8 days ago Up 3 hours (healthy) 0.0.0.0:3306->3306/tcp, :::3306->3306/tcp, 33060/tcp
Charly
hello .
how to solve this ,
->> python manage.py makemigrations
myproj-py/env/lib/python3.11/site-packages/django/core/management/commands/makemigrations.py:160: RuntimeWarning: Got an error checking a consistent migration history performed for database connection 'default': (2002, "Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)")
I'm accessing my mysql from localhost normally using another vscode and another projects . but I cant access from this new project that i donwloaded from creative-tim.com , the 'Soft UI Dashboard Django' template
DB_ENGINE = os.getenv('DB_ENGINE' , None)
DB_USERNAME = os.getenv('DB_USERNAME' , None)
DB_PASS = os.getenv('DB_PASS' , None)
DB_HOST = os.getenv('DB_HOST' , None)
DB_PORT = os.getenv('DB_PORT' , None)
DB_NAME = os.getenv('DB_NAME' , None)
this is the settings.py
if DB_ENGINE and DB_NAME and DB_USERNAME:
DATABASES = {
'default': {
'ENGINE' : 'django.db.backends.' + DB_ENGINE,
'NAME' : DB_NAME,
'USER' : DB_USERNAME,
'PASSWORD': DB_PASS,
'HOST' : DB_HOST,
'PORT' : DB_PORT,
},
}
else:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': 'db.sqlite3',
}
}
This is my .env
# True for development, False for production
DEBUG=True
SECRET_KEY=(mysecret)
DB_ENGINE=mysql
DB_HOST=localhost
DB_NAME=myDb
DB_USERNAME=root
DB_PASS=(mypassword is ok)
DB_PORT=3306
How are you loading the .env file?
Luiz H.
solved, I changed the 'localhost' to 127.0.0.1 and it worked (weird)
Luiz H.
Charly
Charly
Rasoul
that's very unlikely
Well I've encountered this issue many times before, specially on linux distros, sometimes you just gotta add the address binding manually.
But you might also be right as well.
Charly
Charly
Husen
Hi all, how can i do google login in django admin panel?
Charly
Charly
Or django-authlib