Rahimi | رحیمی
Use custom user object
Would U Please Explain a Little More?
Root
Would U Please Explain a Little More?
Ok like this class AdvancedConfig(models.Model): user = models.OneToOneField(User, on_delete=models.CASCADE) role=models.CharField(default='user',max_length=10) class Activation(models.Model): user = models.ForeignKey(User, on_delete=models.CASCADE) created_at = models.DateTimeField(auto_now_add=True) code = models.CharField(max_length=20, unique=True) email = models.EmailField(blank=True)
Javier
hello guys
Root
Would U Please Explain a Little More?
So you can manage from admin pannel too
Root
It worked for me to create role based sign in
Root
Anyone?🙃
Code with harry
Anshul
Code with harry
OkAy thank u
Abhishek
I wanted to learn django and I know basic python ...can anyone suggest me best way to learn django or thinks I should know before starting django
You can go with code with mitch Dennis elvy codewith Harry they have covered almost every logic on django And if you want to learn it topic wise you can go with geeky show he has explained everything from the basic to advance
Vedant
Can I post a job here?
Vedant
For django developers?
Alex
Can I post a job here?
no. Go offtopic group
Vedant
Python offtopic?
Alex
+
Vedant
Already posted no response
Alex
🤷‍♂️
Alex
Vedant Yes, I'm a django dev, but no I'm not looking for job. Don't PM me please
Vedant
Sure @alkalit
Mirco
Sure @alkalit
PM members break our rules, stop doing it if u don't wanna be warned/banned
Schohreh
Any one knows how to make a web application with Django ? 🙄
Alex
Any one knows how to make a web application with Django ? 🙄
Sounds like a meta question. What exactly do you want to know?
Alex
Shohreh please, don't PM me. Write in this chat your problem.
Alex
*sigh*
Schohreh
Right I need to make a small web application with Django which is about to show some food menu which they gave me an API also for the food part , I already watched many videos I do not know where to put this API or how to use given API in my project
Schohreh
And they said implement the web app using Django and Django rest This Django rest I do not know what is that
Schohreh
Sorry
Альберт
Ок
Schohreh
No I have already an API to use in my project I do not know how or where to use this api I do not know how to connect the give API in my project
Schohreh
Or if you know any useful link related to my problem, please send me.
Doragonsureiyā
Any one knows how to make a web application with Django ? 🙄
Don't ask meta questions like: "Any user of $x here?" "Anyone used technology $y?" "Hello, I need help on $z" Just ask about your problem directly! With ~80,000 people here, the probability that someone will help is pretty high. How to ask smart questions: http://catb.org/~esr/faqs/smart-questions.html
Schohreh
Ok
Alex
No I have already an API to use in my project I do not know how or where to use this api I do not know how to connect the give API in my project
As I undestend, you need to create an API wrapper. Let say the API you were given an endpoint /italian-cuisine/pizza/tick-crust/. So a client makes a request to YOUR API's endpoint, say, /food/awesome. There you place a handler which is smt like that: def awesome_food_handler(request): data = requests.get('https/the-api.com/italian-cuisine/pizza/tick-crust/') # maybe need your credintails to auth in the API # some processing on the data return JsonResponse(data)
Alex
It's very simplified, but it's actually what it does.
Alex
Yes
Enjoy reading https://www.django-rest-framework.org/tutorial/quickstart/
David E
Hey guys, I am looking for an experienced Django developer for a long term job.
Alex
Hey guys, I am looking for an experienced Django developer for a long term job.
Nice! You came......... in the wrong place, cowboy. Go to @pythonofftopic
Doragonsureiyā
Hey guys, I am looking for an experienced Django developer for a long term job.
Rule 🔟: Job offers are only allowed in the offtopic chat - @PythonOfftopic. To avoid being marked as spam, make your offer include skillset/techstack, salary/reward, contact information and a brief description of what work you want done.
Anonymous
Django topics
Adnan
how to get next avialable primary key object in djnago
Adnan
what is the query for that
Anonymous
How would you go about making it so that the Django login page converts the username to lowercase before checking database?
Anonymous
Because I save all username entries to lowercase on sign up and for some reason django still doesn't have an easy option to create case-insensitive usernames, so I just have to convert to all lowercase
Anonymous
Django has the easy option
I cannot work it out
Mendes
How about converting before passing it to the django auth?
Mendes
https://stackoverflow.com/a/13207785
Mendes
Here, it may help
Mirco
I cannot work it out
Or just override the form save and make it lower before calling the authenticate
Anonymous
Anonymous
Here, it may help
Thanks, I'll have a read
Suganesh
Hi i am trying to find data type (like int, float,datetime,Timestamp) of user imported (like excel, csv, json). For this i want Import excel and want to their datatype based on the column data using Django with React.
Anonymous
I want to add notifications to users i.e. if new post is added or someone likes the post Should I create a model for that and create new objects each time a event happens Or use django-notifications ?
Sopan
Ayush - explore django-channels.
Anonymous
Sopan Okay. Thanks
Anonymous
Does anyone have Notes for Django
Elii
I can't have virtualenv in Vscode,I searched it but solution didn't work
https:www.twinkleandblinks.com
I can't have virtualenv in Vscode,I searched it but solution didn't work
On linux, get your virtualenv activated from your CLI and open Vscode afterwards with "code" command.
Saila
Anyone here is good in g-suit integration using django application?
Никита
Hey everyone! Does somobody use some templates of authentication in Django? I mean some repo or just code that you copy-paste when start any Django application with authentication functionality, especially with session auth. Kind regards!
Axror
hi! I cannot fix this issue OperationalError at /admin/basic_app/product/ no such column: basic_app_product.image Request Method: GET Request URL: http://127.0.0.1:8000/admin/basic_app/product/ Django Version: 3.1.5 Exception Type: OperationalError Exception Value: no such column: basic_app_product.image Exception Location: /home/axrorbek/.local/lib/python3.8/site-packages/django/db/backends/sqlite3/base.py, line 413, in execute Python Executable: /usr/bin/python3 Python Version: 3.8.5 Python Path: ['/home/axrorbek/PycharmProjects/django_online_shopping/online_shopping', '/usr/lib/python38.zip', '/usr/lib/python3.8', '/usr/lib/python3.8/lib-dynload', '/home/axrorbek/.local/lib/python3.8/site-packages', '/usr/local/lib/python3.8/dist-packages', '/usr/lib/python3/dist-packages'] Server time: Mon, 25 Jan 2021 09:13:10 +0000
Ravi
Anyone who has experience developing shopify apps/integrations?
Sopan
@aaxig - Did you run "python manage migrate" command?