Maxim
Jerome
cj
Anonymous
Anonymous
With Serializer
serializer = TweetSerializer(data=request.POST or None)
but what if user is not authenticated? In django view, I said, redirect it to login page. How serializer will handle this?
♈
How to use store procedure in django ?
∆
In the templates folder , I had a html file , at first I have given body color as blue then after running server it worked fine
Then I have changed the color, but when I refresh the page , body color hasn't changed from blue
∆
Anonymous
Hard refresh
∆
Means?
∆
Even though I have runned server agn , no changes seen
max 17
class Collection(models.Model):
title = models.CharField(max_length=255)
class Product(models.Model):
title = models.CharField(max_length=255)
collection = models.ForeignKey(Collection, on_delete=models.PROTECT)
how can I filter collections that dont have any products?
.
Hi guys i hope you are all good.
Am working on a kanban board app with Django as backend and Vue.js. as frontend. I have 2 models: Status and Items. Items contains status as a foreignkey from Status model.
api/models.py:Status class
...
status
...
Items class
...
contains status - foreignkey of Status
...
And am using class based views in my api/views.py
I have created the api with django rest framework. And the vue app is a seperate app.
My problem is I want to display items created in my app in a column whereby the column name is the Status.name and under every column I want to display all Items.name(items represents tasks that user creates) that contain the status(Item.status) that equals the Status.name of that column in my vue app. basic kanban board columns.
Anyone have any idea of what logic I need to implement to achieve this. Any help is appreciated.
Anonymous
max 17
Bassi
Traversery media
Bassi
Python django 7 hrs course explained from basics
Bassi
Let me stick to a single course 😂
.
😂 alright goodluck
.
https://stackoverflow.com/questions/69863760/display-model-items-grouped-by-the-category-they-belong-to-kanbam-board-style
My question on stackoverflow. If you have time please check it out. Thanks.
Артем
How on django to make choose of region in first visit on site?
Anonymous
Subhonjon
Hi, I wanted to install and configure LTE 3 admin for Django, can you help me?
Subhonjon
voiceless
Capitaine Driccé
Hello team, i'm new here. Who can to send me a tutorial on CRUD MySQL with Django
Capitaine Driccé
I am a beginner
Maxim
Capitaine Driccé
voiceless
Anonymous
Np voiceless
Bassi
could some one explain how login system in django works
Bassi
i tried various tutorials but i'm finding it difficult day by day
Amir
Hello friends. Do you think it is better to have static and media files in the project root or in the parent folder?
Mirco
Amir
Bassi
Mirco
Amir
Doragonsureiyā
Arash
Doragonsureiyā
what is a cdn
Step 1: Open a browser
Step 2: Write down https://google.com or https://duck.com and press Enter
Step 3: In the search box, write down the same words you asked here
Step 4: Read the first results
Adiziel
Hello how can I list all sessions of a user and terminate special sessions from APIs
William
max 17
max 17
William
Ok
マクスイム • グセブ
I don't recommend to use custom way to store last login time because AbstractBaseUser class already has last_login field you need
It seems like it's not mentioned in the docs but it's obvious from Django's source code
https://github.com/django/django/blob/main/django/contrib/auth/base_user.py
マクスイム • グセブ
Hello how can I list all sessions of a user and terminate special sessions from APIs
The ones who use DRF API usually prefer TokenAuthentication or JWT Auth. Your goal is to blacklist or delete auth tokens.
DRF TokenAuthentication:
Import Token model from rest_framework.authtoken.models and delete the ones you want.
JWT Auth:
Blacklist tokens
https://django-rest-framework-simplejwt.readthedocs.io/en/latest/blacklist_app.html
マクスイム • グセブ
Ali
Hey, I have a question about Django.
Ali
Here is my question on Stackoverflow. Would you please check this out and guide me? Thank you.
https://stackoverflow.com/questions/69860283/best-way-to-declare-additional-data-and-modules-in-a-django-project
Ali
Is any official reference out there explaining these issues?
Mirco
Mirco
Mirco
For the second one, you can create a module called utils.py and put them inside it
Ali
Thanks
Amir
Führer
anyone here know sqli
Shadow
What is the trace back error?
Zerat
Zerat
Shadow
A
Hi, did anyone here implement the sso with yaml in django ?
Amir.m.343
Hi everyone
I have a question
Can I make an app like gravity form for creating forms?
Deleted
https://stackoverflow.com/questions/69871579/pass-variable-in-quote
Amir.m.343
Gideon
Hello! Please reply, my IDE advises to put @staticmethod on get or post methods in the View class if "self" is not used there. This is right?
Gideon
Sorry for my English
Mirco
Gideon
Doragonsureiyā
thanks!)
You're welcome! 😊