Faraaz
Alex
is your code on github?
Faraaz
Alex
push it to Github then share your repo
Faraaz
Okay Sir
Mirco
Okay Sir
Share via pastebin your project file structure
Faraaz
kmk
guys. Tell me please. I have a post model. I need to be able to publish it (just the variable responsible for publishing changes from False to True) and could randomly. just publish and I can very well, but I need to issue permission. to the fact that it is authorized done, but for some reason everything breaks down to the fact that a certain post is vulnerable. in publishing a post, permissions skip absolutely all authorized, and in editing a post why the condition works exactly the opposite. I attach the code to pastebin https://pastebin.pl/view/53d4bab8
Alex
kmk
it's so strange
Alex
kmk
yeah
but I don't understand why it works like this :(
Faraaz
Mirco
https://github.com/faraazzzz/NewDjangoApp
So as I said before you don't have any about app, no about package like the home one
So inside the main urls.py you cannot do about.urls because it doesn't exist
Alex
but I don't understand why it works like this :(
because this is a permission class so the method must return True for providing privilege,
But as you can see there is
request. user '!=' obj. owner
there is 'not equal' to in permission class, which translates to 'provide this permission to anybody who is NOT owner, So anybody who isn't the owner of that obj will have that permission level.
Faraaz
kmk
Mirco
Alex
https://github.com/faraazzzz/NewDjangoApp
You don't have any app named 'about', so remove the include line from project1/urls.py and settings, instead of in home/urls.py add
path('about/', views. about, name='about'),
I would suggest you, complete some tutorials to grasp a basic understanding of structure.
Faraaz
Mirco
NightE
Is anybody here has learned web application pentesting
on Django based applications??
NightE
Is it possible to get vulnerabilities or Django is highly protected framework?
NightE
So it can be vulnerable??
Tensor
Everything is vulnerable
Tensor
Depends on what you are doing.
NightE
I plan to learn Django
because I want to be a pentester
Tensor
Is it the most secure framework? No
Tensor
Is it secure enough for big companies to rely on? With some modifications yes.
Tensor
If you get any problem while learning django, you can always dm
NightE
Everyone is telling me to learn php but i didn't like it
NightE
Thnx a bunch... that's kind of u ✨
Tensor
NightE
Especially I am a cyber security student
NightE
We need a lot of python
Tensor
Why do you have to learn django?
NightE
To be a great pentester U ve got to be a great programmer
NightE
I choose web apps to start but I am stuck on what lang to learn
NightE
I need to deal with cookies and sessions
Things u can easily understand when are a programmer
Tensor
Okay
Tensor
Django will take a month to master tbh
NightE
Wow good to hear
Tensor
Given you know python
NightE
I do
Monde
hey everyone, I am trying to filter my model instances in my views by user but I keep getting this error
'WSGIRequest' object no user
I looked up on google and there aqre not many solutions that apply to django 4
Tensor
Mtin
Who can i help mi in djngo
Iam import model but take me not founded model error
Tensor
Tensor
Саид
Hi everyone, i wont to update the python version to 3.9 from production . What can you can recommended me? Have you had any problems with this?
I use the python 3.8.2
Alex
Саид
Shazam_
I have created a form page on django. Without any login functionality, any one can come and fill the form.
Now if two users come to the website and fill their forms , their details got mixed up .
User1 get details of user2 after saving the form
Shazam_
Please tell me how can I fix this
Shazam_
Is there any thing like " request.user" through which I can get I'd of that form to refrence it
Alex
Shazam_
So what is the correct way
Alex
Aïcha Zitouni
Hi everyone, can you help me
I I want to concatenate several audio files saved in database, so I will use a loop to retrieve them. I didn't know how to reset the variable and concatenate it with the audio files
Luis
Hello, could someone tell me how I can call a view from the backend in Django. I argue a little, I am making a web page that uses 2 Processes (I use 2 Processes because the amount of data to receive and process is high), 1 collects data that it receives from an Arduino, once I get the data I want to show it graphically in the browser, but I don't know how to call a view from outside the browser (I think this is not the best option since visitors receive an HttpRequest, but it's the only thing I can think of).
Tensor
Alex
Alexey
@luisra98
I would solve this problem this way:
1. Collecting arduino data
Some background task regularly collects data from arduino and saves it into django models. It can by celery task or even simple django command called by crontab.
Or Arduino can sent data to django via API (djano json view/DRF)
2. Web page
If page should dynamically show changing data choose on of: DRF/JS frontend; django json view/JS frontend; django classic view/HTMX.
If statical page is enough: classic django view
Phansivang
Hello guys who have experience about using django to make web streaming video like use django for web view video and OBS for streaming
Phansivang
I want to stream my video from OBS and host it to my django web
Doragonsureiyā
Maxim
Phansivang
So what kind of framework i need to do
Maxim
Shainkey
Is anyone know about stipe payment gateway?
Shainkey
It's showing incomplete payment status
Shainkey
I need to stored success response in the db and check whether the payment is successful or not
Anonymous
Faredata = FareDetails.objects.values('agent'). annotate (Amount=Sum('tax_and_fee'))
On print Faredata getting <Queryset[{'agent':'agentname','Amount':1032.3},.....]>
I want agentname as key amount as value