Naveen
or if you want to pass into templates use static files
Mirco
How to load image from folder media on my project media to views.py
start by reading this one https://simpleisbetterthancomplex.com/tutorial/2016/08/01/how-to-upload-files-with-django.html
Karan
Is there any size limit for uploading files on django
Mirco
Is there any size limit for uploading files on django
You can set size limit into your running webserver and make validators into Django models to raise validation errors or logic and you can also add a "validation" on frontend side
Karan
?
Mirco
I mean there is no restriction by default right we can upload any sized file
if I don't go wrong , django by default shouldn't have any limits but you should check FileUploadHandler or similar into official docs to more and better info
Mirco
Orm?
you know django right ? how do you talk with databases ?
Ivan Putra
Ivan Putra
I success on load static on view but media like image is fail
Arun
any idea of having a chart that has label all over char (region)
Arun
in js btw
Arun
https://i.imgur.com/9IGrznB.png
Mirco
The problem is to load image not db
I'm not telling you to load database if u already load an image, you should have an instance of it into your Image model
José
hey, has anyone used pinax.notifications before? i need a thorough tutorial/documentation
Abhinav
Any information regarding managing pdf files in database and how to retrieve them?
Abhinav
with model's FileField
Thanks! And how to store them? I am using sqlite3 database. Should I store only links of pdf files? Or Full pdf files using BLOBfile field?
Anonymous
Can anyone help me to setup my templates..i want to inherit em all from base template
Maksim
so, why can help me with form? Console write that POST 200, but form tell me that I missed a required field but I fill in
Mirco
Nope, FileField creates file's path url into your database don't use blob
you need to set a MEDIA folder and specify upload_to into your file model
Abhinav
Ok
Mirco
Ok
you can find all u need on official docs
Abhinav
Basically I am making 4 drop-downs connected with each other and the last drop-down will reference the files . I am beginner in Django. I didn't get relatable information on official docs so I asked here! By the way thanks!!
Vladyslav
Hello, guys I get the error - ['ManagementForm data is missing or has been tampered with'] but the form is connected Cod - https://pastebin.com/DNgJN7BX
Vladyslav
can you help me?
👍
I already rendering this form
then print line by line in terminal and find the error line
Mikael
Hi people. Am new to django. Could anyone please help me understand how to create different webpages for a website.
Mikael
does each app i will create serve as a page?
Mikael
okay, thanks Mirco
Mikael
anyone with django tutorial pdfs please send me as well i will appreciate
inchidi
anyone with django tutorial pdfs please send me as well i will appreciate
https://media.readthedocs.org/pdf/django/2.2.x/django.pdf
Naveen
Already i have this
do you have multiple forms on same page ?
Naveen
or formsets
Vladyslav
Yes
Vladyslav
You can chek code
Vladyslav
https://pastebin.com/DNgJN7BX
Naveen
you will have to include managment_form tag in every form and they shouldnt be nested in any manner
Naveen
add tag form.management_form under csrf token
Naveen
i had the same problem once. I couldnt solve it though yet
Naveen
You can find some way to put everything in one formset someway
Naveen
create a manual form
Naveen
for wtevr input u need
Naveen
then simply assign it to respective models
Naveen
in the view
Naveen
dont use modelform for it
Vladyslav
thank
Ярик
Have around 10 same type errors after manage.py collectstatic How to fix it? Found another file with the destination path 'admin/js/jquery.init.js'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
Anonymous
@IP_ScannerBot
Anonymous
@IP_ScannerBot
Please use it to port scan ,...
kalloc
Hi, what do you usually use for linting in your Django projects?
kalloc
pylint-django?
kalloc
flake8 is enough?
Rohan
Black is cool
Mirco
flake8 is enough?
Yup , you can use it in combination with flake8-isort, trailing comma etc
Mirco
Black is cool
Absolutely 😁 it will be used even for Django codebase
Rohan
Absolutely 😁 it will be used even for Django codebase
Woah, I was thinking of adding precommit hooks to my projects for black
Rohan
By any chance you use vs code?
Mirco
Woah, I was thinking of adding precommit hooks to my projects for black
Good idea 😁 I haven't tried it with VSCode , but with Atom and it's working pretty good on saving files
kalloc
flake8 usually ignoring models import error
kalloc
and maybe others errors
kalloc
for example, pylint found:
kalloc
************* Module api.serializers.profile api/serializers/profile.py:196:14: E1101: Module 'api.models' has no 'DriverLicence' member (no-member) (