Suryo Adhy Chandra
Posting a blog,editing it, liking it, deleting it, commenting on it.
for beginner maybe still studying, and need a lot of time. but for expert maybe need a little time. depend on how about our skill in it.
M. Hossein
I have a model called Job and a model called Category job and category have many to many relationship I want to use django-filter to filter this relationship in Job view set for example I want to fetch all Jobs in categories 1 and 4 how can i do this?
S.A
Hi anyone pls guide me on how to use swagger for an api .
nyctophile
Have you added username to REQUIRED_FIELDS?
No I did not I will try it now !!
nyctophile
Have you added username to REQUIRED_FIELDS?
It worked can you tell me why if it's possible
Supra
It worked can you tell me why if it's possible
REQUIRED_FIELDS list should contain all the mandatory fields you would require when creating your superuser. If you want any field like first name also to be entered as mandatory at time of creating superuser, this is where you specify it. REQUIRED_FIELDS = ['username', 'first_name']
Supra
ahaaa thank you so much for your help👍👍👍
You can also set your username field like below. Note that the field declared as USERNAME_FIELD should not be part of REQUIRED_FIELDS. USERNAME_FIELD = 'username' REQUIRED_FIELDS = ['first_name',]
Д.....
hello! did anybody ever write tests for custom "BaseUserManager" using pytest django ?
Kaustab Roy_C_24_CSE(AIML)
pip3 install mysqlclient Not running, producing errors in Ubuntu 22.04lts Python: 3.10.6 Please help to sort out this issue
Muflone
developers refusing to read the error messages have a clear path for the faulty career
Muflone
user.check_password results to be None check the models.py at line 15
Muflone
you can't change the user model after the initial migrations were run. delete the database and restart by applying the migrations to the new database
Ammar
this might be stupid question but is django better in small or big projects or it will be fine with any size in big I mean something like facebook instagram etc
Muflone
this might be stupid question but is django better in small or big projects or it will be fine with any size in big I mean something like facebook instagram etc
you can use wherever you prefer if you have a lerge project and you want to use django you can use it some big projects are based on django, many others aren't
Ammar
you can use wherever you prefer if you have a lerge project and you want to use django you can use it some big projects are based on django, many others aren't
So performance wont be a big problem if we optimaize it will ? I am a littel scaried because i read alot that python and django arent that fast
Muflone
So performance wont be a big problem if we optimaize it will ? I am a littel scaried because i read alot that python and django arent that fast
python is not great at performances, sure but often this is not the problem in the stack, the wsgi/asgi server must play the bigger part. you can scale also by using multiple workers
Muflone
no, performances cannot be achieved by reading a blog or playing a video. performances are the result of many factors applies in the best way
Muflone
read the sentry.io blog for some hints but it's a vast argument which cannot be implemented by only a single person
Ammar
Thanks alot for you help
~Jms
Hellow. I need some help please. I have project for bill management, what i need is to change payment status to overdue automatically without any action from the end user if the due date is reached, how to should i handle this in django?
~Jms
scheduled task, in python code or by using system cron/timers
Is there an third part library to handle these scheduled task?
Muflone
Is there an third part library to handle these scheduled task?
a lot of them, like apschedule but often the best solution will be to handle schedules by using the OS tools
KingFx
When building project with django and react Which side do you choose to render Client side rendering ( react) Or server side( django)
Naggafin
When building project with django and react Which side do you choose to render Client side rendering ( react) Or server side( django)
react is generally not a good frontend framework to work with when using django, because it conflicts with django's server side rendering paradigm. htmx , another frontend js library, is far better suited to the task. but if you're going to use react, your best bet would be to just serve the most basic HTML pages, and then use a REST API for all interactivity you need. such a design paradigm would heavily rely on django-restframework and you'll largely be keeping your frontend and backend code bases decoupled
Naggafin
It is fine to use with django
it is, but just because you can doesn't mean it's ideal
Anonymous
Any simple Methods for deploy django projects?
Pranjal
Any simple Methods for deploy django projects?
Use gunicorn and deploy on render
@SamahTech
I have a problem with connect my django app to sql server database. I used django-mssql and pyodbc. Can any one help me please...
@SamahTech
No one can help if you don't say whets the problem
mssql isn't an available database backend or couldn't be imported
@SamahTech
'ENGINE': 'mssql',
Charly
mssql isn't an available database backend or couldn't be imported
We don't need a random SO question but your issues
@SamahTech
We don't need a random SO question but your issues
I tried to make my problem short. I will ask again the problem in full. Thankful
@SamahTech
👍❤️
@SamahTech
For use bi report server, i had to use sql server in my django project
ERMIA
For use bi report server, i had to use sql server in my django project
The django ORM is not compatible with sql server, So you need to write your own, Or external package
@SamahTech
My english lang in not good, i'm sorry😔 I have a dashboard in power bi report server. When i share my bi link in my webapp, a login popup in my browser shown to end user and it must enter user pass of my bi report. But i want that popup don't show to end user and i pass it in my project and end user can see my report without login info
@SamahTech
I try to post username and password from my app project and i think i had to use sql server connection in my project to access the login info of my report
R..ch
if we want to show Media folder as a file manager , is there a package for it?
Hrithik
iam using BigIntegerField() for a field in my model class, but when i try to add a value less than the range it shows "integer out of range" exception why?
Anonymous
Any resources to learn django middlewares, api with eg
E
Hello. Can react-admin receive JsonResponse from django from views.py without DRF? I installed django-cors-headers but still got error in console CORS request did not succeed
E
const dataProvider = jsonServerProvider('http://localhost:8000'); const App = () => ( <Admin dataProvider={dataProvider}> <Resource name="users" list={UserListContent}/> </Admin> );
Ammar
Is there is a way to make real time apps or apis with something work naturaly on windows without ( wsl ) most package i saw are using redis or something similar which doesnt work on windows
Kibeyefa
It should allow you use redis on windows.
Ammar
Thanks i will look it up
Kibeyefa
Thanks i will look it up
You're welcome.
chandan
Hi , I have just started learning Django
chandan
I am not able to figure out why I'm getting this error
chandan
Can anyone please help
chandan
I can't share screen shot ?
Muflone
What's wrong with people asking for help without telling what the error they're receiving? What do they suppose? We are able to read their screen?
chandan
Well okay
chandan
Mysite.views has no attribute home
chandan
Under url pattern
Muflone
Write the exact error message
Muflone
There's also other lines, they are not decorative
Muflone
You're calling something called home which doesn't exist
chandan
path('home/', views.home), Under views.py From django.http import HttpResponse def home(request): return HttpResponse("hello")
Muflone
Make sure the file is saved
chandan
God damn
chandan
Thanks
chandan
I missed it