cj
Avinash
add @csrf_protect before every view function
Avinash
Before that import csrf_protect from django.views.decorators.csrf
Artyom
T
Rohan
Mukesh khandelwal
Which Open source IDE is to be used for creating Web app in Django
Muflone
Normal python editor, like pycharm
Muflone
The professional edition has some features for Django but they are pretty unuseful
cj
Muflone
Maybe I cannot find them useful
Mukesh khandelwal
Mahakaal
Mahakaal
pychrm is also better
Vivek
Yes pycharm is better
Akash
I have 1 django project and 1 python project independent of django...
I want both to use same database and models.
In standalone python I am using peewee ORM.
What's the best way to keep both in sync so I don't have to code things twice.
Right now if I change a model in django, I have to make same changes in peewee models also and sometimes also change relevant codes in both projects.
What's a better solution for this?
Dev4vin
Vivek
How to do forget password option in change 2.0
Vivek
I am not able to receive mail on my account
Omair
Vivek
Ya I will
Anonymous
Anyone had any experience with Django PWA? Can you use it to force the browser to show stored views from local cash, rather than the one from the server?
Vivek
How to solve error 'ModelBase' object is not iterable in django 2.1
Vivek
👍
how to save django-filter result to csv ???
Omair
👍
👍
but this will not work with django-filter
Mirco
👍
you can use csv module
def search(request):
template = 'search/patent_list.html'
patent_list = Book.objects.all()
patent_filter = PatentFilter(request.GET, queryset=patent_list)
context = {'filter': patent_filter}
return render(request, template, context)
👍
Rohan
Rohan
But that's just me
👍
okk
👍
Thanks bro
👍
I solved
Rohan
Noice
Rohan
the fuck what?
Anonymous
the fuck what?
😐 what the fuck or fuck the wat witch is ture?
Marko
hi do somebody know/have samples how to run server code after render in django ?
Anonymous
Artyom
Hi! why i can't get a field value from related model? :
Artyom
goal_agree = Agreement.objects.get(pk = 30) # get an object
goal_renter_name = goal_agree.renters_id
goal_renter = goal_agree.get_field('renters_id__fnameplp') #wish to get a related field
Mirco
Sirius
Hello everybody!
Is it possible, to register by to register forms in Django?
Mirco
Juliano
https://www.udemy.com/share/10100sBUsccV5UQw==/
Sirius
explain better
I want to save users date from two forms in the same model.
Anders (izzno / gooood) 🇳🇴
DRE:
Am I right in understanding that you cannot override viewsets.ModelViewSet retrieve method but rather create a GenericAPIView with the RetrieveModelMixin (+ whatever else you need)
Anders (izzno / gooood) 🇳🇴
Which is quite simulare to defing "manually" in a veiwset.ViewSet" except class attributes that is ?
Anders (izzno / gooood) 🇳🇴
Btw: https://nesdis.github.io/djongo/
This looks interesting...
Artyom
Artyom
And one more questions. Could you say, why in admin renders in name field this: <django.db.models.fields.CharField> instead 'Deutschland'?
Guilherme Kenzo
Isaías
Hello. In django rest using APIVIew, how to get the pk sent in the url in the method patch?
inchidi
Isaías
url(r'v1/user/(?P<pk>\d+)/', UserAPIView.as_view()),
inchidi
Avinash
How to save session django ?
Rohan
Avinash
In login view, request.session['member_id'] = some value
Avinash
In logout, it raise key error for request.session['member_id']
cj
Rohan
Avinash
In my logout view it is the first stmt executed
Avinash
If there is an id then del the session else nothing
Rohit
Hey, is there anyone who has worked with django-allauth?
Rohit
I have some doubts
Mirco
Rohit
Hey, is there anyone who has worked with django-allauth for social authentication?
I have some doubts
Thanks in advance!
iNcAeLuM
hello guys, i am trying to understad update_or create() in django docs, but am little confused, in this example:
´´´
obj, created = Person.objects.update_or_create(
first_name='John', last_name='Lennon',
defaults={'first_name': 'Bob'},
)
```
i guess that if first_name and last_name is matched then updated all fields with defaults dict,
and if it dont matches then create new one obj with all fileds including fist_name and last _name