Alexandros
like a statemachine, where edges should be controlled by different users
Marcos
Ok i do understain, in this case you will have to override post check if user has permission to that value is requesting, if it does, call super().post of it does not raise 403
Marcos
Simple as that
Alexandros
ok, I see
Alexandros
I was thinking if there was a more appropriate way, but this sounds reasonable
Alexandros
thank you
Marcos
Ur welcm
Alexandros
another quick question regarding this, do you think it might be more appropriate to use validators for this?
Marcos
if the model has associated user as foreignkey it would be easier if not, its easier do it on the method function of the view
Alexandros
ok, I see. It has an associated user. I'll think about it, thank you again
cj
What frontend framework best suits django
anything, it doesn't matter
Karthik
How to add an example below the insert box in django admin site
Karthik
An example of what to enter in the box
....
i want some logical help my question is i have two different model with same type of data with different database structure so now i want perform query on that with one object how can i do that
Govind
Hi Everyone, How can I use conditions in django URLs? For example :- If user is already not logged in than I can redirect to "home page" directly, otherwise first page of my website should be login page. Please help me.
Anonymous
I have one error anyone fix it I am ready to pay like 100 ra
Anonymous
Rs
Anonymous
In django
Anonymous
It's just to count the number of download for each song in django
Govind
How? I'm new in coding .
Ojay
Need help , ways for setting up a Django project with React
Yash
I am new to Django and would like to seek advise regarding file uploads. The user can upload multiple files, but I do not wish to store the files in the database. I just want to get the data from the files and store the data in the database. Is there a way to do it? Is storing the files locally the way to do it?
Original
I am using django-microsoft-auth in my Django project. I followed this guide(https://django-microsoft-auth.readthedocs.io/en/latest/readme.html). Now, I'm able to log in through Microsoft account(address: http://localhost:8000/admin ) but I don't know how to add a view that will say "Login using Microsoft" and how to link that view with Microsoft authentication page. It will be great if someone can tell me how to do this.
S Sidharth
has any1 tried linking firebase db to ur django app?
S Sidharth
official docs doesnt has it isnt?
Dhruva
am using django rest auth I want to fire a mail to the user if the user hasn't verified in one day after sign up automatically. How to do ? --
Romila
How to implement jira helpdesk for creating,updating and deleting issues in project by creating api tokens
Sheshadri
Ok, thanks. I avoid this using second api
It works perfectly in ModelViewset.. just tested it now
[ 𝕂𝕣𝕒𝕦𝕤𝕖 ]
Hello. How to render html tag in render?
sagir
First of all you have to import render
sagir
Hello. How to render html tag in render?
return render(request,"index.html")
sagir
return render(request,"index.html")
If index.html file exists in your project then this function will go on it
[ 𝕂𝕣𝕒𝕦𝕤𝕖 ]
I mean, in the context dictionary, pass html tags. They are encoded by mnemonics.
[ 𝕂𝕣𝕒𝕦𝕤𝕖 ]
iframe tags do not return the video, but as a string are shown on the page
sagir
M not getting you
webster
Hello guys, I have a doubt that, how can I deploy my project on pythonanywhere.com, I've used AngularJS on frontend and Django on the backend. I've 2 repositories, 1 for frontend code and 1 for backend code. I followed the book tango with Django but in that book, they have only 1 folder and their frontend part is in the templates folder. So, may anyone help me? Or share any resources which can help me. Thanks
Manish
I am trying to connect django to postgres, I have connected it successfully.. But when I run python manage.py makemigrations and python manage.py migrate it created session.001 file but I can't see that file
Anonymous
I am trying to connect django to postgres, I have connected it successfully.. But when I run python manage.py makemigrations and python manage.py migrate it created session.001 file but I can't see that file
Session migration is probably an installed app (when you use pip install package) or from django itself which is not avaible in you apps list
Manish
No actually when I apply migration command for sqlite3 I can see session.001 file
Manish
https://github.com/mayur200/django3/tree/master/postgresProj
Manish
I am working on this project
Manish
Means generally in migration folder session.001 file is create when we run migrate command
Manish
But here I can see that file
Shubham
Hi guys... I am trying to combine django-dynamic-formset and django-ajax-selects I was able to combine upto some extent... But I have one issue where if the form is added dynamically on page the autocomplete doesn't works... Anyone can help me out on this??
Manish
I checked db all django's predefined tables are created but table is not created which is declared by me
Manish
I solved it
Manish
Now migration file is generated in migration folder but my custom table is not created
Manish
Have you run makemigrations.?
Yes I run both but still it was not creating because I forget to mention app name 😅
Gil
Means custom table is not created in postgres db!!
checks: - app registred -try makemigrations app_name -try migrate app_name for more help, paste in webpaste tool showmigrations
Gil
😁
A ok, sorry. Not working yet?
sagir
Can u tell me the error.?
Gil
let's try: -first paste showmigrations to web paste tool, and share
Rukesh
Guys i am new in django... Can you tell me how to configure the url of the scrolling page.?
Rukesh
What do you mean with "scrolling page" ?
I have the single index.html. Now i am using section id with smooth scroll technic to return specific section. It work only in html and css... How do i implement the same thing in django?
Gil
I have the single index.html. Now i am using section id with smooth scroll technic to return specific section. It work only in html and css... How do i implement the same thing in django?
You are asking if django frontend is able to talk html and css. Of course! But working with Django will force to change the thinking. You need to deal with html templates, and then include static files ( like css) . But for starting you can bypass static files harcoding css insithe same html template. Try to start only rending the same html file that you have, with no template langauge. And start playing! https://docs.djangoproject.com/en/3.0/topics/templates/ https://docs.djangoproject.com/en/3.0/intro/tutorial06/
Anonymous
anyone to explain django channels? I'm beginner n help me.
Mirco
anyone to explain django channels? I'm beginner n help me.
Check the documentation and read it But the main concept is to build real time application
Doragonsureiyā
thank you Mirco.
You're welcome! 😊
sagir
Can anyone tell me how to upload images in Django using Bootstrap.?
Ghorz
I have tried devising a best practice for creating licensing in django. Method 1. Make django app that pops activation page until activated. Method 2. Restructure the settings just like saleor Method 3. Create a tickle bomb. Once any license related code is altered, the system crashes. It's for commercial purpose though. Any other suggestions. 1. Can be easily disabled, 2. Would make the settings file messy
Gil
Can anyone tell me how to upload images in Django using Bootstrap.?
Bootstrap is a set of tools for writing HTML, so Bootstrap will help you to have a nice look at frontend. For ulpoad something, like photos, to backend ( django) you need understand POST request. I recommend you start with https://docs.djangoproject.com/en/3.0/intro/tutorial04/ Instead of images, play with polls
Anonymous
Anyone who knows about asynchronous processing. I tried configuring celery with redis as the broker but it's a pain, can someone suggest simpler alternatives?
Mirco
celery + rabbitmq
If he's found hard celery + Redis, I think he will have the same difficulties by just changing the broker