Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.

#1 Nov. 3, 2005 22:13:43

[EMAIL P.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Error With /media In URL?


Hi,

I've searched the groups, but can't seem to find anything regarding
this oddity. I've a URL of /media (http://localhost/media, for
example ), and when I browse to it, I get presented with this message:

Permission denied:
/Library/Python/2.3/site-packages/django-1.0.0-py2.3.egg/django/contrib/admin/media/

Yet, if I change the entry in urls.py to anything else, the page is
rendered correctly, so at least I know urlpatterns is working as it's
supposed to. Any ideas, or a I doing something wrong?

Regards

J

Offline

#2 Nov. 3, 2005 22:13:50

[EMAIL P.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Error With /media In URL?


Hi,

I've searched the groups, but can't seem to find anything regarding
this oddity. I've a URL of /media (http://localhost/media, for
example ), and when I browse to it, I get presented with this message:

Permission denied:
/Library/Python/2.3/site-packages/django-1.0.0-py2.3.egg/django/contrib/admin/media/

Yet, if I change the entry in urls.py to anything else, the page is
rendered correctly, so at least I know urlpatterns is working as it's
supposed to. Any ideas, or a I doing something wrong?

Regards

J

Offline

#3 Nov. 4, 2005 03:01:44

Kenneth G.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Error With /media In URL?


On Friday 04 Nov 2005 3:43 am, wrote:
> Hi,
>
> I've searched the groups, but can't seem to find anything regarding
> this oddity. I've a URL of /media (http://localhost/media, for
> example ), and when I browse to it, I get presented with this
> message:
>
> Permission denied:
> /Library/Python/2.3/site-packages/django-1.0.0-py2.3.egg/django/contr
>ib/admin/media/

are you using apache2 with modpython? If so you need an alias directive
and a Directory directive for your media directory
--
regards
kghttp://www.livejournal.com/users/lawgontally ho!http://avsap.org.inಇಂಡ್ಲಿನಕ್ಸ வாழ்க!

Offline

#4 Nov. 4, 2005 10:58:01

[EMAIL P.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Error With /media In URL?


Currently, I'm just using django-admin.py runserver

Regards

J

Offline

#5 Nov. 4, 2005 11:12:54

James B.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Error With /media In URL?


On 11/4/05, <> wrote:
> Currently, I'm just using django-admin.py runserver

Last I checked, the built-in server didn't handle media. You need to
have an actual web server running on the port you specify as the media
URL, as far as I know.


--
"May the forces of evil become confused on the way to your house."
-- George Carlin

Offline

#6 Nov. 4, 2005 14:39:53

[EMAIL P.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Error With /media In URL?


It's not actually serving media, that was just the url I used. If I
change the URL to be something else, it renders the page corrently - it
currently performs an os.listdir and passes the list to the template
via render_to_response.

Regards

J

Offline

#7 Nov. 10, 2005 19:37:12

S.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Error With /media In URL?


James Bennett wrote:
> On 11/4/05, <> wrote:
> > Currently, I'm just using django-admin.py runserver
>
> Last I checked, the built-in server didn't handle media. You need to
> have an actual web server running on the port you specify as the media
> URL, as far as I know.

The curious thing is that can not be true - because using
'django-admin.py runserver'
and going to the admin site _it does_ serve up its own css files used
by its html pages.

These css files even load other files as background images. That is how
the little "+"
graphic appears as part of links that are of css style "addlink", etc.

Offline

#8 Nov. 15, 2005 14:23:26

J.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Error With /media In URL?


In case this helps, entering /media in the url produces the error
everytime, even though /media is not in any of my url files.

Thanks

J

Offline

#9 Nov. 29, 2005 14:25:24

J.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Error With /media In URL?


OK, think I may have found the problem with this. In the settings.py,
ADMIN_MEDIA_PREFIX is set to /media/ by default. I'm going to sort
through the code, but I think that's the starting point.

Comments?

J

Offline

#10 Nov. 29, 2005 19:03:17

Waylan L.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Error With /media In URL?


On 11/29/05, JA <> wrote:
>
> OK, think I may have found the problem with this. In the settings.py,
> ADMIN_MEDIA_PREFIX is set to /media/ by default. I'm going to sort
> through the code, but I think that's the starting point.
>
> Comments?
>
According to the
docs(http://www.djangoproject.com/documentation/settings/#admin-media-prefix)
ADMIN_MEDIA_PREFIX is "The URL prefix for admin media -- CSS,
JavaScript and images." and yes, it is set to '/media/' by default.
I'm guessing that if you want the /media/ url to point to something
other than the Admin CSS, JS and images etc, you need to change this
value to something else. How this will affect Django's admin pages, I
have no idea. Perhaps there are other settings for that - or maybe
that one change will cover your bases.


--
----
Waylan Limberg

Offline

Board footer

Moderator control

Enjoy the 20th of January
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support