Zey
<class 'home.admin.ProductAdmin'>: (admin.E108) The value of 'list_display[4]' refers to 'offer', which is not a callable, an attribute of 'ProductAdmin', or an attribute or method on 'home.Product'.
Eng. Mohamed
I am sorry, I missed that, sorry again
Elii
I'm using simple JWT and want to implement Logout API in DRF
But my code doesn't work.
Do u guys have any idea?
Doragonsureiyā
I'm using simple JWT and want to implement Logout API in DRF
But my code doesn't work.
Do u guys have any idea?
Please provide a full explanation including all the details that you consider relevant. Your statement is too broad and there is no clear way to answer you, you have to explain:
- what you're doing
- what you're expecting
- what you're using
- where you're running the script
- what Python version you're using
- what packages and their versions you're using
- and the most important thing: show the code YOU wrote (read rule 5️⃣ for that)
and more details, that way your chances to get help will increase
Dharmu
Want to create a model where database value changed in some interval
Dharmu
Harish
Zey
I want to upload my project on GitHub but my settings file contains sensitive information how I can make that file private?
Zey
Or how to secure that file?
Harish
Harish
But you shouldn't push sensitive information to GitHub
Zey
Actually I want to put that project into my resume so I have to give GitHub link or there any other option?
_/-\_¦--¦
You can either use environmental variables or for you sensative information
or create another settings file and add it to git ignore
this file can contain you sensative settings since it's ignore
just provide instruction on how to set this file in the Readme or something
Zey
Thanks
_/-\_¦--¦
your welcome
Anonymous
Anyone use DRF real time with web sockets ?
Mirco
Anonymous
Check django channels
I want to implement it with existing model-serializer-view format(if possible). I rode the docs about channels but I can't figure out a way to implement with drf
AGASTRONICS
I need a quick start registration, login and profile with profile image
Anonymous
Hello, Does anyone know how to build a service which doesn't use a Database ? This using Django REST framework. The service is gonna be used only to valid data between other two services.
Vishnu
Hello guys,
In my project,
I have a model that contains a count field, there is any method to increase that count field value automatically everyday by 1 except sunday
sheikh
How to calculate count group by week in orm?
Sopan
Aswith
I can't able to use my ip address as host in django it is showing error
Aswith
Even though I added my ip address to allowed_host in settings.py
Aswith
Actually I am trying to fetch data into react native
Baggy ️️
Just put *
Baggy ️️
Try it
Aswith
Partha
Is there any log parser module in python??
Partha
The log file gets updated every 30 min, I need to check every 30 min if there is any error found I have to send an email with the error that occurred
Peter
I need assistance on Drf-Access policy package for managing my permissions in the project, aside from the documentation, do you have any helpful document/file?, be it a video or pdf I'll gladly appreciate
Exclusively Drf-Access Policy related
Baggy ️️
Show the name of columns of table with primary key
Baggy ️️
And foreign key
Alikhanov Jakhongir
Hello,
I was going back up sqlite3 database and restore it to postgresql
but i am getting this error.
django.db.utils.IntegrityError: Problem installing fixture '/home/app/web/db.json': Could not load auth.User(pk=3): duplicate key value violates
unique constraint "users_profile_pkey"
DETAIL: Key (id)=(7) already exists.
Alikhanov Jakhongir
Alikhanov Jakhongir
Can anyone help me with this problem?
goal is to convert the sqlite database to Postgresql
Baggy ️️
cj
I suggest use mysql
what? why? MySQL is a toy database, Django works 2000 times better with PostgreSQL
Jerome
mysql will not resolve a pk issue, just read your post, if you're still on sqlite you should delete this user then recreate it, also dumping from sqlite to another db is usually not a good idea, because of issues like that
cj
cj
Poojitha
can anyone tell me how to get current user username in models.py?
Eng. Mohamed
Eng. Mohamed
Or current_user = self.request.user
Bharathwajan
i am creating a blog site
for that i created a comment box on that i was asked to select the blog everytime when i was commenting
how to make that field auto selected
Anonymous
tg is quality software
Ali Vs
Hi
How I get the username from
Request in middleware?!??
Mirco
Dhruv
can anyone tell that how can i send various data tables from views.py to my html page
Dhruv
i ve three different table and ive to print all of them to my html template
âshîsh
Dhruv
and how to print that dict on html page
Pradeep
Thats a basic of django and for that you should read django doc
Poojitha
how to use codeforces api in my website?
Poojitha
views.py
def practice(request):
response=requests.get('https://codeforces.com/api/problemset.problems').json()
return render(request,'blog/practice.html',{'response':response})
urls.py
path('practice',views.practice,name='practice')
html file
{% extends "blog/base.html" %}
{% block content %}
{% load static %}
{% for i in response %}
{{i.status}}
{% endfor %}
{% endblock content %}............no data is being displayed on browser can anyone tell the mistake
Abbas
Hi. How to add some date to the django model? Which model field may i use? Please help me
James
Can anyone help me. I face some problem when send data from html form to mysql database but i cant see it in my database and no any errors is raised
Abbas
James
Hi developers is it possible to create own user model in django? And ignoring the default user model?
Jerome
Jerome
it's not that easy to change the user model while your project is already on its way.. depends where you at, but you might rebuilt all the auth & user part
Abbas
James
Jerome
I can't help you more at this point, also you re on MySQL, i m not used to this db
James
Jerome
Oky
check this tuto, it's relatively simple, you'll get an idea at least https://learndjango.com/tutorials/django-custom-user-model
James
Jerome
you're welcome
James
Thanks
bikrant
Is there a way to serialise image and use in react?