Sojs
pleas help me, for decorator and classes, i can pass from first functions in other variable, but when pass self, i get error "BaseProject.project() missing 1 required positional argument: 'accounts_users'"
# decorator checking user members in project ot author
def checkMember_project(f):
"""
Using decorator "auth_user", get accounts users
Checking member in project or author
When we use the "checkingUser_project" decorator,
we simultaneously check the user's authorization and participation in the project,
whether he is the author of the project
"""
@auth_user
def checkingUser_project(request, accounts_users, id, *args, **kwargs):
# code
return f(request, accounts_users, id, *args, **kwargs)
return checkingUser_project
class BaseProject(View):
@checkMember_project
def project(self, request, accounts_users, id, title):
return render(request, 'project.html',
{'accounts_users': accounts_users,
'title': title, 'id': id
})
Parthiban
Hello everyone, iam completed python programming language, how will be start django framework, anyone can ask me? Plzz🙏
Maxim
Doragonsureiyā
pleas help me, for decorator and classes, i can pass from first functions in other variable, but when pass self, i get error "BaseProject.project() missing 1 required positional argument: 'accounts_users'"
# decorator checking user members in project ot author
def checkMember_project(f):
"""
Using decorator "auth_user", get accounts users
Checking member in project or author
When we use the "checkingUser_project" decorator,
we simultaneously check the user's authorization and participation in the project,
whether he is the author of the project
"""
@auth_user
def checkingUser_project(request, accounts_users, id, *args, **kwargs):
# code
return f(request, accounts_users, id, *args, **kwargs)
return checkingUser_project
class BaseProject(View):
@checkMember_project
def project(self, request, accounts_users, id, title):
return render(request, 'project.html',
{'accounts_users': accounts_users,
'title': title, 'id': id
})
Rule 5️⃣: To share code or error tracebacks, use an online pasting service like:
- https://dpaste.org
- https://linkode.org
- https://hastebin.com
- https://bin.kv2.dev
If you posted a wall of text, go back and delete it.
Parthiban
ask what?
Road map on django framework
Parthiban
Thank you mr.Maxin
Д.....
I have a page with 5 forms and there is only 1 submit type button which is outside the selector in my template. So when I submit , it writes to the DB 5 times the cleaned_data of the last form. My code - https://stackoverflow.com/questions/76481831/django-why-does-my-view-write-5-times-to-db-the-last-order Thanks!!!
Алексей
hello, can I make a request through my server, which is located on a foreign hosting, to a blocked api for a user in the client?
Muflone
Dairon
Hello, can anyone share with me a place for find code and django projects from other people, in order to learn from the way others approach to problems ?
Muflone
Олег
Hello, tell me please. I am writing a backend using django and I need to pass it to the person who writes the frontend and will send requests to my backend. How can I pass the backend to him?
Muflone
Олег
Олег
Muflone
pythonanywhere if you don't need specific things
otherwise you have to rent a vps
Олег
Muflone
whatever you prefer
Олег
whatever you prefer
Sorry, but in ngrok the link keeps changing. Do I still need to always hand over the front-end developer?
Muflone
Олег
Anonymous
Witch is the best playlist to learn the djanjo from YouTube
Alex
Vikash
Prakash
Hi all
Please guide me.
I have to build a website.
I have my code ready in my local and i have taken domain also.
What should I do next?
Alex
ERMIA
Ravikumar
Hi all , how to implement a many-to-many field as a dual list in Django,
Charly
Charly
Ravikumar
Charly
Charly
So please be specific on your use case
Ravikumar
ok one to many can you help me
🥔𝕴𝖒𝖔𝖓🥔
people, is there any way to get the date the query request was sent and put it in a variable.
Relatively speaking, the date variable and I want query to save the date of this request into it, and then save it to the database
Nqabeni
Good day, has anyone played with Django HTMX, can't seem to find information on Master detail grid , Django is limited in addressing this requirement
Jatin
Django issue: I’ve an issue accessing request object of api in a custom logger function where I save my logs to -> rabbitMQ and then Elastic for analysis. I need some of the information from request object and a userInfo(I add that key into request object at auth middleware), now when I create log schema I need some of the fields like request body, path , method, user info etc. to create user-specific logs. But I can’t pass request object directly to each function wherever I’m using my logger. Worst case: view -> function1 -> function2 -> function3…and so on. I need to pass request object to this nested chain where I’m logging in function_n. Is there any other way than passing request all through the chain. Wsgi’s get_current_request is deprecated and context processors only server request object in templates. Any luck? Log Schema: <there have been multiple logs in a single api request at any point and of any type <info, error, warn or critical>
Tony
Could you advise some tables plugin? Like excel, with filters for each column
Soham
How to make Single page application in django ? Without using any frontend frameworks like react, next.js and vue?
Sandeep
Rustamidze
Charly
Sandeep
Soham
Mario
Charly
Mario
Mario
Temirlan
hi everyone, i have a question, can you recommend django books (excluding django docs)?
Charly
Temirlan
Charly
Temirlan
ᅠ ᅠ
Hi everyone. Has anyone created a cookie in the captive portal (ios device)?
Danilo
Hi everyone, how can i test /add/ in django admin? I want to simulate creation of a record via admin
Lucky
Hii guys..
I need create api with mongodb can u guys tell me how to create and do you have any code for api plz share me
Charly
ERMIA
Alex
>
I want to be a able to download in a pdf format
Can anyone help
Charly
>
Charly
A table
Be more specific, we can't read your mind
Careful
A table
More details about what you want... We cannot help without knowing what you want
Francesca
Dhurke Sahdmadhi
Android 1
Hi all I have django setup with daphane for websockets in local server it's working but my company uses iis for hosting, read several post that it is difficult or not possible to connect with iis but those all posts were of 2019
Android 1
Has any one implemented such setup in iis
R..ch
Anybody knows how should I upload my django app using font-end React JS on Cpanel?