These are chat archives for django/django

20th
Dec 2016
pkariz
@pkariz
Dec 20 2016 15:22
hi, i have DRF rest api and i want to get a list of objects A, however lets say instance of A has user:1 and book:3 (both foreign keys). I want to only get the nested model of the book for example, so A = { user:1, book: { id:3, name:harryP} ...}. Can i somehow tell DRF that through query (i want it to be dynamic, if possible without me haveing to write serializer which does the checking)?
Mauro Oviedo
@moviedo
Dec 20 2016 19:11
i have a questions regarding using builtin django auth as documented here https://docs.djangoproject.com/en/1.10/topics/auth/default/#module-django.contrib.auth.views
docs say Django provides no default template for the authentication views. You should create your own templates for the views you want to use.
but then they do provide defaults here, in django admin code
https://github.com/django/django/tree/master/django/contrib/admin/templates/registration
and my app keeps registering the django admin's templates registeration/<template> instead of my own
kinda annoying
Mauro Oviedo
@moviedo
Dec 20 2016 19:18
figured it out, http://stackoverflow.com/questions/447512/how-do-i-override-djangos-administrative-change-password-page#12409380 app install ordering
Philip Eckert
@pae4557
Dec 20 2016 19:47
where can I find the default model file for 'user' in django?
is that what u wanted?
Philip Eckert
@pae4557
Dec 20 2016 19:52
@moviedo Yes! Thank you. Sorry, know it was an easy question I was just having a lot of trouble
Mauro Oviedo
@moviedo
Dec 20 2016 19:52
np