Константин
I have a form connected with database and 2 groups of users. And I need to restrict access so first group have access to 50% of form and second group to another 50%. How I can get such result?
Константин
It’s a accounting program with unified database, but I need to set permissions
Константин
I guess I need set disabled fields for one group and for another at forms.py, right?
Sudden
hello guys, I am trying to create fixtures via celery task, how can I do that? I`ve tried something like this - exec(python3 manage.py......) but doesn't help
sumit
Yulian
Hi, could someone please answer my question on StackOverflow: https://stackoverflow.com/questions/73954669/django-rest-framework-multiple-views-for-single-endpoint
Yulian
In short: The question is how can I set 2 views to single endpoint(i.e http://localhost/api/players/) with Django(DRF), so if it's POST the creating view is triggered, if GET - the list view. Idk maybe I just need to create single view that inherits those 2, but maybe there is more proper way implementing that.
Thanks in advance
𝙑𝙞𝙯 𝙋𝙖𝙡𝙖𝙨
Yulian
Use base View so you can override Get and Post
I want to have single view with single method but connect those views with single URL (example: CreateUserView=POST, ListUsersView=GET BUT they are for single endpoint "localhost/users/")
𝙑𝙞𝙯 𝙋𝙖𝙡𝙖𝙨
𝙑𝙞𝙯 𝙋𝙖𝙡𝙖𝙨
https://docs.djangoproject.com/en/4.1/topics/class-based-views/intro/
It'll help You
Kavi
Hi..I am looking for help on how to push pub/sub message to google cloud run which has django..
Kavi
And how to make it listen to port
Anonymous
I wanna restructure my project dir, Can ref me ALTERUSER settings?
Iñaki
Hello I have object model with 2 foreign key . When render template I will wish see the reference and not a number .any suggestions?
𝙑𝙞𝙯 𝙋𝙖𝙡𝙖𝙨
Iñaki
𝙑𝙞𝙯 𝙋𝙖𝙡𝙖𝙨
Foreign key
If I understand:
Class Mymodel(.....):
cfo = models.ForeignKey('model' ,......)
Hi = Mymodel.objects.all().first()
Print(Hi.cfo.name)
You can access to the fields easily
Bd
We are a start-up team who want to make a website for child education
We prefer to use Django
will we be able to get help with Django Because they advised us to go to Laravel where we will get better help because it is more widespread?
Doragonsureiyā
cj
šяıяαм〘CID〙
I want to create a login form
I have create a custom user model
And for login i want one field from custom user model and another field from user model
They both have one common attribute ie user id
How can I do that form using this
Василий
Hello everyone, I have been learning Django for 8 months and continue to practice it, the last month I worked as a Fast API Developer.
I moved to Georgia and I can’t find a remote location, a huge problem. How are more experienced commuters with a job search (everyone on HH ignores me) or how to improve the search for a faster route?
The job search, like Fast api, was also very long, it took about 30 sobez in 3 months and only one gave the exhaust (believing in my efforts). How do others deal with it? Maybe someone needs a person with knowledge of Django with a mathematical education, in a startup. I want a lot of work.
Can someone share their experience?
Shugaba
https://hastebin.com/idehuhihil.py
I am using inheritance and abstract classes to build my desired model (SeniorStaff, JuniorStaff). How do I create a ForeignKey constraint that references a column shared by both concrete models. This foreign key is on a different model.
Aksam
Questions
Maxim
Abhishek
Hi guys .
Anyone worked with django on replit?
Hannad ✨..
How i connect django with sql server management?
Doragonsureiyā
Hi guys .
Anyone worked with django on replit?
Don't ask meta questions like:
"Any user of $x here?"
"Anyone used technology $y?"
"Hello, I need help on $z!"
Just ask directly! The better you are at explaining the problem, the more likely you are to get help.
Asking smart questions
Abhishek
When i render the http url on the webpage is not changing..
Help me fix it.
I am using django from replit
Eslam
guys how we can design models api and we not see the frontend
Eslam
You mean ask the project owner what he wants before I build the project
🕊Emocean🕊
Mirco
Eslam
thanks
𝙋𝘼𝙍𝙎𝘼
Hi my friends i have question ,
How can we create DetailView inside DetailView in django?
ford
Hello friends have anyone been able to deploy Geodjango app at Railways App. I keep on getting GDAL error no matter what i do.
Abhishek
Tура
Hi, is it possible without refreshing the page, to get the updated data from database
Tура
I tried with websocket but so difficult
-𝐟𝐚𝐫𝐡𝐚𝐝『𝟙𝟡:𝟝𝟘』
RRH
Iñaki
Its possible run 2 for in Django templates
Neo
Tура
Никайтос
Hi there, i've been trying to import models file to another application and it says 'No module named...', so Django sees my models file as a module, how can I fix that?
Mikhail
make a folder with your model and add __init__.py
Никайтос
There is an init.py file in every application folder, but it is empty, if it makes any difference
Neo
Никайтос
I've got the "models" file in the application "main" and I got the "models" file in the application "orders", I want to import the first one into the second one, to use the first one as a foreign key. While I am trying to import the class from the "main" into the "orders", ModuleNotFoundError appears
𝙋𝘼𝙍𝙎𝘼
Neo
Neo
but it should be as simple as doing from appname.models import ModelName
Никайтос
Никайтос
He says "No module named" and my application name, not even the models file
Neo
well u should paste the actual error and your code of the module the error occurs in and :S your project directory tree
Neo
use a pastebin
Ædel
how can i pre-install an existing site-package while installing a venv?
i want to install some packages from my own machine, not via downloading from servers.
i know i can do `--site-packages`but it pre-install "all" existing site-packages.
𝙑𝙞𝙯 𝙋𝙖𝙡𝙖𝙨
https://pypi.org/project/django-video-encoding/
Fredrick
Hello guys how can I have a hash key generator for my Django app that whenever any user signs up , gets the key and uses the key as the password for future logins
Matheo
Hello guys is there any other method to reset password in Django apart from using email...i tried that one but is not sending email and it has not errors either
Mahkam
BUGS
some one can help me in django
BUGS
I can't output this for editing
Sk :)
some one can help me in django statics files
Grace
Is there a way I can filter a model using the many to many and get the exact query, chat = Chat.objects.filter(
participants__in=[request.user, user_contact.user],
).distinct()
Grace
I have tried the above method but never worked, it return the same id each time
Андрей
Hello , tell me about django model , please , when saving to the database , I need 2 datafields to be summed up and saved to another field
Azamat
Doragonsureiyā
Sk :)
image is not showing in our django web page
Grace
Андрей
thank you just earned the save purpose
Zhaks
Hello everyone!
#situation
I have a production database with some already existing data, I need to transfer this data to a new database (development),
#problem
the test database has tables with some fields that are not on the prod. Both databases Postgres 14
#question
How to do migrations correctly? Can you tell me how to avoid compatibility problems at the same time?
Thanks!