Guillermo
Mirco
Player
question remains though.... I plan to receive data every hour lets say. Does django remove duplicates before savin into database or is it something I should do myself?
Guillermo
Player
Player
exceptions*
Player
@grroigc you are amazing. Thank you sir :)
Guillermo
inchidi
Player
Ajay
I have attribute error
Ajay
Django. Contrib.auth.views had no attributes login
Ajay
What I should be do
Guillermo
What I should be do
contrib.auth.views.login does not exists, contrib.auth.views.LoginView does exists
Abel
Guys how can I create different types of user in django
Abel
Nichita
Hi, how can I auth using Django rest framework, but with email and password, not with username / pass? Need I use something like this
Nichita
https://github.com/Tivix/django-rest-auth/blob/master/docs/installation.rst
Mirco
Rajab
Hi guys! What's the difference between django and drf?
Rajab
Mirco
Thx bro👍
Check DRF official docs for better definition and more info
Rajab
ⓦⓐⓢⓓⓚⓘⓛⓛⓔⓡ
Rajab
Anders (izzno / gooood) 🇳🇴
Is it just me or does VScode sort of grow on you... It slowly takes over without you noticing...
Anders (izzno / gooood) 🇳🇴
btw has anyone experimented / used graphene-django, whats your take on GraphQL on Python / Django.
Anders (izzno / gooood) 🇳🇴
I am hoping someone will tell me its just as nice / easy going as the rest of Django ;)
Anders (izzno / gooood) 🇳🇴
OOuu that sounds nice... I love dataclasses...
Mirco
Mirco
Alpha release should come early
Anders (izzno / gooood) 🇳🇴
I have been seduced by JS the last months.... But I miss the "simplicity" (by choice) of python...
Mirco
Anders (izzno / gooood) 🇳🇴
I found a great way to combine JS / Django without complete separation (The view/js hybrid thingy) like I showed you too making it such a great combo. I have a DB heavy project that just escalated 900% so GraphQL would be perfect....
Mirco
Anders (izzno / gooood) 🇳🇴
Perfect candidate.
Anders (izzno / gooood) 🇳🇴
(You could say its bad API design, but I refuse to make an API endpoint for EVERY single view function of the PHP app...)
ⓦⓐⓢⓓⓚⓘⓛⓛⓔⓡ
Mirco
Mirco
Mirco
Anders (izzno / gooood) 🇳🇴
:)
Loki
Ok guys, very stupid question incoming
I got a task to create a service using Django. I already have structure of models and yml with API methods from my employer. So, I never created API and basically just getting started with Django.
There is one field in the model that bothers me:
api_key -- CharField -- "access key for API"
So what exactly is this API key? Am I supposed to create it with some method or it's just bunch of random symbols that I can generate myself and then pass it somewhere?
Anders (izzno / gooood) 🇳🇴
Anders (izzno / gooood) 🇳🇴
api_key -- CharField -- "access key for API" is not django...
Loki
Well, it's field in the model
api_key = models.Charfield(...)
I just don't get how to use it
Anders (izzno / gooood) 🇳🇴
Neither would we without the sourcecode...
Anders (izzno / gooood) 🇳🇴
There are several ways to authenticate an API request. Are you using DRE ?
Anders (izzno / gooood) 🇳🇴
Django Rest Framework
Anders (izzno / gooood) 🇳🇴
Are you familiar with MVC frameworks? How new are you ? etc... ;)
Scrim
i'm trying use django_filters.ModelChoiceFilter(query=....) to make dropdown filter on my website
Scrim
but when i select item
Scrim
and i submit filter
Scrim
return message displayed on screen, make a valid option
Scrim
i cant filter... how can i do this ?
Mirco
Share your code
Anonymous
I am building a django app, that will store api keys for users of 4-5 different service.
using hash field to store api keys.
My question is to use one single model as UserApiKeys with a identifier column to say which service this key is for.
or Make separate Models for each service.
ServiceA
ServiceB
ServiceC
Anonymous
I need an chat APIs for Android app plezzzz anyone help me out of this
R
R
Anonymous
Anonymous
I dont see the problem in storing them in the same model
Thanks for your input.
A follow up question:
So I am thinking to create an App called Dashboard
It will have a main model, UserApiKeys users have option to add api keys for 5 different services. (Multiple api key for a single service can be added as well)
So it will have a Add / delete forms.
And the app will basically show some reports generated from those API.
Is all this good to build as a single app or I split it up
R
R
Anyways, I would suggest create ur own User by extending AbstractUser and have an app called users where you have ur User model and UserApiKeys model
R
Is this in django r else other
Look at django channels, their tutorial is how to create a chat... https://channels.readthedocs.io/en/latest/tutorial/index.html
Anonymous
Anonymous
Can anyone explain how serializer validations work for fields.
One way is to write def validate where we can write our own validation other is when serializer does this on fields automatically
Anonymous
I want to know how serializer does and how to override that
Mirco
Anonymous
Have you read docs ?
Hi mirco,
Read and i just want confirmation.
Is def validate_fieldname
The only way to do it
I am just beginning with django.
Thanks
Mirco
Anonymous
Yes