Behnam
do you have any video recommendation for dockerize django with postgres ? short and complete
Muflone
guys how can i set value for one field from models.py in views.py ?, not from admin page
Yourmodel.objects.get(your id).value = "whatever" Consult the official tutorial
Rose
User Behnam has 1/3 warnings; be careful! Reason: speak English only
Abolfazl
Yourmodel.objects.get(your id).value = "whatever" Consult the official tutorial
what do you mean of 'your id' that means the name of field or else?
Mobin
How can I add the dashboard section to Django and get good and acceptable output? Please help me
Mobin
html file mode dashboard
Muflone
what do you mean of 'your id' that means the name of field or else?
You should start from the beginning. Each row has an identifier Each row has many fields
Anonymous
help me !!!!!
Like how u want change the appearance of Django admin or validating it?
Mobin
Like how u want change the appearance of Django admin or validating it?
I want to change the appearance of the Django admin in my project
Seth van Dalstein
Mobin
I am also interested in this question
I am involved in a project that I have to deliver to the client in the last few days, and only that part of the work is left to be finished, no matter how hard I try, it doesn't work and no matter how much I search on Google, I can't find any results.
Anonymous
I want to change the appearance of the Django admin in my project
Use Django jet or Django suite lib or u can Collectstatic of Django admin and customize as required
Seth van Dalstein
I am involved in a project that I have to deliver to the client in the last few days, and only that part of the work is left to be finished, no matter how hard I try, it doesn't work and no matter how much I search on Google, I can't find any results.
I found this site of changing admin, but I haven't tested this, cause I don't have access to the laptop at the moment, but found many good reviews https://online_sgop_admin.jetadmin.io/projects
Mohammad Reza
what do you mean of 'your id' that means the name of field or else?
When u write the command "makemigrations" Then u have to see in migration directory , You'll see id for each obj you have in db Django ORM puts it in your db by default
Nick
Good evening, how to make when you scrolling page navbar always be at the top and visible?(not just staying at the top)
Rose
Good evening, how to make when you scrolling page navbar always be at the top and visible?(not just staying at the top)
Your question is not related to Django. If it's a Python related question go to @Python group, otherwise please move to @PythonOfftopic group and ask there.
Rose
User Isaac has 1/3 warnings; be careful! Reason: crossposting
Isaac
Hi everyone! Please I need help with my Django project deploy on render .com I’m serving my static files with Whitenoise. I have configured it with all the available resources I found online “Serving Django static files on render” but unfortunately when I turn debug to false and deploy, the deployment works alright with no error log but when I viste the site it shows “Server Error (500)” but when I turn debug to true the static files is been server alright. And also when I remove whitenoise configuration with debug to false it also shows the website alright. Please I really need help, I sat the whole day debugging it but still doesn’t work, thanks
Vincent
Guys, I have a strange problem in my project Maybe someone have some ideas what can I do A lot of my serializers just stopped working after big update to my project. In DRF-spectacular they just... showing that they're expecting to take a "string" response not a dict anymore. Problem appeared 3-7 days ago~ Some routes working normally as before, but others are broken I'm not sure where problem is hiding: 1) not very good requirements.txt and broken versions of some packages 2) problem with my code, but... I tried to checkout to my previous commits - same problem => probably first 3) ???
Rose
User Maicon has 2/3 warnings; be careful! Reason: totally offtopic and crosspost
Poya
hi when In the Django venv project (virtual environment) , I install the mysqlclient package with the help of this command: pip install mysqlclient This will return an error and installation failed : ERROR: Command errored out with exit status 1: /home/ubuntu/django_project/basics_social_media/env/bin/python3 /tmp/tmpt922w3js get_requires_for_build_wheel /tmp/tmpli94kmlh Check the logs for full command output
Poya
does your system have python3-dev and tools installed.
ok install on ubuntu server or venv ?
Alex
if that doesn't resolve the issue, try installing binaries of that package.
Poya
server
But this package was installed inside the server
Alex
But this package was installed inside the server
go through the error message usually your system is missing some package required for building the target package.
Maxim
But this package was installed inside the server
and build-essential (something Alex named tools) ?
Dima
try: pip install setuptools check and then: pip install wheel
Poya
try: pip install setuptools check and then: pip install wheel
this work i did and will return this eroor : error: subprocess-exited-with-error × Getting requirements to build wheel did not run successfully. note: This error originates from a subprocess, and is likely not a problem with pip.
Vincent
I'm not sure, but try to use Django 4.2.9, not 5.0 and more
Not working anyway, tried to. My requirements: ### Required dependencies ### django~=4.2.0 psycopg[binary]~=3.1.8 djangorestframework~=3.14 drf-spectacular~=0.26 django-environ~=0.9.0 requests~=2.28.2 # Filtering django-filter~=22.1 # Cors headers django-cors-headers~=3.14.0 # auth system djangorestframework-simplejwt==5.2.2 django-rest-passwordreset~=1.3.0 # django-debug-toolbar django-debug-toolbar~=4.1.0 # linters black~=23.3.0 flake8~=6.0.0 isort~=5.12.0 # utility for tree dependencies pipdeptree~=2.7 # other rest_condition~=1.0.3 drf-standardized-errors~=0.12.5 python-magic==0.4.15 natsort~=8.3.1
Rose
User ali has 1/3 warnings; be careful! Reason: offtopic
Jibril
how to solve this python3 manage.py runserver Watching for file changes with StatReloader Performing system checks... System check identified no issues (0 silenced).
Jibril
What's the issue?
when i was changed ENGINE to mysql and after i enter python manage.py runserver instead of clickable link the above is displayed and DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': os.getenv('DATABASE_NAME'), 'USER': os.getenv('DATABASE_USER'), 'PASSWORD': os.getenv('DATABASE_PASSWORD'), 'HOST': os.getenv('DATABASE_HOST'), } } but it work when enginee is sqlite
легущька
Hello, is there any way( maybe a library) to dynamically change the inlines? That is, let's say, when clicking on the add button there was a choice of which model to add.
Jibril
After u change the engine , you have to migrate
it display this python manage.py makemigrations Segmentation fault (core dumped)
Husen
Hello everybody. Can you connect many choices to another model?
Rose
Reported ꪗ𝓲ꪑꪖꪑ [5752137292] to admins.​​​​​​​​​​​​​​
Rose
Another one bites the dust...! Banned ꪗ𝓲ꪑꪖꪑ. Reason: spam
Afshin👀
hello everyone i have a error in my django when i used recaptcha in logo i got this URLError at /accounts/login/ <urlopen error [Errno -2] Name or service not known> can you help me please
Afshin👀
my recaptcha settings is ok because i used another screen but in logo i have problem
Rose
Rule 5️⃣: To share code or error tracebacks, use an online pasting service like: - https://dpaste.org - https://hastebin.com - https://nekobin.com - https://bin.kv2.dev If you posted a wall of text, go back and delete it.
Afshin👀
Read this please: http://catb.org/~esr/faqs/smart-questions.html#intro
i am trying for 3 month and i find many think but i steel have error i am new i used AI and google search in three month
Afshin👀
Alex
use some code pasting service, hard to go through the code this way.
Alex
use some code pasting service, hard to go through the code this way.
Also, have you loaded the required static files for capatcha.
Alex
Another option is markdown syntax
as far as i am aware group rule prohibit that.
Afshin👀
RECAPTCHA_DOMAIN = 'http://www.#####.net'
Rose
Rule 5️⃣: To share code or error tracebacks, use an online pasting service like: - https://dpaste.org - https://hastebin.com - https://nekobin.com - https://bin.kv2.dev If you posted a wall of text, go back and delete it.
Afshin👀
RECAPTCHA_DEFAULT_ACTION = 'login'
Afshin👀
RECAPTCHA_PUBLIC_KEY = '######' RECAPTCHA_PRIVATE_KEY = '#####'
Afshin👀
i change the actuly data with ####
Afshin👀
class RecaptchaAuthenticationForm(AuthenticationForm): captcha = ReCaptchaField(public_key=settings.RECAPTCHA_PUBLIC_KEY) class Meta: fields = ('username', 'password', 'captcha',) def init(self, *args, **kwargs): super().init(*args, **kwargs) self.fields['username'].widget.attrs.update({'placeholder': 'Username'}) self.fields['password'].widget.attrs.update({'placeholder': 'Password'}) self.fields['username'].label = '' self.fields['password'].label = '' self.fields['captcha'].label = ''
Rose
User Afshin👀 has 1/3 warnings; be careful! Reason: rule #5 violation
Afshin👀
@Afshinelec
how can i markdown syntax i do not know
Mehrdad
If you all send your code like below, it gets formatted in telegram: def hello_world(): Print("Hello World!") hello_world()
Mehrdad
If you all send your code like below, it gets formatted in telegram: def hello_world(): Print("Hello World!") hello_world()
4 back ticks ` Immediately programming language name like python Next line your bunch of codes And the last line, 3 back ticks