Re: css issues
Sorry for the incomplete message. This what the structure looks like now mysite/ media / css / file1 js/ js1 img/ img1 Settings.py MEDIA_ROOT = '' MEDIA_URL = '' ADMIN_MEDIA_PREFIX = '/media/' This is tested using development server and I have checked after deleting cache. But if if modify my css file, it still takes from my django installation not from my local css file ! Please let me know what i am missing ! Thanks. Rahul On Sat, Apr 9, 2011 at 7:34 PM, rahul jain wrote: > All, > > I copied the media directory from django project into my site project. > This is what it looks like now > > mysite/ > > > > > -- 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, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
css issues
All, I copied the media directory from django project into my site project. This is what it looks like now mysite/ -- 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, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: prepopulated_fields problem (+admin CSS issues)
If the slugs are something you're really concerned with... I would say customize the change form to work the way you want. Personally, I would rather the computer error on the side of not breaking...instead of trying to anticipate what I want it to do this time...vs next time vs a year from now. Re the CSS of the admin: Well...I've noticed it...though I never thought of it as an 'issue'. CSS/Design isn't my strong point. In fact...I wouldn't even consider myself average at it! Probably sufficiently below average. So I always take stuff that's been designed by others to be purposeful. I can't say why it was designed that way or if it was an accident of the way the filter gets added... hope that helps. n On Tue, Sep 14, 2010 at 3:30 PM, Nick wrote: > Yeah that makes sense. I guess we just need to be more careful when > adding live posts. Maybe it wouldn't be a bad idea to add the > functionality on change if a post is anything but live. This way the > slug stays relevant to the title for drafts if the editor feels like > experimenting with different titles. > > As for my second question. Can you not help because you haven't > experienced this issue, or is it something you just don't have a > problem with? > > On Sep 14, 11:20 am, "nick.l...@gmail.com" > wrote: > > Nick, > > > > I can answer you first question...but not really the second...hopefully > > someone else will come and explain that one to you... > > > > re slugs: The prepopulated_fields are working as intended. > > > > The reason being, say you've written a blog post. You've send that link > out > > to thousands and millions of people. Then you realize that you wanted to > > change a word in your title (hence changing the slug). > > > > As soon as you change that slug, you've broken a link on the internet > that > > was previously NOT broken before. Even if you change the title, don't > change > > the slug. > > > > Django can figure out the "absolute_url" for what ever slug you pick. But > > once the link has been published _outside_ your site, you don't want to > have > > broken links. Remember it's just a slug...just a url...the real title can > be > > what ever you want it to be. > > > > BUT if you want django to behave the way you're expecting, the great > thing > > about django is you can change it to behave that way. All it takes is a > > little customization of the change_view for the admin of your blog app > (or > > what ever app you want to change the behavior of). > > > > Hope that helps > > > > Nick (also) > > > > On Tue, Sep 14, 2010 at 3:10 PM, Nick < > iregisteratwebsiteswitht...@gmail.com > > > > > > > > > > > > > wrote: > > > Hello, > > > > > I'm running django 1.2.3 on a local server and am still quite new to > > > django. I was working with the "practical django projects second > > > edition" book and implemented the prepopulated_fields option to auto > > > populate slugs from titles. > > > > > It works when I add a new post but it does not work when I edit the > > > post, is this working as intended or broken? It seems for this option > > > to be useful it must update on change as well. If that's not a > > > supported option what can I do to hack it in? > > > > > The code I am using is (admin.py): > > > > > class CategoryAdmin(admin.ModelAdmin): > > >prepopulated_fields = { 'slug': ['title'] } > > > > > class EntryAdmin(admin.ModelAdmin): > > >prepopulated_fields = { 'slug': ['title'] } > > > > > class LinkAdmin(admin.ModelAdmin): > > >prepopulated_fields = { 'slug': ['title'] } > > > > > admin.site.register(Category, CategoryAdmin) > > > admin.site.register(Entry, EntryAdmin) > > > admin.site.register(Link, LinkAdmin) > > > > > I also tried using the django documentation's syntax with no luck, it > > > resulted in the same broken functionality. I tried it with Opera 10.x > > > and IE8, same results. > > > > > Also there appears to be a massive problem with the CSS when using the > > > filter sidebar. The admin is designed to be fluid width and > > > automatically generates the proper fluid width of columns but it fails > > > to make the column widths fluid when the filter sidebar is enabled. > > > > > Is there a known hack to correct this? It looks very awkward when you > > > have a 1600 width screen and 3 or 4 columns are shrunken to 75-100 > > > pixels wide with a 1000 pixel white space before it shows the sidebar. > > > > > Thanks, > > > Nick > > > > > -- > > > You received this message because you are subscribed to the Google > Groups > > > "Django users" group. > > > To post to this group, send email to django-us...@googlegroups.com. > > > To unsubscribe from this group, send email to > > > django-users+unsubscr...@googlegroups.com > > > > . > > > For more options, visit this group at > > >http://groups.google.com/group/django-users?hl=en. > > > > -- > > Guadajuko! Vamos a correr! > > -"Cool! we are going to run!" > > -- > You received this message because you are subscribed to the Google Groups > "D
Re: prepopulated_fields problem (+admin CSS issues)
Yeah that makes sense. I guess we just need to be more careful when adding live posts. Maybe it wouldn't be a bad idea to add the functionality on change if a post is anything but live. This way the slug stays relevant to the title for drafts if the editor feels like experimenting with different titles. As for my second question. Can you not help because you haven't experienced this issue, or is it something you just don't have a problem with? On Sep 14, 11:20 am, "nick.l...@gmail.com" wrote: > Nick, > > I can answer you first question...but not really the second...hopefully > someone else will come and explain that one to you... > > re slugs: The prepopulated_fields are working as intended. > > The reason being, say you've written a blog post. You've send that link out > to thousands and millions of people. Then you realize that you wanted to > change a word in your title (hence changing the slug). > > As soon as you change that slug, you've broken a link on the internet that > was previously NOT broken before. Even if you change the title, don't change > the slug. > > Django can figure out the "absolute_url" for what ever slug you pick. But > once the link has been published _outside_ your site, you don't want to have > broken links. Remember it's just a slug...just a url...the real title can be > what ever you want it to be. > > BUT if you want django to behave the way you're expecting, the great thing > about django is you can change it to behave that way. All it takes is a > little customization of the change_view for the admin of your blog app (or > what ever app you want to change the behavior of). > > Hope that helps > > Nick (also) > > On Tue, Sep 14, 2010 at 3:10 PM, Nick > > > > > > wrote: > > Hello, > > > I'm running django 1.2.3 on a local server and am still quite new to > > django. I was working with the "practical django projects second > > edition" book and implemented the prepopulated_fields option to auto > > populate slugs from titles. > > > It works when I add a new post but it does not work when I edit the > > post, is this working as intended or broken? It seems for this option > > to be useful it must update on change as well. If that's not a > > supported option what can I do to hack it in? > > > The code I am using is (admin.py): > > > class CategoryAdmin(admin.ModelAdmin): > > prepopulated_fields = { 'slug': ['title'] } > > > class EntryAdmin(admin.ModelAdmin): > > prepopulated_fields = { 'slug': ['title'] } > > > class LinkAdmin(admin.ModelAdmin): > > prepopulated_fields = { 'slug': ['title'] } > > > admin.site.register(Category, CategoryAdmin) > > admin.site.register(Entry, EntryAdmin) > > admin.site.register(Link, LinkAdmin) > > > I also tried using the django documentation's syntax with no luck, it > > resulted in the same broken functionality. I tried it with Opera 10.x > > and IE8, same results. > > > Also there appears to be a massive problem with the CSS when using the > > filter sidebar. The admin is designed to be fluid width and > > automatically generates the proper fluid width of columns but it fails > > to make the column widths fluid when the filter sidebar is enabled. > > > Is there a known hack to correct this? It looks very awkward when you > > have a 1600 width screen and 3 or 4 columns are shrunken to 75-100 > > pixels wide with a 1000 pixel white space before it shows the sidebar. > > > Thanks, > > Nick > > > -- > > You received this message because you are subscribed to the Google Groups > > "Django users" group. > > To post to this group, send email to django-us...@googlegroups.com. > > To unsubscribe from this group, send email to > > django-users+unsubscr...@googlegroups.com > > . > > For more options, visit this group at > >http://groups.google.com/group/django-users?hl=en. > > -- > Guadajuko! Vamos a correr! > -"Cool! we are going to run!" -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: prepopulated_fields problem (+admin CSS issues)
Nick, I can answer you first question...but not really the second...hopefully someone else will come and explain that one to you... re slugs: The prepopulated_fields are working as intended. The reason being, say you've written a blog post. You've send that link out to thousands and millions of people. Then you realize that you wanted to change a word in your title (hence changing the slug). As soon as you change that slug, you've broken a link on the internet that was previously NOT broken before. Even if you change the title, don't change the slug. Django can figure out the "absolute_url" for what ever slug you pick. But once the link has been published _outside_ your site, you don't want to have broken links. Remember it's just a slug...just a url...the real title can be what ever you want it to be. BUT if you want django to behave the way you're expecting, the great thing about django is you can change it to behave that way. All it takes is a little customization of the change_view for the admin of your blog app (or what ever app you want to change the behavior of). Hope that helps Nick (also) On Tue, Sep 14, 2010 at 3:10 PM, Nick wrote: > Hello, > > I'm running django 1.2.3 on a local server and am still quite new to > django. I was working with the "practical django projects second > edition" book and implemented the prepopulated_fields option to auto > populate slugs from titles. > > It works when I add a new post but it does not work when I edit the > post, is this working as intended or broken? It seems for this option > to be useful it must update on change as well. If that's not a > supported option what can I do to hack it in? > > The code I am using is (admin.py): > > class CategoryAdmin(admin.ModelAdmin): >prepopulated_fields = { 'slug': ['title'] } > > class EntryAdmin(admin.ModelAdmin): >prepopulated_fields = { 'slug': ['title'] } > > class LinkAdmin(admin.ModelAdmin): >prepopulated_fields = { 'slug': ['title'] } > > admin.site.register(Category, CategoryAdmin) > admin.site.register(Entry, EntryAdmin) > admin.site.register(Link, LinkAdmin) > > I also tried using the django documentation's syntax with no luck, it > resulted in the same broken functionality. I tried it with Opera 10.x > and IE8, same results. > > Also there appears to be a massive problem with the CSS when using the > filter sidebar. The admin is designed to be fluid width and > automatically generates the proper fluid width of columns but it fails > to make the column widths fluid when the filter sidebar is enabled. > > Is there a known hack to correct this? It looks very awkward when you > have a 1600 width screen and 3 or 4 columns are shrunken to 75-100 > pixels wide with a 1000 pixel white space before it shows the sidebar. > > Thanks, > Nick > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-us...@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com > . > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > -- Guadajuko! Vamos a correr! -"Cool! we are going to run!" -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
prepopulated_fields problem (+admin CSS issues)
Hello, I'm running django 1.2.3 on a local server and am still quite new to django. I was working with the "practical django projects second edition" book and implemented the prepopulated_fields option to auto populate slugs from titles. It works when I add a new post but it does not work when I edit the post, is this working as intended or broken? It seems for this option to be useful it must update on change as well. If that's not a supported option what can I do to hack it in? The code I am using is (admin.py): class CategoryAdmin(admin.ModelAdmin): prepopulated_fields = { 'slug': ['title'] } class EntryAdmin(admin.ModelAdmin): prepopulated_fields = { 'slug': ['title'] } class LinkAdmin(admin.ModelAdmin): prepopulated_fields = { 'slug': ['title'] } admin.site.register(Category, CategoryAdmin) admin.site.register(Entry, EntryAdmin) admin.site.register(Link, LinkAdmin) I also tried using the django documentation's syntax with no luck, it resulted in the same broken functionality. I tried it with Opera 10.x and IE8, same results. Also there appears to be a massive problem with the CSS when using the filter sidebar. The admin is designed to be fluid width and automatically generates the proper fluid width of columns but it fails to make the column widths fluid when the filter sidebar is enabled. Is there a known hack to correct this? It looks very awkward when you have a 1600 width screen and 3 or 4 columns are shrunken to 75-100 pixels wide with a 1000 pixel white space before it shows the sidebar. Thanks, Nick -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: CSS Issues
Just for posterity, I wanted to note how I got css to work, both in my html files and my Django admin files, when using Django under Apache on Windows. My discoveries were a bit different than pacman's, but this thread was very helpful and I wanted to give something back. :) For me, it was a 4 step process. 1. Tell Apache to map webpaths to filesystem paths. 2. Tell Apache it's okay to access those filesystem paths. 3. Tell Apache not to use a handler for those webpaths. 4. Tell Django to use those webpaths for admin css files. The long version follows- 1. Add some alias paths in the apache conf. Since django's settings.py file expects to see web paths, you need to use apache's alias_module settings to map webpaths [using names of your choosing] into the filesystem paths where you want to direct django to look for css files. 2. The apache IfModule section has some recommendation comments around the Alias: section about adding sections to allow access to the directories. Follow those recommendations by adding the following to explicitly tell apache to allow access to the filesystem paths from step 1. Options FollowSymLinks AllowOverride None Order allow,deny Allow from all Options FollowSymLinks AllowOverride None Order allow,deny Allow from all 3. Using django's recommended Location directives in apache's conf, set handlers to None for the css webpaths. # (my chosen alias from step 1, suffixed with my css dir) SetHandler None # (my chosen alias from step 1, suffixed with django's css dir) SetHandler None 4. Tell django the webpath to use when looking for it's admin media (css) files. ADMIN_MEDIA_PREFIX = "/django_admin/media/" There is no need to tell django about my own css files, since I describe them within my html files - Good luck to those who follow... --~--~-~--~~~---~--~~ 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, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: CSS Issues
Thanks for you help everyone I finally figured it out. I created another virtual host to serve my media and it worked. Looks like this: ServerAdmin [EMAIL PROTECTED] ServerName media.abc.net DocumentRoot /srv/django_site/media/ Options None AllowOverride None Order allow,deny allow from all Not sure if this is the proper way of doing it but it works. Should there be some documentation of the django website for serving media this way? Thanks again. --~--~-~--~~~---~--~~ 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, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: CSS Issues
Ok I tried the sym link method and that doesn't seem to work. Grady, what are you referencing from the documentation? Are you referring to the tags? If so I have those tossed within the virtualhost tag. Should I make those global and not within a virtual host tag? On Jan 7, 4:51 am, Collin Grady <[EMAIL PROTECTED]> wrote: > As zodman is getting at, django does not map your media for you - you > have to do that. > > http://www.djangoproject.com/documentation/modpython/#serving-media-f... --~--~-~--~~~---~--~~ 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, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: CSS Issues
As zodman is getting at, django does not map your media for you - you have to do that. http://www.djangoproject.com/documentation/modpython/#serving-media-files --~--~-~--~~~---~--~~ 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, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: CSS Issues
define as /srv/ your documentroot on apache virtualhost. change 755 permission to your /srv/abc/media dir put a symbolic link on /srv/media --> /srv/abc/media/ rember when the navegator search on django.abc.com/media/ search /media dir for /media/ location on your documentroot William Siegrist escribió: > bah, nevermind, I should try reading more carefully, as you're not using > the test server. :) > > Sorry. > > Might be a conflict with using /media/ for both admin and static files? > > -Bill > > > On Jan 6, 2008, at 9:12 PM, pacman wrote: > >> >> Hi, I have a strange issue with my css not loading. CSS and Images >> seem to work fine for the admin portion of the site but when I try to >> add my own CSS it can't seem to find it. >> >> my variables look as such: >> >> MEDIA_ROOT = '/srv/abc/media/' >> MEDIA_URL = 'http://www.abc.net/media/' >> ADMIN_MEDIA_PREFIX = 'http://www.abc.net/media/' >> >> I have a CSS link in a template file that looks like so but will not >> load: >> >> > href="Http://www.abc.net/media/ >> css/styling.css" /> >> I point my browser to the link and it seems to show the default admin >> stuff suchas the css, js, and image files but it doesn't show the >> stuff that I have tossed into that directory such as the styling.css. >> >> my apache config looks like this: >> >> >>ServerName django.abc.net >>ServerAlias django >>ServerAdmin [EMAIL PROTECTED] >> >> >>SetHandler python-program >>PythonHandler django.core.handlers.modpython >>SetEnv DJANGO_SETTINGS_MODULE abc.settings >>PythonPath "['/srv','/srv/django-0.96-current','/srv/abc'] + >> sys.path" >>PythonDebug On >> >> >>SetHandler None >> >> >> >> >> for some reason I have to use the www.abc.com/media/ to get to where >> my media content is stored rather than what I assume should be like >> this django.abc.com/media/ since I set the handler to none within the >> virtual host tag. Anyone know why I have to use the first url as >> apposed to using the second one? >> >> >> Does anyone know why my css is not loading correctly but the admin css >> works fine? >> >> > > > > > > William Siegrist > Software Support Engineer > Mac OS Forge > http://macosforge.org/ > [EMAIL PROTECTED] > 408 862 7337 > > > > > --~--~-~--~~~---~--~~ 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, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: CSS Issues
define as /srv/ your documentroot on apache virtualhost. change 755 permission to your /srv/abc/media dir put a symbolic link on /srv/media --> /srv/abc/media/ rember when the navegator search on django.abc.com/media/ search /media dir for /media/ location on your documentroot William Siegrist escribió: > bah, nevermind, I should try reading more carefully, as you're not using > the test server. :) > > Sorry. > > Might be a conflict with using /media/ for both admin and static files? > > -Bill > > > On Jan 6, 2008, at 9:12 PM, pacman wrote: > >> >> Hi, I have a strange issue with my css not loading. CSS and Images >> seem to work fine for the admin portion of the site but when I try to >> add my own CSS it can't seem to find it. >> >> my variables look as such: >> >> MEDIA_ROOT = '/srv/abc/media/' >> MEDIA_URL = 'http://www.abc.net/media/' >> ADMIN_MEDIA_PREFIX = 'http://www.abc.net/media/' >> >> I have a CSS link in a template file that looks like so but will not >> load: >> >> > href="Http://www.abc.net/media/ >> css/styling.css" /> >> I point my browser to the link and it seems to show the default admin >> stuff suchas the css, js, and image files but it doesn't show the >> stuff that I have tossed into that directory such as the styling.css. >> >> my apache config looks like this: >> >> >>ServerName django.abc.net >>ServerAlias django >>ServerAdmin [EMAIL PROTECTED] >> >> >>SetHandler python-program >>PythonHandler django.core.handlers.modpython >>SetEnv DJANGO_SETTINGS_MODULE abc.settings >>PythonPath "['/srv','/srv/django-0.96-current','/srv/abc'] + >> sys.path" >>PythonDebug On >> >> >>SetHandler None >> >> >> >> >> for some reason I have to use the www.abc.com/media/ to get to where >> my media content is stored rather than what I assume should be like >> this django.abc.com/media/ since I set the handler to none within the >> virtual host tag. Anyone know why I have to use the first url as >> apposed to using the second one? >> >> >> Does anyone know why my css is not loading correctly but the admin css >> works fine? >> >> > > > > > > William Siegrist > Software Support Engineer > Mac OS Forge > http://macosforge.org/ > [EMAIL PROTECTED] > 408 862 7337 > > > > > --~--~-~--~~~---~--~~ 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, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: CSS Issues
bah, nevermind, I should try reading more carefully, as you're not using the test server. :) Sorry. Might be a conflict with using /media/ for both admin and static files? -Bill On Jan 6, 2008, at 9:12 PM, pacman wrote: Hi, I have a strange issue with my css not loading. CSS and Images seem to work fine for the admin portion of the site but when I try to add my own CSS it can't seem to find it. my variables look as such: MEDIA_ROOT = '/srv/abc/media/' MEDIA_URL = 'http://www.abc.net/media/' ADMIN_MEDIA_PREFIX = 'http://www.abc.net/media/' I have a CSS link in a template file that looks like so but will not load: css/styling.css" /> I point my browser to the link and it seems to show the default admin stuff suchas the css, js, and image files but it doesn't show the stuff that I have tossed into that directory such as the styling.css. my apache config looks like this: ServerName django.abc.net ServerAlias django ServerAdmin [EMAIL PROTECTED] SetHandler python-program PythonHandler django.core.handlers.modpython SetEnv DJANGO_SETTINGS_MODULE abc.settings PythonPath "['/srv','/srv/django-0.96-current','/srv/abc'] + sys.path" PythonDebug On SetHandler None for some reason I have to use the www.abc.com/media/ to get to where my media content is stored rather than what I assume should be like this django.abc.com/media/ since I set the handler to none within the virtual host tag. Anyone know why I have to use the first url as apposed to using the second one? Does anyone know why my css is not loading correctly but the admin css works fine? --~--~-~--~~~---~--~~ 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, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~--- William Siegrist Software Support Engineer Mac OS Forge http://macosforge.org/ [EMAIL PROTECTED] 408 862 7337 smime.p7s Description: S/MIME cryptographic signature
Re: CSS Issues
Have you tried this yet? http://www.djangoproject.com/documentation/static_files/ -Bill On Jan 6, 2008, at 9:12 PM, pacman wrote: Hi, I have a strange issue with my css not loading. CSS and Images seem to work fine for the admin portion of the site but when I try to add my own CSS it can't seem to find it. my variables look as such: MEDIA_ROOT = '/srv/abc/media/' MEDIA_URL = 'http://www.abc.net/media/' ADMIN_MEDIA_PREFIX = 'http://www.abc.net/media/' I have a CSS link in a template file that looks like so but will not load: css/styling.css" /> I point my browser to the link and it seems to show the default admin stuff suchas the css, js, and image files but it doesn't show the stuff that I have tossed into that directory such as the styling.css. my apache config looks like this: ServerName django.abc.net ServerAlias django ServerAdmin [EMAIL PROTECTED] SetHandler python-program PythonHandler django.core.handlers.modpython SetEnv DJANGO_SETTINGS_MODULE abc.settings PythonPath "['/srv','/srv/django-0.96-current','/srv/abc'] + sys.path" PythonDebug On SetHandler None for some reason I have to use the www.abc.com/media/ to get to where my media content is stored rather than what I assume should be like this django.abc.com/media/ since I set the handler to none within the virtual host tag. Anyone know why I have to use the first url as apposed to using the second one? Does anyone know why my css is not loading correctly but the admin css works fine? --~--~-~--~~~---~--~~ 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, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~--- William Siegrist Software Support Engineer Mac OS Forge http://macosforge.org/ [EMAIL PROTECTED] 408 862 7337 smime.p7s Description: S/MIME cryptographic signature
CSS Issues
Hi, I have a strange issue with my css not loading. CSS and Images seem to work fine for the admin portion of the site but when I try to add my own CSS it can't seem to find it. my variables look as such: MEDIA_ROOT = '/srv/abc/media/' MEDIA_URL = 'http://www.abc.net/media/' ADMIN_MEDIA_PREFIX = 'http://www.abc.net/media/' I have a CSS link in a template file that looks like so but will not load: I point my browser to the link and it seems to show the default admin stuff suchas the css, js, and image files but it doesn't show the stuff that I have tossed into that directory such as the styling.css. my apache config looks like this: ServerName django.abc.net ServerAlias django ServerAdmin [EMAIL PROTECTED] SetHandler python-program PythonHandler django.core.handlers.modpython SetEnv DJANGO_SETTINGS_MODULE abc.settings PythonPath "['/srv','/srv/django-0.96-current','/srv/abc'] + sys.path" PythonDebug On SetHandler None for some reason I have to use the www.abc.com/media/ to get to where my media content is stored rather than what I assume should be like this django.abc.com/media/ since I set the handler to none within the virtual host tag. Anyone know why I have to use the first url as apposed to using the second one? Does anyone know why my css is not loading correctly but the admin css works fine? --~--~-~--~~~---~--~~ 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, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
fixing css issues
I'm brand new to Django. And, I was having a problem getting my CSS working. I searched the archives here and I saw lots of references from people having the same problems with CSS and some debates on how to go about making it work. But, I never saw anyone spell out exactly how they got it working. So, here's my verbose run down of what I did to get my css rendered. If any of it is incorrect, I trust that someone will correct me. This is based upon the fact that I have Django installed at: /usr/local/src/ and that I've already made it past the part of the installation documentation that instructs you to symlink it to the site-packages directory There are 3 directories (css, js and img) that you want to Apache to serve as static pages (without going through mod_python). All 3 directories are in the following path: /usr/local/src/django_src/django/contrib/admin/media/ Step 1. I navigated to my DocumentRoot directory and ran: ln -s /usr/local/src/django_src/django/contrib/admin/media/ media Alternative to step 1, I saw someone in the archives suggested putting the following in your stanza: alias /media /usr/local/src/django_src/django/contrib/admin/media/ Step 2. chown -R myApacheUser:myApacheUser /usr/local/src/django_src/django/ contrib/admin/media/ note: I never saw someone say it was OK to do this, but I had to to make mine work. Step 3. add this to my for this site: SetHandler None Step 4. retstart Apache /etc/init.d/apache2 restart --~--~-~--~~~---~--~~ 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, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: CSS issues
Great, works a treat! Thanks so much Tom --~--~-~--~~~---~--~~ 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, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: CSS issues
On 03/09/06 11:47, tomass wrote: > Hi Folks, > > I've copied the admin css to be used for my views, but I've added in > this custom section which is a modified version of the FILTER COLUMN > from changelist.css: > > /* FILTER COLUMN (CUSTOM VERSION) */ > > #changelist-filter-custom {position:absolute; top:0; right:0; > width:180px; border-left:1px solid #ddd; background:#efefef; margin:0;} > #changelist-filter-custom h2 {font-size:11px; padding:2px 5px; > border-bottom:1px solid #ddd;} > #changelist-filter-custom h3 {font-size:12px; margin-bottom:0;} > #changelist-filter-custom ul > {padding-left:0;margin-left:10px;_margin-right:-10px;} > #changelist-filter-custom li {list-style-type:none; margin-left:0; > padding-left:0;} > #changelist-filter-custom a {color:#999;} > #changelist-filter-custom a:hover {color:#036;} > #changelist-filter-custom li.selected {border-left:5px solid #ccc; > padding-left:5px;margin-left:-10px;} > #changelist-filter-custom li.selected a {color:#5b80b2 !important;} > > Basically what I've changed is the width in the first item (from 160px > to 180px, as well as removing the z-index so that a custom calendar > item pops up okay. Problem now is best illustrated with a picture: > http://www.greenleaftech.net/members/mthaddon/django_css > As you can see I have some trailing non-aligned part of the filtered > list, and the last column of the table gets run into the filtered list > at the top. > > Can anyone help out with some css magic? Search for the following rule in the file /media/css/changelists.css: .change-list .filtered table, .change-list .filtered .paginator, .filtered #toolbar, .filtered div.xfull { margin-right:160px !important; width:auto !important; } and change the margin-right to 180px. It's the sixt rule from the top in the unmodified css file. To get the changelist columns background to also be 180px from top to bottom you may have to make the following image 20px wider: /media/img/admin/changelist-bg.gif Don't know if that's all that needs changing. But it should get you started. cheers Steven --~--~-~--~~~---~--~~ 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, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
CSS issues
Hi Folks, I've copied the admin css to be used for my views, but I've added in this custom section which is a modified version of the FILTER COLUMN from changelist.css: /* FILTER COLUMN (CUSTOM VERSION) */ #changelist-filter-custom {position:absolute; top:0; right:0; width:180px; border-left:1px solid #ddd; background:#efefef; margin:0;} #changelist-filter-custom h2 {font-size:11px; padding:2px 5px; border-bottom:1px solid #ddd;} #changelist-filter-custom h3 {font-size:12px; margin-bottom:0;} #changelist-filter-custom ul {padding-left:0;margin-left:10px;_margin-right:-10px;} #changelist-filter-custom li {list-style-type:none; margin-left:0; padding-left:0;} #changelist-filter-custom a {color:#999;} #changelist-filter-custom a:hover {color:#036;} #changelist-filter-custom li.selected {border-left:5px solid #ccc; padding-left:5px;margin-left:-10px;} #changelist-filter-custom li.selected a {color:#5b80b2 !important;} Basically what I've changed is the width in the first item (from 160px to 180px, as well as removing the z-index so that a custom calendar item pops up okay. Problem now is best illustrated with a picture: http://www.greenleaftech.net/members/mthaddon/django_css As you can see I have some trailing non-aligned part of the filtered list, and the last column of the table gets run into the filtered list at the top. Can anyone help out with some css magic? Thanks, Tom --~--~-~--~~~---~--~~ 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, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---