Upload Image and pdf file

173 views
Skip to first unread message

Dott. Tegagni Alessandro

unread,
Aug 30, 2012, 10:24:03 AM8/30/12
to django...@googlegroups.com
I have a project created with cms Django, and in this project i must upload a image and pdf file. the code in models.py is as follow:
http://dpaste.com/793672/



The file with this step to upload, is inserted in correct folder, but the file not work.

In Administrator panel, when i click on image or pdf file, that i uploaded, the browser tell me Page not found (404). The current URL, home/alessandro/Scrivania/progetto/static/finale/header_blog.jpg, didn't match any of these.

I have verifed the permission, but i have in default chmod 777.

Any ideas?

I have follow also this tutorial youtube:Video From Yt I have the same code, but not result.

Any Ideas? Where is my error?

I can send the zip folder with the project, if you want.


I try, also, edit the code of models.py in:

http://dpaste.com/793673/


but the error there is.Now, I think what I not write correctly the configuration in settings.py. Media_Root, Media_Url, Static_Root, Static_Url are empty. There parameters should not be empty, true? I developer in localhost (on Linux/Ubuntu), web server Apache. What should i write as configuration?

With second link, the result is: The object albax with primary key u'20/static/finale/Magic_green_bus_1.jpg' not exits.

But the Image file, there is in correct file.

Or the Problem is in urls.py, the code is: http://dpaste.com/793124/


Any Ideas?



Amyth Arora

unread,
Aug 31, 2012, 2:47:27 AM8/31/12
to django...@googlegroups.com
Do you actually see anyfiles uploaded under static/finale if you manually browse the folder? or is it empty ?


--
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/tb3nq6Kyux4J.
To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.



--
Thanks & Regards
----------------------------

Amyth [Admin - Techstricks]
Email - aroras....@gmail.com, ad...@techstricks.com
Twitter - @a_myth_________
http://techstricks.com/

Dott. Tegagni Alessandro

unread,
Sep 2, 2012, 8:51:21 AM9/2/12
to django...@googlegroups.com
The folder is empty.

Dott. Tegagni Alessandro

unread,
Sep 2, 2012, 9:53:48 AM9/2/12
to django...@googlegroups.com
The file urls.py is: http://dpaste.com/795211/
If it is the help.

Dott. Tegagni Alessandro

unread,
Sep 4, 2012, 5:11:45 AM9/4/12
to django...@googlegroups.com
The file settings.py is: http://dpaste.com/796111/

But the result is page not found, when i click on media file, that i upload.

any ideas?
Reply all
Reply to author
Forward
0 new messages