>
> leafing thru this list I understand that I should have added an alias
> reference to the directory of the django media that im my case, according
> to the many mails (very old indeed, usually referring to django 1.0),
> should be
> /Library/Python/2.7/site-packages/django/c
gt; reference to the directory of the django media that im my case, according
> to the many mails (very old indeed, usually referring to django 1.0),
> should be
> /Library/Python/2.7/site-packages/django/contrib/admin/media
> which simply does not exist (also under FreeBSD which I use t
ed an alias reference
to the directory of the django media that im my case, according to the many
mails (very old indeed, usually referring to django 1.0), should be
/Library/Python/2.7/site-packages/django/contrib/admin/media
which simply does not exist (also under FreeBSD which I use too)
Hi
I am deploying my project.my configuration is like this :-
WSGIScriptAlias /
/home/nikhil/workspace/CPMS-Source/careprep/apache/django.wsgi
ServerName localhost
Alias /media/ /home/nikhil/workspace/CPMS-Source/careprep/media/
Alias /static/ /home/nikhil/workspace/CPMS-Source/careprep/medi
Thanks Phil!
that should really be in the docs!
bye
On Nov 15, 2011, at 17:38 , Philip Mountifield wrote:
> I found this a little while ago and reported the mistake in the docs. There
> is an exception made in the code for the admin media to preserve backwards
> compatibility, and
I found this a little while ago and reported the mistake in the docs.
There is an exception made in the code for the admin media to preserve
backwards compatibility, and allow the files to remain in "media" rather
than "static".
Regards
Phil
On 15/11/2011 16:34, Ivo Bro
Hi,
on 1.3.1. I ran:
./manage.py collectstatic --dry-run
and it found files in: django/contrib/admin/media/
which is fine, but I am wondering, why these files are found since the docs
says, that the default folder apps have to store there static assets is a
folder called “static”.
I haven’t
Realised after posting that this belongs in django-developers.
Reposted there. Sorry about that.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group,
Currently, it is unclear as to how apps that override admin templates
should maintain compatibility with both 1.3 and 1.4 when referring to
the admin media file URLs in the overridden templates. This applies
primarily to third-party apps like django-admin-tools, that want to
support at least the
-rwxrwxrwx 1 peng root 5721 Dec 26 22:45 forms.css
> > > -rwxrwxrwx 1 peng root 963 Dec 26 22:45 ie.css
> > > -rwxrwxrwx 1 peng root 780 Dec 26 22:45 login.css
> > > -rwxrwxrwx 1 peng root 3306 Dec 26 22:45 rtl.css
> > > -rwxrwxrwx 1 peng root 9009 Dec 26 22:45 widgets.css
&
c 26 22:45 rtl.css
> > -rwxrwxrwx 1 peng root 9009 Dec 26 22:45 widgets.css
>
> > i put the django admin folder into the site_media:
>
> > So the project tree is like:
> > apps
> > logs
> > site_media
> > media
> > sta
atic
> admin
> templates
> settings.py
> manage.py
> urls.py
>
> (site-env)[r...@201940 css]# pwd
> /home/peng/jiangyo/site_media/admin/css
>
> the following is my configure about Nginx & django settings.py
>
> sett
site_media
media
static
admin
templates
settings.py
manage.py
urls.py
(site-env)[r...@201940 css]# pwd
/home/peng/jiangyo/site_media/admin/css
the following is my configure about Nginx & django settings.py
settings.py:
# URL prefix for a
Hehe, I'm actually using a bastardized custom admin class to handle
the actual display of the app list.
It seems odd to me that there's no way to control the order in which
admin media are output, since javascript is sensitive to the order in
which it's specified. It means t
ers
> Referers - URL Referers
>
> It's the cleanest way I've found to do such a thing.
>
> Cheers,
> Brenton
>
> On Jun 25, 5:18 am, ringemup wrote:
>
>
>
> > Is there any way to change the order in which admin media are output
> > (e.g. outpu
You could possibly alter the metaclass for the media for your model,
but I suspect this would lead to a whole world of hurt.
On 24 June, 20:18, ringemup wrote:
> Is there any way to change the order in which admin media are output
> (e.g. outputting a ModelAdmin-level javascript after a
erers
It's the cleanest way I've found to do such a thing.
Cheers,
Brenton
On Jun 25, 5:18 am, ringemup wrote:
> Is there any way to change the order in which admin media are output
> (e.g. outputting a ModelAdmin-level javascript after a widget-level
> script)?
>
>
Is there any way to change the order in which admin media are output
(e.g. outputting a ModelAdmin-level javascript after a widget-level
script)?
Thanks
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, sen
I've resolved my problem, the django project was in the directory "/
var/aplicações". So I've tried to access the folder "media/css" and I
couldn't because django couldn't resolve name "apilcações". So, I've
just rename the folder.
On May 18, 5:37 pm, C4m1l0 wrote:
> Hi, I've encountered the same
Hi, I've encountered the same problem. When I look in the page source
the link point to the correct localization, but the CSS and images
aren't loaded, the layout is default. Could anyone help us? :)
Thanks!
On May 17, 8:37 am, naos wrote:
> Well now I think that it might be related to virtuale
Well now I think that it might be related to virtualenv since I
created new virtualenv with Django 1.1.1 and have the same result.
On May 17, 12:44 pm, naos wrote:
> Hi All,
>
> Today I tried to switch my project from 1.0.4 to 1.2rc version and I
> encountered problem with
Hi All,
Today I tried to switch my project from 1.0.4 to 1.2rc version and I
encountered problem with admin media definitions and template
override. It simply doesn't work :) JS,CSS files are not included in
the html and all template customizations are not present, looks like
my custom temp
On Apr 2, 3:48 pm, Sam Lai wrote:
>
> And that should work. You need to make sure you have the right imports
> for the various classes. I tend to define my forms in a separate
> forms.py but that's up to you.
Sam, you're a genius - that worked perfectly. Thanks SO much. I really
appreciate it.
On 3 April 2010 08:44, Scot Hacker wrote:
> Sorry for long delay on this thread. Back at the problem now.
>
> On Mar 25, 1:22 am, Sam Lai wrote:
>> On 25 March 2010 09:25, Scot Hacker wrote:
>
> OK I've got something similar now, using _media rather than "class
> Media:" Now all that remains is
hough
> its definition is nested within the model/form class. It only has
> access to the methods/properties/variables it contains (unless it is
> given something else when constructed).
Ah! Now I understand this distinction, thanks for that.
> The solution to your problem is here
&g
something else when constructed).
The solution to your problem is here -
http://docs.djangoproject.com/en/dev/topics/forms/media/#media-as-a-dynamic-property
Admin media is based on Forms media, so the same principles apply.
Sidenote - what's you've implemented is documented at the top of tha
On Mar 24, 2:08 pm, Shawn Milochik wrote:
>
> http://docs.python.org/library/functions.html#staticmethod
>
> It means that the method is function that, when you run it, doesn't
> specifically belong to any particular instance, but to the class itself.
>
> Shawn
Thanks Shawn. That URL's not wor
>
>> The problem is you are defining get_class as
>> an instance method and trying to call it is a class method (or static
>> method).
>
> Sorry, I have no idea what you're referring to here, and Googling for
> static vs. class methods is not turning up anything I can understand.
> Can you show w
On Mar 24, 12:05 pm, Firat Can Basarir
wrote:
> Scot you need to learm Python.
Do you mean learn *more* Python? Great, I'm always game to learn more!
I've taken a Python class and read books and run several Django sites.
It's not like I don't know enough Python to be functional. But we're
all h
Scot you need to learm Python. The problem is you are defining get_class as
an instance method and trying to call it is a class method (or static
method).
On Wed, Mar 24, 2010 at 8:00 PM, Scot Hacker wrote:
>
> On Mar 23, 5:32 pm, Paulo Almeida wrote:
> > I don't have a working sample (never di
On Mar 23, 5:32 pm, Paulo Almeida wrote:
> I don't have a working sample (never did this), but you may be looking for
> something like this:
>
> class Media:
> js = get_path()
>
> And in the class where you keep use_editor:
>
> def get_path(self)
> if self.use_editor:
> retur
idea, you'd probably have to tweak the details.
- Paulo
On Tue, Mar 23, 2010 at 9:36 PM, Scot Hacker wrote:
> Given an admin media class that sets up a rich text editor, like:
>
> class TutorialAdmin(admin.ModelAdmin):
>
>fields...
>
>class Media:
>js
Given an admin media class that sets up a rich text editor, like:
class TutorialAdmin(admin.ModelAdmin):
fields...
class Media:
js = ['/paths/...',]
I would like the ability to selectively override js. I've added a
"use_editor" boolean to the Tutori
trying to serve admin
media files from the same subdomain, I changed the settings this way:
ADMIN_MEDIA_PREFIX = 'http://media.bud-inform.co.ua/admin%5Fmedia/',
and expected that all calls to media from my admin site will be made
to this url But actually it didn't work this
On Thu, Feb 12, 2009 at 4:49 PM, Chris Haynes wrote:
>
> The admin interface had no styling until I added a symlink in the fcgi
> directory from media (my ADMIN_MEDIA_PREFIX is /media/) to the admin
> app media directory. The development server works fine on another
> machine w/o such a link.
>
>
The admin interface had no styling until I added a symlink in the fcgi
directory from media (my ADMIN_MEDIA_PREFIX is /media/) to the admin
app media directory. The development server works fine on another
machine w/o such a link.
Another developer I spoke with fixed the same problem this way.
Ne
Ethan wrote:
> In my first django project, use the apache server, in the admin page,
> it can't find the css file. and how does the admin css file generate?
http://docs.djangoproject.com/en/dev/howto/deployment/modpython/#id3
--
Christian Joergensen
http://www.technobabble.dk
--~--~-~-
In my first django project, use the apache server, in the admin page,
it can't find the css file. and how does the admin css file generate?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To pos
ant seem to serve an image.
> I'm getting this error:
>
> ERROR: Page not found: /usr/lib/python2.5/site-packages/djangotrunk/
> django/contrib/admin/media/amazon.gif
>
> when trying to browse http://localhost:8080/amazon.gif
>
> I run the server using this:
>
I tried following the documentation but I cant seem to serve an image.
I'm getting this error:
ERROR: Page not found: /usr/lib/python2.5/site-packages/djangotrunk/
django/contrib/admin/media/amazon.gif
when trying to browse http://localhost:8080/amazon.gif
I run the server using
Karen wrote:
> Where in your apache config is the relative to your
> Django block? It sounds like you need to reverse
> the order, so that the admin_media location over-rides the Django one, not
> vice-versa.
Thats it! Your'e a star!
I've put the admin_media stuff below the Django block a
e itself), since it is where you will see the actual file
> > name apache is trying to access. If you see nothing about the admin
> > media
> > file in the error log, that would seem to imply your SetHandler None for
> > the
> > admin media urls isn't taking effec
about the admin
> media
> file in the error log, that would seem to imply your SetHandler None for
> the
> admin media urls isn't taking effect.
Yes, this seems to be the problem, because if I visit
http://mysite.com/admin_media/css/dashboard.css I get a Djan
> > there is a slash missing between 'admin_media' and 'css'.
>
> There is nothing of interest in the error log. The slashes and everything
> else look OK in the access log:
> GET /admin_media/css/dashboard.css HTTP/1.1" 404 2054
>
Nothing of interest?
Karen wrote:
> If you include the trailing slash on the first part (url-path), then you
> need to include it also on the second part.
Thanks for your reply. I now have the trailing slash in both places, but still
a 404
>>
>
> Check the error log as well, this will print out the actual file n
On Fri, Apr 25, 2008 at 8:03 AM, Ben <[EMAIL PROTECTED]> wrote:
>
> Hello
>
> The issue of how to serve the admin media files using mod_python has been
> dealt with several times before, and AFAICS I've followed the advice given
> (and the documentation), but I still
root, it needs to point at the admin media directory in your django
> source.
I did indeed copy the media files to the web root. However, aliasing them to
the django source makes no diffference:
Alias /admin_media/ /usr/lib/python2.4/site-packages/django/contrib/admi
don't need admin_media in the urls.py file as it shouldn't make it
as far as Django.
Apache config:
Alias /admin_media/ /var/www/mysite/admin_media
SetHandler None
Unless you've copied the media files from the Django source into your
we
Hello
The issue of how to serve the admin media files using mod_python has been dealt
with several times before, and AFAICS I've followed the advice given (and the
documentation), but I still get a 404 on the admin media files. I've already
removed "Apache expert" from m
more.
>
> Is there a way to fix this? Or can i just copy the Admin Media from /
> root/trunk/django/contrib/admin/media to the path which is set up as
> my Media_Root? Or in someway like this?
We do this:
Alias /media-admin/ /usr/local/lib/python2.3/django/trunk/django
y to fix this? Or can i just copy the Admin Media from /
> root/trunk/django/contrib/admin/media to the path which is set up as
> my Media_Root? Or in someway like this?
I have a site hosted on Debian VServer and there's no problems with
admin application, but I have my own local insta
> I have a VServer with Django installed and it works very well, on my
> home Server on MacOS and Windows the Admin Panel worked very well,
> too, with some fixes, but on the Debian VServer with Apache2, it don't
> works anymore.
>
> Is there a way to fix this? Or can i just c
I have a VServer with Django installed and it works very well, on my
home Server on MacOS and Windows the Admin Panel worked very well,
too, with some fixes, but on the Debian VServer with Apache2, it don't
works anymore.
Is there a way to fix this? Or can i just copy the Admin Media from /
Env DJANGO_SETTINGS_MODULE newsite.settings
> > PythonDebug On
> >
>
> > Alias /media/ "C:/Python25/Lib/site-packages/django/contrib/admin/
> > media/"
>
> >
> >Order deny,allow
> >Allow from all
>
On 9/24/07, Anurag <[EMAIL PROTECTED]> wrote:
>
> Hi,
> Sorry for this repeat post - but i am getting desperate and
> seeking some quick kindly help.
>
> I am unable to get my admin media to be served by Apache. I am runinng
> on windows.
>
> Here is my httpd.
Hi,
Sorry for this repeat post - but i am getting desperate and
seeking some quick kindly help.
I am unable to get my admin media to be served by Apache. I am runinng
on windows.
Here is my httpd.conf
SetHandler python-program
PythonHandler django.core.handlers.modpython
Bryan,
If this happens when using django integrated dev server, then setting
ADMIN_MEDIA_PREFIX to something different than MEDIA_URL should help
you, for example: "admin-media". I consider this a bug of Django,
which perhaps appear only under some specific conditions.
Aidas Bendor
Sure. I also suggested him making the place readable by the apache user,
but making a quick 777 and back is a fine way to know where the problem
is. If with that permission everything works, you know your user hasn't
got the right permissions. Though you gotta remember to chmod back to
something s
On Sat, 2007-04-28 at 12:02 +0100, Christian Markwart Hoeppner wrote:
> Make sure you have an allow all directive in your apache configuration
> for that folder, and just in case, you might set your unix permissions
> to 777
Please don't suggest that sort of change. Making files writable by
every
ied: /usr/local/lib/python2.5/site-packages/django/
> contrib/admin/media/
>
> Getting this message when I'm trying to access the admin. It's odd,
> because I didn't do any changing of permissions. Any reason this would
>
Permission denied: /usr/local/lib/python2.5/site-packages/django/
contrib/admin/media/
Getting this message when I'm trying to access the admin. It's odd,
because I didn't do any changing of permissions. Any reason this would
happen -other- t
gt; wrote:
>
> > > and have forgotten what I did. Now, when I try to call up my admin
> > > pages, I get nothing. A blank. So my hunch is that apache isn't
> > > serving up my admin media files, but I can't figure out why. Any help
> > > is greatly app
nothing. A blank. So my hunch is that apache isn't
> > serving up my admin media files, but I can't figure out why. Any help
> > is greatly appreciated.
>
> I don't think it is not your media files. If you had no media files,
> you should still see html, it would
> and have forgotten what I did. Now, when I try to call up my admin
> pages, I get nothing. A blank. So my hunch is that apache isn't
> serving up my admin media files, but I can't figure out why. Any help
> is greatly appreciated.
I don't think it is not your media
I had this working once, but tinkered with something, took a week off
and have forgotten what I did. Now, when I try to call up my admin
pages, I get nothing. A blank. So my hunch is that apache isn't
serving up my admin media files, but I can't figure out why. Any help
is greatly a
Hi all,
copying the admin media folder(c:\Python24\Lib\site-packages\django
\contrib\admin\media) to my web servers root (c:\xampplite\htdocs
\admin_media) calling this url; http://localhost/django/admin/ , I get
the admin pages showing up fine with the right CSS.
My apache config looks like
Thanks! Your suggestion worked like a charm.
Take care,
Don
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe fr
On 8/10/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Alias /media "/home/user/django_src/django/contrib/admin/media"
>
> Order allow,deny
> Allow from all
>
>
> RewriteRule ^/media$ /media/ [R]
>
>
media
files. I added the following lines in the VirtualHost directive:
Alias /media "/home/user/django_src/django/contrib/admin/media"
Order allow,deny
Allow from all
RewriteRule ^/media$ /media/ [R]
SetHandler None
I thought that
On 26 Jul 2006, at 09:37, Tyson Tate wrote:
In my project's root, I have my regular media in "media/" and the
admin media in "media/admin/". For some reason, I can't access
anything under "media/". My server just gives me a 404. Everything
under &qu
Tyson Tate wrote:
> Inefficient and insecure? Blast. I'm using FCGI, so it looks like
> I'll have to add a subdomain that points to my media files and,
> subsequently, hunt down every single place that I've had to hard-code
> the URL in.
Hi Tyson
Regarding MEDIA_URL, check out that link that Jo
> Is there a way to avoid hard-coding media URLs? Perhaps there's a
> global context variable like:
>
> picture
>
> Or some other way to do the equivalent instead of writing custom
> views for everything?
>
> Thanks for the tip.
>
> -Tyson
This article is about writing a custom template context p
On Jul 26, 2006, at 7:17 PM, SmileyChris wrote:
> http://www.djangoproject.com/documentation/static_files/ says:
> Using this method is inefficient and insecure. Do not use this in a
> production setting. Use this only for development.
Inefficient and insecure? Blast. I'm using FCGI, so it looks
http://www.djangoproject.com/documentation/static_files/ says:
Using this method is inefficient and insecure. Do not use this in a
production setting. Use this only for development.
I'd guess that you just needed to symlink the media and admin media
directories to your site
Adding that to urls.py and removing the media/ rewrite rule from
my .htaccess file seemed to do the trick. Thanks!
-Tyson
On Jul 26, 2006, at 1:22 AM, Aidas Bendoraitis wrote:
> Do you have something like:
> (r'^media/(?P.*)$', 'django.views.static.serve',
> {'document_root':
> '/home/oh
OTECTED]> wrote:
>
> I'm having some rather befuddling problems with getting my media URLs
> working for <http://www.fallingbullets.com>.
>
> In my project's root, I have my regular media in "media/" and the
> admin media in "media/admin/".
I'm having some rather befuddling problems with getting my media URLs
working for <http://www.fallingbullets.com>.
In my project's root, I have my regular media in "media/" and the
admin media in "media/admin/". For some reason, I can't access
anyt
Hello,
I'm using the Admin and want to change some css/img/js from my projects
directory.
I copy the whole media directory to my projects directory but I am not
able to use it from a webapps.
I added this line to my urls.py:
(r'^media/(?P.*)$', 'django.views.static.serve',
{'document_root': 'med
78 matches
Mail list logo