Godwin
Hello, can somebody help me, how do I increment + 1 on button click in django without using ajax?....i'm a beginner in django.
Jay
Hello, can somebody help me, how do I increment + 1 on button click in django without using ajax?....i'm a beginner in django.
You could use Javascript fetch, either it can be done by form submit which will refresh the page
Jay
I was looking for some recommendations for smooth release, I have set up 2 environments, I split settings files and have different DBs for all the envs which are working just fine, I am using Zappa(AWS lambda) for deploys, I was wondering is there an elegant way of migrating data(not models but data inside models) than preparing PostgreSQL DB rollouts, Could not find much on the internet, so asking here, Thanks!
Gordrick
Hi, anyone knows how to deploy a django project..pls tell me..
I work mostly as a Cloud/Devops Engineer and I cannot stress this enough Learn Docker guys It will totally change the game for you in terms of deployments and stuff
Pravin
Some resources for Api's in Django??
Doragonsureiyā
Some resources for Api's in Django??
Are you looking for Django REST Framework documentation? Here you have it: https://www.django-rest-framework.org/
Gordrick
I work mostly as a Cloud/Devops Engineer and I cannot stress this enough Learn Docker guys It will totally change the game for you in terms of deployments and stuff
Also anyone who would like to discuss this Running Django in Docker Deploying to Google Cloud services like cloud run or app engine Continues delivery You can always reach out😃
Ankit
I want to customize UserAdmin Class using list_display I want to show address in the Users Table but I am getting error
Doragonsureiyā
I want to customize UserAdmin Class using list_display I want to show address in the Users Table but I am getting error
Please provide a full explanation including all the details that you consider relevant. Your statement is too broad and there is no clear way to answer you, you have to explain: - what you're doing - what you're expecting - what you're using - where you're running the script - what Python version you're using - what packages and their versions you're using - and the most important thing: show the code YOU wrote (read rule 5️⃣ for that) and more details, that way your chances to get help will increase
Anonymous
Noted, sorry
Maxim
I want to use list_display to display the field in the tablename User like name,username,password but I am getting error
this is not a detailed explanation, it is still the same explanation, which does not even say what the error is
Ankit
Okay so the error is <class 'user.admin.AdjUserAdmin'>: (admin.E108) The valur of 'list_display[3]' refers to 'address', which is not a callable, an attribute of 'AdjUserAdmin', or an attribute or method on 'auth.User'
Maxim
Okay so the error is <class 'user.admin.AdjUserAdmin'>: (admin.E108) The valur of 'list_display[3]' refers to 'address', which is not a callable, an attribute of 'AdjUserAdmin', or an attribute or method on 'auth.User'
re-read carefully https://t.me/django/175250 no one will fish out of you one by one the answers to all the questions, the answers to which will be needed only you are interested in help, so be so kind as to make it possible for you to be helped with less effort P.S. and the worst thing you can do in this situation is to answer questions as if you were doing a favor
Maxim
I foresee the following line starting with "ok, here is my code where the error is occurring"
Abhijeet
I have embedded tinymce editor to my admin section, but i can't upload images from local folder. Anyone can help
Doragonsureiyā
I have embedded tinymce editor to my admin section, but i can't upload images from local folder. Anyone can help
Please provide a full explanation including all the details that you consider relevant. Your statement is too broad and there is no clear way to answer you, you have to explain: - what you're doing - what you're expecting - what you're using - where you're running the script - what Python version you're using - what packages and their versions you're using - and the most important thing: show the code YOU wrote (read rule 5️⃣ for that) and more details, that way your chances to get help will increase
Anonymous
Anyone can tell how to configure https in ec2 with nginx
Tanu
Can you please ban this id
Athar
How can I implement email password as well as phone otp authentication in django rest framework Both in same project
Tanu
I'd name(.)
Tanu
In your django group
Tanu
Plzz sir
Maxim
Can you please ban this id
about what to do if someone bothers you, read the rules
Tanu
it asked me for the job
Maxim
Tanu
49 doller pr hour
Rajesh
Hi can anyone help me in django custom user authentication?
Doragonsureiyā
Hi can anyone help me in django custom user authentication?
Read this please: http://catb.org/~esr/faqs/smart-questions.html#intro
Rajesh
If anyone knows about plz dm me
Doragonsureiyā
If anyone knows about plz dm me
Can i send you a private message? No. We do not provide one-on-one tutoring, hire someone if you need it. Questions are better answered in public so that everyone can learn.
Tanu
49 doller pr hour
And asking for my nudes pic 😭
Tanu
I leave this grp
Athar
Who is doing this
XTM
Hi, I have elastic search working with my django app. Can someone tell me how to make the admin search bar work with it?
XTM
How does elastic work with your Django project?
Db is indexed there and I can access it via elasticsearch queries It's a huge database. I recently implemented ES so I can search fast. But I need to search from admin panel where I have some actions and the display of the DB data is clear.
игорь/igor
Use it in admin the same way you use it elsewhere. You need to override get_search_results in model in admin.py. Although read docs
Saikat
{% load static %} <link rel="stylesheet" type="text/css" href="{% static 'style.css' %}" media="all" /> css is not loading. why? please help
Saikat
in page source it is showing <link rel="stylesheet" type="text/css" href="/static/style.css" media="all" />
XTM
Use it in admin the same way you use it elsewhere. You need to override get_search_results in model in admin.py. Although read docs
cool, I already tried with some implementation I saw in the web but it was not working I'll further read the get_search_results docs to see what's going on Thanks
Anonymous
Saikat
0hh, i am sorry
Eugene
Why is my form not valid ? i just wanted to call field from my form and change it every time i push button. if request.method == 'POST' and 'cancel' in list(request.POST.items())[1]: form = CreateStoryForm(request.POST, request.FILES, instance=story) print(form.dict) form.dict['is_active'] = False print(form.is_valid()) if form.is_valid(): form.save() messages.success(request, 'good') return redirect('home') else: pass
игорь/igor
but it makes no sense,because form is not valid,so it won't work. It will return False
How should we guess why your form is not valid? Give some code of form and model if it is model form
Ajit
Hello Developers..!!
Ajit
I have a doubt. I am new to Django, and Getting started now. I am running a django app via Command prompt with Python manage.py runserver But, this is showing error in the Browser saying This Site can't be Reached Err_Connection_refused. How to solve this??
Ajit
Are you getting any error from the terminal?
Noo no.. Terminal is running fine, but when terminal shows Port no.to go for the output, i.e ip address where the actual output will be shows(in my case Chrome), showing no result..
Maxim
did you tried 127.0.0.1:8000 ?
Ajit
did you tried 127.0.0.1:8000 ?
Sorry, I am at this address only
Maxim
127.0.0.1:8000
are you running Django on your computer?
VISHNU
I am using generic foreign key for user relation. So in admin panel I need to make like if I select the content type I need to show the email related to that content type how it can be done.
Ankit
Hello everyone I get stuck in my project where I am using User Model which is inbuilt and UserAdmin which is also a inbuilt class, Now I want to customize my Model fields like I don't want to show First_name which is default field of UserAdmin Class and instead of that I want to show the field name like city. But it is not working I am getting an error
Ankit
the error is <class 'user.admin.AdjUserAdmin'>: (admin.E108) The valur of 'list_display[3]' refers to 'address', which is not a callable, an attribute of 'AdjUserAdmin', or an attribute or method on 'auth.User'
Mo
Hi, although a filed is defined as floatfield in model but after assigning value its type is class str. why it is like that? thanks
Jay
Hello everyone I get stuck in my project where I am using User Model which is inbuilt and UserAdmin which is also a inbuilt class, Now I want to customize my Model fields like I don't want to show First_name which is default field of UserAdmin Class and instead of that I want to show the field name like city. But it is not working I am getting an error
You have to extend the model field to use custom values from django.contrib.auth.models import AbstractUser class CustomUser(AbstractUser): city = models.CharField(max_length=31, blank=True) and in your settings.py AUTH_USER_MODEL = "<your module name>.CustomUser"
Anonymous
Hi, although a filed is defined as floatfield in model but after assigning value its type is class str. why it is like that? thanks
A floatfield is represented as an instance of python float. There's something wrong with your code if you have a str
Ankit
Which jay has told me
Anonymous
Which jay has told me
Your are trying to customize your model in the admin interface. Your provided an option in list_display which was not defined in your model. That's the error you are getting.
Ankit
Yes
Ankit
But I am so confused
Ankit
To remove that bug
rtg
Hi! Django lovers! Question: I have a Installation(models.Model) and ImageInstallation(models.Model) When i create new Installation, y need to create a folder for images (folder with installation id name). Example static/installation/1/ How can i do that? 🤔 Thanks!