These are chat archives for django/django

6th
Jul 2017
Andrew Backer
@awbacker
Jul 06 2017 07:36
I've done it but only with LinkedIn, and then gave up :D It felt like I had to re-jigger things too much with all-auth since it's not really an API but a set of django forms.

Question about whether I should report something as an issue... I use Postgres and I see several queries executed each time a connection is opened (from the same thread/etc). It doesn't seem like they should be needed, or at least the results should be cached.

SELECT t.oid, typarray FROM pg_type t JOIN pg_namespace ns ON typnamespace = ns.oid WHERE typname = 'hstore';
SELECT typarray FROM pg_type WHERE typname = 'citext'

I do know we need these to run, but before each and every query?

ravishankar199
@ravishankar199
Jul 06 2017 11:31
how is django+angularjs, to build an application? what will be the scope for them and also, when will using them be good?
Aaron Layfield
@DandyDeveloper
Jul 06 2017 11:32
Uhhhhhhhh, what would Django be used for in this context?
ravishankar199
@ravishankar199
Jul 06 2017 11:34
im a newbie..sry if dis seems silly,bt i wanna try django for the first time.. i want to know what and all are the applications of django and where it must be used? and what to use with it? reactjs or angularjs?
@i5ar
Jul 06 2017 11:45
@ravishankar199 you have to build a REST API with django+djangorestframework then you can use the MV* client of your choice (aurelia, ember, react...).
ravishankar199
@ravishankar199
Jul 06 2017 11:52
what exactly REST API does?
it builds on top of django, and gives you REST friendly endpoints/view layer, an api browser, documentation generator, and a bunch of other nice things. It doesn't use django forms, rather it uses its own serializers to validate incoming json requests, and generally makes sure things work as they are expected to for an API automatically.
ravishankar199
@ravishankar199
Jul 06 2017 12:37
thx a lot!
@i5ar
Jul 06 2017 12:49
@ravishankar199 There are, of course, other ways to use a client framework with django. Maybe you don't need an API.
Aaron Layfield
@DandyDeveloper
Jul 06 2017 12:51
But essentially, using Angular and Django together seems a bit redundant in the context of your question @ravishankar199
Vishnu Dileesh
@VishnuDileesh
Jul 06 2017 14:28
Hey friends, how can i have access to url in views?
self.request.path, I would guess
Philip Eckert
@pae4557
Jul 06 2017 22:01
How are you supposed to create an inline formset with custom validators? I've followed the documentation at https://docs.djangoproject.com/en/1.11/topics/forms/modelforms/#overriding-methods-on-an-inlineformset per line, but it doesn't use the validators I write in my clean() method it just uses the default, and when I go into pdb and check the clean() method mro, it's using the Parent Form's clean() method instead of the the 'form' object's clean() method.
Anybody have experience with this?