|-|●$€!|/|
All you need is
A model class
View(ModelViewSet)
Serializers
And routers
Anonymous
can you pls explain why i get key error here?
class ProfileUpdateView(UpdateView):
model = CustomUser
template_name = 'accounts/pf_update_form.html'
fields = ['first_name', 'last_name']
slug_field = 'username'
slug_url_kwarg = 'username'
def get_success_url(self):
return reverse(
'accounts/<slug:username>/edit/',args=(self.kwargs[self.request.user.username],)
)
Anonymous
KeyError at /accounts/profile/testuser/edit/
'testuser'
Chayeb
Anonymous
Chayeb
Chayeb
done ,same result
Try without args= just put self.kwargs['username']
After ,
Chayeb
Because you are using base class updateview
Anonymous
?
LB (Ben)
Question. Can I have a template that uses the same name for both a block AND a variable. For example.
<header>{% block title %}{{ title }}{% endblock %}</header>
This way the shared template can both be extended AND used as an Include. Providing two ways to inject some title content. I've tested and it works (including block.super) but are there any gotchas I should be aware of.
Note: Reason for this oddity is backwards compat in an open source project & trying to avoid adding a middle/adaptor template.
Chayeb
Anonymous
yeah yeah got it, i thought you meant error is because of update view
Chayeb
The Inspired
LB (Ben)
Seyed Alireza
i get error --> redirected you too many times. how can i solve this error ?
Seyed Alireza
Charly
V
If anyone have django restapi framework pdf
.
Hi I'm unable to install pyobject in virtualenv.
anyone please help. 🙏
Doragonsureiyā
Shubham
Has anyone tried using search_fields for stacked inline objects in admin page ?
Doragonsureiyā
Sanjarbek
Hello, i have a problem with gunicorn in my ubuntu server.
When i upload new image in the site, site do not read this image, and if i restart gunicorn then image is shown in the site.
What is problem with my nginx gunicorn?
Please help me!
Charly
Charly
you need to make nginx serve it directly
Sanjarbek
Charly
How can i do
What you have found on google regarding that?
Charly
Hello everyone
I want to customize my gunicorn logging with django. but when I set Debug to False
Gunicorn not log my requests
any one can help how to log my requests with django and gunicorn?
Aryas
Hi there
I was trying to install my requirements.txt in my Django project and I got a problem which cannot find the version of "djago-cores-headers" when I use "djang-compose up". Could you help me with that, please? this is my requirements.txt file:
django==4.1.7
djangorestframework==3.14.0
mysqlclient==2.1.1
django-mysql==4.8.0
django-cores-headers==3.13.0
pika==1.1.0
Nitin
How to install django package offline
Nitin
Can anyone suggest me
Charly
Charly
Omar
Aryas
Anonymous
Hi
Anonymous
I need one help
Anonymous
Django is my first exp
Anonymous
I need one help
Nobody can help you if you don't say what your problem is
Anonymous
Iam learning in python full stock developent
Anonymous
Thanks
Anonymous
How to install pycharm
Anonymous
Djngo
VIGNA
Could anyone please suggest me where to learn django channels
I wanna create a chat app with react and django.
Please help me
Lightbourne
Maksat
Hello everyone, I can't understand how to create a cart in e-shop
Dhananjoy
Kareem
Is there a website that explains how to deploy Django web application on server..
Like what I should change in code
Dhananjoy
adilet
Shamnad
Shamnad
Hosted an app this week on digital ocean. It was easy🙌
Ad
I am more used to Django REST framework than plain Django. Is there any resource I can turn to, to understand how the templates under django.contrib.admin.templates map to a rendered page of the Admin area? I am trying to figure out which template I need to override to implement UI elements.
Maxim
Ad
https://google.com/
I challenge you to come up with any text string that would get a first page of results addressing my question :D
Maxim
Maxim
Ad
Dude, if you don't know, just don't reply please. There are other knowledgeable folks around.
Maxim
Doragonsureiyā
Lui
why crispy didn't work?
Lui
crispy-forms gives error when trying to run on local host
Lui
help pl
Anonymous
Lui
I can't send photos in this chat
Doragonsureiyā
I can't send photos in this chat
Rule 5️⃣: Never post walls of text or screen photos. Use paste bins like https://linkode.org, https://nekobin.com (or your favorite one)