|-|●$€!|/|
I need to build an API
Its pretty easy With rest framework
|-|●$€!|/|
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'
Anonymous
Anonymous
Yeah try this
done ,same result
Chayeb
done ,same result
Try without args= just put self.kwargs['username'] After ,
Anonymous
Try without args= just put self.kwargs['username'] After ,
tried it too, but if i dont use self.request.user.username how it gets username ?
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
?
Read about cbv
Anonymous
yeah yeah got it, i thought you meant error is because of update view
Vorke
But seems no luck
How many servers altogether?
Seyed Alireza
i get error --> redirected you too many times. how can i solve this error ?
Seyed Alireza
i get error --> redirected you too many times. how can i solve this error ?
i get error when use some mixin in a view (mixins redirect url )
V
If anyone have django restapi framework pdf
.
Hi I'm unable to install pyobject in virtualenv. anyone please help. 🙏
Doragonsureiyā
Hi I'm unable to install pyobject in virtualenv. anyone please help. 🙏
No one can help you until you explain your difficulties.
Shubham
Has anyone tried using search_fields for stacked inline objects in admin page ?
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
you need to make nginx serve it directly
Charly
How can i do
What you have found on google regarding that?
Sanjarbek
What you have found on google regarding that?
I configured nginx and gunicorn correctly, but i have a problem with that
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
 Aryas
django-cores-headers is not thesame as django-cors-headers
So you mean there is an extra "e"? I should remove it, shouldn't I?
 Aryas
Whats the package you want?
It worked, thanks👌
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
Seyed Alireza
impossible to help without code
https://linkode.org/#papePzg6UhPqurYrSruB34
Seyed Alireza
impossible to help without code
https://linkode.org/#d32qcote5XaX1bYdXek3b3
VIGNA
Could anyone please suggest me where to learn django channels I wanna create a chat app with react and django. Please help me
Maksat
Hello everyone, I can't understand how to create a cart in e-shop
Dhananjoy
Hello everyone, I can't understand how to create a cart in e-shop
Search on google how to make cart in Django simple😉
Kareem
Is there a website that explains how to deploy Django web application on server.. Like what I should change in code
Shamnad
Hosted an app this week on digital ocean. It was easy🙌
Kareem
Where r u planning to deploy?
My friend bought a domain so I'll be deploying it on his server
Kareem
Yes, try Django documentation
It's too complicated or technical i think.. is there no simpler website that explains it
cj
It's too complicated or technical i think.. is there no simpler website that explains it
it's not complicated, it's easy to follow and technically it's direct to the point, so people would follow it easily... go and read it
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.
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
Ad
i have no plans to do your work for you
Nor to try and understand a question and provide a non lazy-answer, apparently.
Maxim
Nor to try and understand a question and provide a non lazy-answer, apparently.
just as you have no plans to put effort into making a search query
Ad
Dude, if you don't know, just don't reply please. There are other knowledgeable folks around.
Doragonsureiyā
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.
These single steps will help you a lot: Step 1️⃣: Open a browser Step 2️⃣: Write down https://google.com or https://duck.com and press Enter Step 3️⃣: In the search box, write down the same words you asked here Step 4️⃣: Read the first results
Lui
why crispy didn't work?
Lui
crispy-forms gives error when trying to run on local host
Lui
help pl
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)