Re: Django Admin CSS Not Working

2018-11-26 Thread Manish Kumar
once  clear the cache and load admin page.

On Mon, Nov 26, 2018 at 3:29 PM Kayode Oladipo 
wrote:

> So, after about 3 months of my django admin CSS suddenly crashing and
> burning; it shows that the CSS is loaded in terminal. GET base.css 200 blah
> blah. However, it doesn't apply to the page when it is run in the browser.
> A little poking with the Style Editor in Firefox and Opera, and voila! The
> CSS is being applied.
>
> Refreshed the page, and the problem returns.
>
> Any help would be appreciated.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CA%2BARzD8d_78cr3zg3sqHqy6zECUi26UwqKBKaCkZzRC98PqHZw%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAEPRGCgCjWDckE%3DKc2BgAuX%3DFvxV-C4Zy2Pmm7rBGYo2u%2B6s%2Bw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django Admin CSS Not loading

2018-07-11 Thread ADEWALE ADISA
UC browser doesn't render some website very well. Though uc browser is fast
and save bandwidth,  it's like it doesn't 100% compatible with css and js
rules.  So this not django issue
On Jul 11, 2018 3:07 PM, "Kayode Oladipo"  wrote:

> I have this problem specific to UC Browser;
> App related CSS are being loaded but the ones for Django admin panel are
> not.
> They load well in Internet Explorer but UC is my preferred browser.
>
> Anyone know how to fix this?
> Thanks for your help.
>
> Cheers from Nigeria.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/django-users/CA%2BARzD_Gio9JfxNC7TELowVKWBr8Omm%
> 3Dcv4Q6q36UQEiyWmnDQ%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAMGzuy9S%2B8Zxau7NJDsOgzWKzRk-UKdDRC2pDLus_FM-mVr80g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: django admin css not loading in localhost

2018-02-22 Thread Mike Dewhirst

On 23/02/2018 11:49 AM, anurag bhadauriya wrote:

i am using django-1.11.6. whenever i open my admin panel and login to it then 
it looks like the simple html file.  no any css files are loading .The 
interface i am seeing is totally different than that of the tutorials using 
which i am learning.please give me the stepwise solution


Are you serving your site on localhost using the development server? Is 
DEBUG set to True?


If so, ...

https://docs.djangoproject.com/en/1.11/howto/static-files/#serving-static-files-during-development

If not, you will need to run python manage.py collectstatic 
--settings=myproject.settings


https://docs.djangoproject.com/en/1.11/howto/static-files/#deployment








--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/609e71d6-7f3a-080d-9841-01a36cbc7a78%40dewhirst.com.au.
For more options, visit https://groups.google.com/d/optout.


Re: django admin css not loading in localhost

2018-02-22 Thread Costja Covtushenko
Hi,

Can you provide html code of that page here?

Regards,
Constantine C.

> On Feb 22, 2018, at 7:49 PM, anurag bhadauriya  
> wrote:
> 
> i am using django-1.11.6. whenever i open my admin panel and login to it then 
> it looks like the simple html file.  no any css files are loading .The 
> interface i am seeing is totally different than that of the tutorials using 
> which i am learning.please give me the stepwise solution
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/0d68a248-fa11-4924-aaed-d88adfc284b2%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/1D92EB99-C051-4A94-A4FC-EB16FC5B1622%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django HTML5 & CSS validation - Best Practice?

2014-06-06 Thread Bob Cochran

On 06/05/2014 08:33 PM, 77c...@gmail.com wrote:
what is the best practice to validate HTML5 and CSS? 


I use this: http://validator.w3.org/ & http://jigsaw.w3.org/css-validator/

Is there something better?

Bob

--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/53929082.4020007%40mindchasers.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django Admin CSS missing

2013-08-20 Thread Glenn Vulkers
And it's working, thanks alot!

Op dinsdag 20 augustus 2013 18:35:35 UTC+2 schreef Glenn Vulkers:
>
> Hello everyone,
>
> I'm just reading throught djangobook.com where I came to Chapter 6 so 
> far. It's about The Django Admin. I installed the admin and such
> but I notice that the CSS is missing. Does anyone know what to do? I'm 
> running Python2.7
>
> Glenn
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Django Admin CSS missing

2013-08-20 Thread Alex Franco
There you have your problem and answer... uncomment these lines:

   # 'django.middleware.csrf.CsrfViewMiddleware',

# 'django.contrib.sites',
# 'django.contrib.staticfiles',
# 'django.contrib.admin',

Voilà!

--
@jafrancov


On Tuesday, August 20, 2013 11:59:28 AM UTC-5, Glenn Vulkers wrote:
>
> I'm running manage.py runserver.
> Django version is: 1.5.1
>
> in Settings.py I have this:
>
> MIDDLEWARE_CLASSES = (
>  'django.middleware.common.CommonMiddleware',
>  'django.contrib.sessions.middleware.SessionMiddleware',
> # 'django.middleware.csrf.CsrfViewMiddleware',
>  'django.contrib.auth.middleware.AuthenticationMiddleware',
>  'django.contrib.messages.middleware.MessageMiddleware',
> # Uncomment the next line for simple clickjacking protection:
> # 'django.middleware.clickjacking.XFrameOptionsMiddleware',
> )
>
> And this:
>
> INSTALLED_APPS = (
>  'django.contrib.auth',
>  'django.contrib.contenttypes',
>  'django.contrib.sessions',
> # 'django.contrib.sites',
>  'django.contrib.messages',
> # 'django.contrib.staticfiles',
> # Uncomment the next line to enable the admin:
> # 'django.contrib.admin',
> # Uncomment the next line to enable admin documentation:
> # 'django.contrib.admindocs',
> 'books',
> 'django.contrib.admin',
> )
>
> And then did syncdb in the shell.
>
> In urls.py :
> from django.contrib import admin
> admin.autodiscover()
>
> And made a urlpatterns
>
>
>
>
> Op dinsdag 20 augustus 2013 18:44:09 UTC+2 schreef ke1g:
>>
>> Not enough information.
>>
>> Django works fine with python2.7, so we would need to know, for example, 
>> which version of Django, how you installed it, whether you are using 
>> manage.py runserver or whether you are running behind Apache or something 
>> else, and what exactly you mean by "I installed the admin and such"
>>
>>
>> On Tue, Aug 20, 2013 at 12:35 PM, Glenn Vulkers > > wrote:
>>
>>> Hello everyone,
>>>
>>> I'm just reading throught djangobook.com where I came to Chapter 6 so 
>>> far. It's about The Django Admin. I installed the admin and such
>>> but I notice that the CSS is missing. Does anyone know what to do? I'm 
>>> running Python2.7
>>>
>>> Glenn
>>>
>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Django users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to django-users...@googlegroups.com.
>>> To post to this group, send email to django...@googlegroups.com.
>>> Visit this group at http://groups.google.com/group/django-users.
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Django Admin CSS missing

2013-08-20 Thread Glenn Vulkers
I'm running manage.py runserver.
Django version is: 1.5.1

in Settings.py I have this:

MIDDLEWARE_CLASSES = (
 'django.middleware.common.CommonMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
# 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
# Uncomment the next line for simple clickjacking protection:
# 'django.middleware.clickjacking.XFrameOptionsMiddleware',
)

And this:

INSTALLED_APPS = (
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
# 'django.contrib.sites',
 'django.contrib.messages',
# 'django.contrib.staticfiles',
# Uncomment the next line to enable the admin:
# 'django.contrib.admin',
# Uncomment the next line to enable admin documentation:
# 'django.contrib.admindocs',
'books',
'django.contrib.admin',
)

And then did syncdb in the shell.

In urls.py :
from django.contrib import admin
admin.autodiscover()

And made a urlpatterns




Op dinsdag 20 augustus 2013 18:44:09 UTC+2 schreef ke1g:
>
> Not enough information.
>
> Django works fine with python2.7, so we would need to know, for example, 
> which version of Django, how you installed it, whether you are using 
> manage.py runserver or whether you are running behind Apache or something 
> else, and what exactly you mean by "I installed the admin and such"
>
>
> On Tue, Aug 20, 2013 at 12:35 PM, Glenn Vulkers 
>  > wrote:
>
>> Hello everyone,
>>
>> I'm just reading throught djangobook.com where I came to Chapter 6 so 
>> far. It's about The Django Admin. I installed the admin and such
>> but I notice that the CSS is missing. Does anyone know what to do? I'm 
>> running Python2.7
>>
>> Glenn
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to django-users...@googlegroups.com .
>> To post to this group, send email to django...@googlegroups.com
>> .
>> Visit this group at http://groups.google.com/group/django-users.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Django Admin CSS missing

2013-08-20 Thread Alex Franco
Are not missing, but if you are following the djangobook you probably 
commented something in your settings file as you did on chapter 5, review 
the middleware, staticfiles and templeate loaders lines, the issue is 
probably there.

On Tuesday, August 20, 2013 11:35:35 AM UTC-5, Glenn Vulkers wrote:
>
> Hello everyone,
>
> I'm just reading throught djangobook.com where I came to Chapter 6 so 
> far. It's about The Django Admin. I installed the admin and such
> but I notice that the CSS is missing. Does anyone know what to do? I'm 
> running Python2.7
>
> Glenn
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Django Admin CSS missing

2013-08-20 Thread Bill Freeman
Not enough information.

Django works fine with python2.7, so we would need to know, for example,
which version of Django, how you installed it, whether you are using
manage.py runserver or whether you are running behind Apache or something
else, and what exactly you mean by "I installed the admin and such"


On Tue, Aug 20, 2013 at 12:35 PM, Glenn Vulkers <
luksindit-tjopt...@hotmail.com> wrote:

> Hello everyone,
>
> I'm just reading throught djangobook.com where I came to Chapter 6 so
> far. It's about The Django Admin. I installed the admin and such
> but I notice that the CSS is missing. Does anyone know what to do? I'm
> running Python2.7
>
> Glenn
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


RE: Django Template CSS Load Path

2011-01-30 Thread Chris Matthews
change
href='{{ MEDIA_URL }}/static/PageStyle.css' />
to
href='{{ MEDIA_URL }}static/PageStyle.css' />

-Original Message-
From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On 
Behalf Of octopusgrabbus
Sent: 29 January 2011 21:17
To: Django users
Subject: Re: Django Template CSS Load Path

I still cannot get the css page to load.

On Jan 19, 4:02 pm, Matías Iturburu <maturb...@gmail.com> wrote:
> On Wed, Jan 19, 2011 at 5:30 PM, Eduardo Cereto Carvalho <
>
> eduardocer...@gmail.com> wrote:
> > You can use MEDIA_URL conf to get the root path to your media files.
>
> >  > />
>

My MEDIA_URL is MEDIA_URL = 'http://localhost:8002/'

I have added 
to my base template.

I'm not sure what changes I'm supposed to make regarding
TEMPLATE_CONTEXT_PROCESSORS. I don't have that constant in my
settings.py nor do I have   'django.core.context_processors.request'
or 'django.core.context_processors.media' in any of my application
files.

tnx
cmn

> the above code is correct, just make sure that you are using the media
> context processor or returning a RequestContext, not just plain Context.
> Check out your settings.py for this one of this in the
> TEMPLATE_CONTEXT_PROCESSORS constant.
>
> 'django.core.context_processors.request',
> 'django.core.context_processors.media',
>
>
>
>
>
> > On Wed, Jan 19, 2011 at 5:55 PM, octopusgrabbus <old_road_f...@verizon.net
> > > wrote:
>
> >> I am trying to load a css file in my base.html template
>
> >> 
> >>
> >>
> >>{% block title %}Test{% endblock %} 
> >>
> >>   
>
> >> What kind of path is supposed to go in the href? Is it relative to the
> >> document root?
>
> >> Does anyone have an example of loading a css file including the Apache
> >> configuration?
>
> >> Thanks.
> >> cmn
>
> >> --
> >> 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<django-users%2bunsubscr...@googlegroups.com>
> >> .
> >> For more options, visit this group at
> >>http://groups.google.com/group/django-users?hl=en.
>
> > --
> > Eduardo Cereto Carvalho
>
> > --
> > 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<django-users%2bunsubscr...@googlegroups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/django-users?hl=en.
>
> --
> Matías Iturburuhttp://www.linkedin.com/in/miturburu|http://ltmo.com.ar

-- 
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.

-- 
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: Django Template CSS Load Path

2011-01-29 Thread octopusgrabbus
Interestingly, I added

TEMPLATE_CONTEXT_PROCESSORS = (
'django.core.context_processors.request',
'django.core.context_processors.media',
)

to my settings.py and got this error.

Put 'django.contrib.auth.context_processors.auth' in your
TEMPLATE_CONTEXT_PROCESSORS setting in order to use the admin
application.

My vhosts log file shows the css is being fetched. There are no
errors. But I am not seeing the page color change to light blue.

tnx
cmn

On Jan 19, 4:02 pm, Matías Iturburu  wrote:
> On Wed, Jan 19, 2011 at 5:30 PM, Eduardo Cereto Carvalho <
>
> eduardocer...@gmail.com> wrote:
> > You can use MEDIA_URL conf to get the root path to your media files.
>
> >  > />
>
> the above code is correct, just make sure that you are using the media
> context processor or returning a RequestContext, not just plain Context.
> Check out your settings.py for this one of this in the
> TEMPLATE_CONTEXT_PROCESSORS constant.
>
>     'django.core.context_processors.request',
>     'django.core.context_processors.media',
>
>
>
>
>
> > On Wed, Jan 19, 2011 at 5:55 PM, octopusgrabbus  > > wrote:
>
> >> I am trying to load a css file in my base.html template
>
> >> 
> >>    
> >>    
> >>        {% block title %}Test{% endblock %} 
> >>        
> >>   
>
> >> What kind of path is supposed to go in the href? Is it relative to the
> >> document root?
>
> >> Does anyone have an example of loading a css file including the Apache
> >> configuration?
>
> >> Thanks.
> >> cmn
>
> >> --
> >> 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.
>
> > --
> > Eduardo Cereto Carvalho
>
> > --
> > 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.
>
> --
> Matías Iturburuhttp://www.linkedin.com/in/miturburu|http://ltmo.com.ar

-- 
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: Django Template CSS Load Path

2011-01-29 Thread octopusgrabbus
I still cannot get the css page to load.

On Jan 19, 4:02 pm, Matías Iturburu  wrote:
> On Wed, Jan 19, 2011 at 5:30 PM, Eduardo Cereto Carvalho <
>
> eduardocer...@gmail.com> wrote:
> > You can use MEDIA_URL conf to get the root path to your media files.
>
> >  > />
>

My MEDIA_URL is MEDIA_URL = 'http://localhost:8002/'

I have added 
to my base template.

I'm not sure what changes I'm supposed to make regarding
TEMPLATE_CONTEXT_PROCESSORS. I don't have that constant in my
settings.py nor do I have   'django.core.context_processors.request'
or 'django.core.context_processors.media' in any of my application
files.

tnx
cmn

> the above code is correct, just make sure that you are using the media
> context processor or returning a RequestContext, not just plain Context.
> Check out your settings.py for this one of this in the
> TEMPLATE_CONTEXT_PROCESSORS constant.
>
> 'django.core.context_processors.request',
> 'django.core.context_processors.media',
>
>
>
>
>
> > On Wed, Jan 19, 2011 at 5:55 PM, octopusgrabbus  > > wrote:
>
> >> I am trying to load a css file in my base.html template
>
> >> 
> >>
> >>
> >>{% block title %}Test{% endblock %} 
> >>
> >>   
>
> >> What kind of path is supposed to go in the href? Is it relative to the
> >> document root?
>
> >> Does anyone have an example of loading a css file including the Apache
> >> configuration?
>
> >> Thanks.
> >> cmn
>
> >> --
> >> 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.
>
> > --
> > Eduardo Cereto Carvalho
>
> > --
> > 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.
>
> --
> Matías Iturburuhttp://www.linkedin.com/in/miturburu|http://ltmo.com.ar

-- 
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: Django Template CSS Load Path

2011-01-19 Thread Matías Iturburu
On Wed, Jan 19, 2011 at 5:30 PM, Eduardo Cereto Carvalho <
eduardocer...@gmail.com> wrote:

> You can use MEDIA_URL conf to get the root path to your media files.
>
>  />
>
>
the above code is correct, just make sure that you are using the media
context processor or returning a RequestContext, not just plain Context.
Check out your settings.py for this one of this in the
TEMPLATE_CONTEXT_PROCESSORS constant.

'django.core.context_processors.request',
'django.core.context_processors.media',



>
> On Wed, Jan 19, 2011 at 5:55 PM, octopusgrabbus  > wrote:
>
>> I am trying to load a css file in my base.html template
>>
>> 
>>
>>
>>{% block title %}Test{% endblock %} 
>>
>>   
>>
>> What kind of path is supposed to go in the href? Is it relative to the
>> document root?
>>
>> Does anyone have an example of loading a css file including the Apache
>> configuration?
>>
>> Thanks.
>> cmn
>>
>> --
>> 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.
>>
>>
>
>
> --
> Eduardo Cereto Carvalho
>
> --
> 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.
>



-- 
Matías Iturburu
http://www.linkedin.com/in/miturburu | http://ltmo.com.ar

-- 
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: Django Template CSS Load Path

2011-01-19 Thread Eduardo Cereto Carvalho
You can use MEDIA_URL conf to get the root path to your media files.




On Wed, Jan 19, 2011 at 5:55 PM, octopusgrabbus
wrote:

> I am trying to load a css file in my base.html template
>
> 
>
>
>{% block title %}Test{% endblock %} 
>
>   
>
> What kind of path is supposed to go in the href? Is it relative to the
> document root?
>
> Does anyone have an example of loading a css file including the Apache
> configuration?
>
> Thanks.
> cmn
>
> --
> 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.
>
>


-- 
Eduardo Cereto Carvalho

-- 
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: django admin css problem

2010-12-02 Thread octopusgrabbus
I failed to provide the following information in a similar post, and
it slowed down responses.

1) What web server are you using? If it is not the built in
development server, please provide the configuration for Django.

2) Check your application's settings.py file and make sure the
appropriate items are uncommented to allow the admin site to run, like
the following (partial list)

INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'amr.login',
'amr.inventory_check',
# Uncomment the next line to enable the admin:
'django.contrib.admin',
# Uncomment the next line to enable admin documentation:
'django.contrib.admindocs',
)

from urls.py

urlpatterns = patterns('',
.
.
.
# Uncomment the admin/doc line below to enable admin
documentation:
(r'^admin/doc/', include('django.contrib.admindocs.urls')),

# Uncomment the next line to enable the admin:
(r'^admin/', include(admin.site.urls)),
)

Is there anything pertinent in your web server's logs?
cmn

On Dec 2, 1:17 pm, ozgur yilmaz  wrote:
> Hi,
>
> Yesterday i moved my site to a linux solution. Everything is going
> fine, except admin site. When i go to url example.com/admin, the
> template doesnt work. When i look at the source, i see these:
>
> 
> 
>
> But i dont have any urls or files on example.com/media/css/base.css
>
> or
>
> example.com/media/css/login.css
>
> How can i fix this problem? When working on localhost with
> "runserver", these CSS files are NOT missing.
>
> Do you have any idea?
>
> Thanks,

-- 
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: django admin css problem

2010-12-02 Thread ozgur yilmaz
I found the answer. The problem was about the apache (httpd) configuration.

When i add the following to httpd config, the problem is solved:


AllowOverride None
Options None
Order allow,deny
Allow from all


Alias /media/ "Path-to-Python/Lib/site-packages/django/contrib/admin/media/"




2010/12/2 ozgur yilmaz :
> Hi,
>
> Yesterday i moved my site to a linux solution. Everything is going
> fine, except admin site. When i go to url example.com/admin, the
> template doesnt work. When i look at the source, i see these:
>
> 
> 
>
> But i dont have any urls or files on example.com/media/css/base.css
>
> or
>
> example.com/media/css/login.css
>
> How can i fix this problem? When working on localhost with
> "runserver", these CSS files are NOT missing.
>
> Do you have any idea?
>
> Thanks,
>

-- 
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: Django 1.0.2 + CSS how to?

2009-08-30 Thread adelaide_mike

Thank you Mike Ramirez.  [1] makes a difference.  I now see the css
taking effect.

Mike

On Aug 30, 8:55 am, Mike Ramirez  wrote:
> On Saturday 29 August 2009 04:35:11 pm adelaide_mike wrote:
>
>
>
> > As a very newbie I am struggling to understand how to use CSS.  I read
> > in
>
> >http://docs.djangoproject.com/en/dev/topics/forms/media/#paths-in-med...
> >initions
>
> > that I need to write:
> > class Media:
> >         css = {
> >         'screen': ('pretty.css',),
> >         'print': ('newspaper.css',)
> >     }
>
> > for example.
>
> > Where is this code placed, in which file?  Is this what I should do?
> > Any help or pointers to additional docs for beginners would be
> > appreciated.
>
> > Mike
>
> That's specifically for forms, that code would go in your forms.py file
> normally. The actual css files would be served over your MEDIA_URL.
>
> Media in general would be served over the static files, in your MEDIA_ROOT
> direcotry. You'll need to set up django or your httpd to serve static media
> over the MEDIA_URL[1]. Once this is done, you can add in css through the
> template using the link html tag.
>
> There is a template context processor that allows you to use {{ MEDIA_URL }}
> in your templates [2] That will make using the link tag easier. The only
> problem with this is that if you use styles with the url() setting, you'll
> need to change these manually (search and replace works) in your *.css files
> or you can write a manage.py command to update the css files for you, when
> switching media servers.
>
> example of MEDIA_ROOT:
>
>   app/media
>   app/media/css
>   app/media/js
>   app/media/images
>
> example of using media in a template:
>    media="screen" charset="utf-8" />
>
> The files that you have defined for your form media should go in a similar
> place and the paths are relative to your MEDIA_URL.
>
> The default.css for me is a site wide style sheet and I put most of the styles
> in there. I don't use the metaclass Media, unless the form field needs a
> specific style.
>
> I hope this helps,
>
> Mike
>
> [1]http://docs.djangoproject.com/en/dev/howto/static-files/
> [2]http://docs.djangoproject.com/en/dev/ref/templates/api/#django-core-c...
>
> --
> As I was walking down the street one dark and dreary day,
> I came upon a billboard and much to my dismay,
> The words were torn and tattered,
> From the storm the night before,
> The wind and rain had done its work and this is how it goes,
>
> Smoke Coca-Cola cigarettes, chew Wrigleys Spearmint beer,
> Ken-L-Ration dog food makes your complexion clear,
> Simonize your baby in a Hershey candy bar,
> And Texaco's a beauty cream that's used by every star.
>
> Take your next vacation in a brand new Frigedaire,
> Learn to play the piano in your winter underwear,
> Doctors say that babies should smoke until they're three,
> And people over sixty-five should bathe in Lipton tea.
>
>  signature.asc
> < 1KViewDownload
--~--~-~--~~~---~--~~
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: Django 1.0.2 + CSS how to?

2009-08-29 Thread Mike Ramirez
On Saturday 29 August 2009 04:35:11 pm adelaide_mike wrote:
> As a very newbie I am struggling to understand how to use CSS.  I read
> in
>
> http://docs.djangoproject.com/en/dev/topics/forms/media/#paths-in-media-def
>initions
>
> that I need to write:
> class Media:
> css = {
> 'screen': ('pretty.css',),
> 'print': ('newspaper.css',)
> }
>
> for example.
>
> Where is this code placed, in which file?  Is this what I should do?
> Any help or pointers to additional docs for beginners would be
> appreciated.
>
> Mike

That's specifically for forms, that code would go in your forms.py file 
normally. The actual css files would be served over your MEDIA_URL.

Media in general would be served over the static files, in your MEDIA_ROOT 
direcotry. You'll need to set up django or your httpd to serve static media 
over the MEDIA_URL[1]. Once this is done, you can add in css through the 
template using the link html tag.

There is a template context processor that allows you to use {{ MEDIA_URL }} 
in your templates [2] That will make using the link tag easier. The only 
problem with this is that if you use styles with the url() setting, you'll 
need to change these manually (search and replace works) in your *.css files 
or you can write a manage.py command to update the css files for you, when 
switching media servers. 

example of MEDIA_ROOT:

  app/media
  app/media/css
  app/media/js
  app/media/images

example of using media in a template:
  

The files that you have defined for your form media should go in a similar 
place and the paths are relative to your MEDIA_URL.

The default.css for me is a site wide style sheet and I put most of the styles 
in there. I don't use the metaclass Media, unless the form field needs a 
specific style.

I hope this helps,

Mike

[1] http://docs.djangoproject.com/en/dev/howto/static-files/
[2] 
http://docs.djangoproject.com/en/dev/ref/templates/api/#django-core-context-processors-media

-- 
As I was walking down the street one dark and dreary day,
I came upon a billboard and much to my dismay,
The words were torn and tattered,
From the storm the night before,
The wind and rain had done its work and this is how it goes,

Smoke Coca-Cola cigarettes, chew Wrigleys Spearmint beer,
Ken-L-Ration dog food makes your complexion clear,
Simonize your baby in a Hershey candy bar,
And Texaco's a beauty cream that's used by every star.

Take your next vacation in a brand new Frigedaire,
Learn to play the piano in your winter underwear,
Doctors say that babies should smoke until they're three,
And people over sixty-five should bathe in Lipton tea.


signature.asc
Description: This is a digitally signed message part.


Re: Django, CMS, CSS newbie question

2009-08-13 Thread Matthias Kestenholz

On Thu, Aug 13, 2009 at 11:55 PM, eldonp2 wrote:
>
> Thanks.
>
> I've gone through the book and done the tutorial on djangoproject.com
>
> Basically, my qyestion is still not answered - how do I start with a
> CSS template and bring Django and Django-CMS in afterward? The problem
> is with learning Python, HTML and Django, it will take a long time
> before I get to know CSS.
>

Trying  to start with Django-CMS (or any comparable software package
for that matter) before you know how to work with CSS files inside
Django is akin to trying to run before you can walk. You'll have to do
lots of reading and some coding before you'll be able to do what you
want to do. Django isn't a turn-key solution. It's a programmers tool.
And nobody can teach you to program using lots of emails, you have to
learn it yourself. And yes, it will take a long time[0].

If you have a more specific question I (and others) will be happy to
try to answer it. One could write a book trying to answer your
question and still not succeed. And there _are_ good books which will
bring you there. www.djangobook.com is one of these.

I do not want to offend or discourage you, but I doubt that you really
went through the book if you still need to ask how to get started with
Django and CSS. Really, try to start with the basics, that is, set up
a simple site with Django, and only then start thinking about working
with prebuilt CMS systems.



[0]: http://norvig.com/21-days.html : Teach Yourself Programming in Ten Years

-- 
FeinCMS Django CMS building toolkit: http://spinlock.ch/pub/feincms/

--~--~-~--~~~---~--~~
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: Django, CMS, CSS newbie question

2009-08-13 Thread eldonp2

Thanks.

I've gone through the book and done the tutorial on djangoproject.com

Basically, my qyestion is still not answered - how do I start with a
CSS template and bring Django and Django-CMS in afterward? The problem
is with learning Python, HTML and Django, it will take a long time
before I get to know CSS.

On Aug 11, 5:57 pm, Juan Hernandez  wrote:
> you can start here
>
> www.djangobook.com
>
> On Tue, Aug 11, 2009 at 10:58 AM, eldonp2  wrote:
> > I would like to start my own website. I
> > figured, since I don't know much, that I would start with a CSS
> > template and work back. How can I use a free template and then
> > integrate Django-Cms and Django into it?
--~--~-~--~~~---~--~~
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: Django, CMS, CSS newbie question

2009-08-11 Thread Juan Hernandez
you can start here

www.djangobook.com

On Tue, Aug 11, 2009 at 10:58 AM, eldonp2  wrote:

> I would like to start my own website. I
> figured, since I don't know much, that I would start with a CSS
> template and work back. How can I use a free template and then
> integrate Django-Cms and Django into it?
>

--~--~-~--~~~---~--~~
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: Django and CSS

2009-06-18 Thread Brian Neal

On Jun 18, 2:50 pm, Chris DPS  wrote:
> Hi,
>
> I'm new to Django.
> I've read the 
> doc:http://docs.djangoproject.com/en/dev/howto/static-files/?from=olddocs
> which is about static files but still do not quite understand what to
> call everything and it isn't working
> On my development machine, I want to use this hack and not deal with
> other servers.
> Please help.
>
> here is my file structure:
>
> /mysite/  - has all the .py files
> /mysite/templates/  - has all the html templates
> /mysite/templates/path_media/ - has the CSS document and pictures
>
> Now, how should I modify this:
>
> (r'^site_media/(?P.*)$', 'django.views.static.serve',
>         {'document_root': '/path/to/media'})
>
> '/path/to/media' should be changed to what?

Mine looks like this:

from django.conf import settings
...
if settings.DEBUG:
   urlpatterns += patterns('',
  (r'^static/(?P.*)$', 'django.views.static.serve',
{'document_root': settings.MEDIA_ROOT}),
   )

>
> And is this what I want for my style href? :
>
> 

http://docs.djangoproject.com/en/dev/ref/templates/api/#django-core-context-processors-media

>
> What about when I pull an image using the css document:
>
> url("site_media/foo.jpg")

Paths inside CSS files are relative to the CSS files themselves. I
typically use relative paths inside CSS files, e.g.

url("../images/foo.jpg")

Best,
BN

--~--~-~--~~~---~--~~
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: Django site - CSS doesn't render in Safari/Webkit

2008-12-23 Thread Alfonso

OK tracked it down - appears Safari doesn't sit well with a
master .css file and @import url(blah.css);  I guess that's because of
the way I'm serving up static files.

Direct " wrote:
> Hey,
>
> I'm getting a weird issue in Django with my css and Safari - displays
> great in all browsers except for Safari.  Happens in two different
> django installations on two separate servers so clearly I'm doing
> something wrong.  CSS files are accessible directly via URL in both
> cases... odd
>
> Apart from the fact I'm prob missing something obvious in my code,
> anyone else come across that?!
>
> Thanks
>
> Al
--~--~-~--~~~---~--~~
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: Django and CSS

2008-08-29 Thread jgomo3

Juan Miguel: Confirm my suspects, thankyou.
varikin: how i didn't think on it before, thanyou.
--~--~-~--~~~---~--~~
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: Django and CSS

2008-08-28 Thread varikin

MEDIA_ROOT is the local path to the files on the server.  One place
this is used is with uploading files.  So uploaded files will be
placed in MEDIA_ROOT/some-upload-dir.  I don't know about other uses,
though.

John
--~--~-~--~~~---~--~~
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: Django and CSS

2008-08-27 Thread Juan Miguel
MEDIA_URL: Says what is the RELATIVE PATH to media files. So it is relative
to the root dir in server. Used when referring links in templates. I.E:
http://{{MEDIA_URL}}img/img.jpg. It has many other uses but the most
important is the one before.

MEDIA_ROOT: Says what is the ABSOLUTE PATH to media files. So, it is
relative to a LOCAL dir (in server or not). Used to say the exact dir (not
relative to any server) where media is.

I hope u to understand the difference better.

Up Django!

2008/8/27 jgomo3 <[EMAIL PROTECTED]>

>
> I have no problem serving static content, but i'm still confused about
> the MEDIA_ROOT and MEDIA_URL.
>
> Why the ROOT if i have the URL?
> how do you actually use those variables?
>
> In production and in develpment server i havent used them, i simply
> serve the statics content in some virtual server for that (avoiding
> the use of django.views.static.serve becuase it force many changes
> when passing thr project from the develpment server to apache).
>
> Are they used to avoid hard code the URL when referencing to things
> like css? (example, to avoid 'href="http://example.com/css/site.css;'
> and use 'href="http://%s/css/site.css' % MEDIA_URL).
> If that then:
>  Why the MEDIA_ROOT?
>  For accessing the media files vie the filesystem on views or
> someting?
>  If that then:
>It is confusing the comment on the setting file in the variable
> MEDIA_URL wich says "This URL handles the media served from
> MEDIA_ROOT" because the media files accessed via the MEDIA_URL doesn't
> have to be in the same machine. So, is intended that the two variables
> refer to the same files?
> >
>


-- 
---
Juan M.A.N.
---

--~--~-~--~~~---~--~~
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: Django and CSS

2008-08-27 Thread jgomo3

I have no problem serving static content, but i'm still confused about
the MEDIA_ROOT and MEDIA_URL.

Why the ROOT if i have the URL?
how do you actually use those variables?

In production and in develpment server i havent used them, i simply
serve the statics content in some virtual server for that (avoiding
the use of django.views.static.serve becuase it force many changes
when passing thr project from the develpment server to apache).

Are they used to avoid hard code the URL when referencing to things
like css? (example, to avoid 'href="http://example.com/css/site.css;'
and use 'href="http://%s/css/site.css' % MEDIA_URL).
If that then:
  Why the MEDIA_ROOT?
  For accessing the media files vie the filesystem on views or
someting?
  If that then:
It is confusing the comment on the setting file in the variable
MEDIA_URL wich says "This URL handles the media served from
MEDIA_ROOT" because the media files accessed via the MEDIA_URL doesn't
have to be in the same machine. So, is intended that the two variables
refer to the same 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: Django and CSS

2008-04-24 Thread Darryl Ross

Rodney Topor wrote:

OK, sorry for the unclear message.

I've now discovered that if I use an embedded CSS file in a template -
h1 { color: red} - then it works correctly.
But if I use an external CSS file in a template -  - then, even if the
style sheet only changes font colors, the effect is that the font
style is changed, the font size is changed, and the background
changes.  Now, perhaps the style sheet is not being found.


Assuming you mean 'unchanged', then it's quite likely. Especially if you 
haven't configured your web server to bypass django for loading the CSS 
files.



So, if my project has a directory structure "mysite/templates/app/
template.html", then in which directory should I place the CSS file?


The physical directory the template comes from has absolutely no bearing 
on the URL structure as far as the web server is concerned. What is 
important for external media files (which includes the CSS, any 
javascript files and the image files) is whether the web server knows 
how to find the files.


I put all my media files into a directory structure under the project 
directory called 'webroot'. And then use an 'Alias' option in Apache to 
point http://example.com/site-media/ to the webroot folder. You also 
need to tell it not to use mod_python or whatever mechanism you're using 
for django. In the template files I then reference the CSS like:


  

If you are using the generic views, or are passing an instance of 
RequestContext into the render_to_response function, and have MEDIA_URL 
set correctly in your settings.py file, then you can simplify this as:


  


This prompts me to ask a related question: If the mysite project has
two apps, is it better to have a separate templates directory within
each app, or a single template directory within the project with a
subdirectory for each app as suggested above, or a single template
directory containing all templates.  (The last solution seems wrong,
poorly structured.)


I do it both ways. If I think the app might be useful elsewhere or is 
pretty much self-container, then I will put them into the application 
directory. If they are specific to the website, or someone else is 
maintaining the HTML (I'm a programmer, not a artist!) then I'll put 
them in a top level templates folder.


Regards
Darryl

--

Darryl Ross
Director
AFOYI, "Information Technology Solutions"
p +61 8 7127 1831
f +61 8 8425 9607
e [EMAIL PROTECTED]




signature.asc
Description: OpenPGP digital signature


Re: Django and CSS

2008-04-24 Thread Erik Vorhes

Put your CSS files in your media directory. If your media url is
"http://yoursite/media/;, then you could do something like  and you should see your intended
style.



On Thu, Apr 24, 2008 at 10:01 PM, gmacgregor <[EMAIL PROTECTED]> wrote:
>
>
>  On Apr 24, 10:49 pm, Rodney Topor <[EMAIL PROTECTED]> wrote:
>  > So, if my project has a directory structure "mysite/templates/app/
>  > template.html", then in which directory should I place the CSS file?
>
>  You'll find this thread helpful:
>
>  
> http://groups.google.com/group/django-users/browse_thread/thread/906a11a1c86e13b0
>
>
>  > This prompts me to ask a related question: If the mysite project has
>  > two apps, is it better to have a separate templates directory within
>  > each app, or a single template directory within the project with a
>  > subdirectory for each app as suggested above, or a single template
>  > directory containing all templates.  (The last solution seems wrong,
>  > poorly structured.)
>
>  It's best to create a "templates" directory and then within that
>  directory create directories that correspond to each of your
>  application names:
>
>  project
> |
> templates
> |
>  blog
>  template.html
>  template.html
>  photos
>  template.html
>
>
>  Just make sure to set TEMPLATE_DIRS properly in your project's
>  settings file.
>
>  Greg
>
>
> >
>



-- 
portfolio: http://textivism.com/
blog: http://erikanderica.org/erik/

--~--~-~--~~~---~--~~
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: Django and CSS

2008-04-24 Thread gmacgregor


On Apr 24, 10:49 pm, Rodney Topor <[EMAIL PROTECTED]> wrote:
> So, if my project has a directory structure "mysite/templates/app/
> template.html", then in which directory should I place the CSS file?

You'll find this thread helpful:

http://groups.google.com/group/django-users/browse_thread/thread/906a11a1c86e13b0

> This prompts me to ask a related question: If the mysite project has
> two apps, is it better to have a separate templates directory within
> each app, or a single template directory within the project with a
> subdirectory for each app as suggested above, or a single template
> directory containing all templates.  (The last solution seems wrong,
> poorly structured.)

It's best to create a "templates" directory and then within that
directory create directories that correspond to each of your
application names:

project
|
templates
|
 blog
 template.html
 template.html
 photos
 template.html


Just make sure to set TEMPLATE_DIRS properly in your project's
settings file.

Greg
--~--~-~--~~~---~--~~
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: Django and CSS

2008-04-24 Thread Rodney Topor

OK, sorry for the unclear message.

I've now discovered that if I use an embedded CSS file in a template -
h1 { color: red} - then it works correctly.
But if I use an external CSS file in a template -  - then, even if the
style sheet only changes font colors, the effect is that the font
style is changed, the font size is changed, and the background
changes.  Now, perhaps the style sheet is not being found.

So, if my project has a directory structure "mysite/templates/app/
template.html", then in which directory should I place the CSS file?

This prompts me to ask a related question: If the mysite project has
two apps, is it better to have a separate templates directory within
each app, or a single template directory within the project with a
subdirectory for each app as suggested above, or a single template
directory containing all templates.  (The last solution seems wrong,
poorly structured.)

Rodney

On Apr 24, 12:51 pm, Darryl Ross <[EMAIL PROTECTED]> wrote:
> Rodney Topor wrote:
> > Is there something strange about using CSS with Django?  When I make
> > my templates refer to external CSS files, the appearance of the
> > template changes, but not the way the CSS file says it should?  Is
> > there something special I need to know about this?
>
> Nothing that I am aware of. It might help if you are able to paste a
> short snippet of the HTML and relevant CSS is that not appearing how you
> think it should.
>
> Regards
> -Darryl
>
>  signature.asc
> 1KDownload
--~--~-~--~~~---~--~~
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: Django and CSS

2008-04-23 Thread Darryl Ross

Rodney Topor wrote:

Is there something strange about using CSS with Django?  When I make
my templates refer to external CSS files, the appearance of the
template changes, but not the way the CSS file says it should?  Is
there something special I need to know about this?


Nothing that I am aware of. It might help if you are able to paste a 
short snippet of the HTML and relevant CSS is that not appearing how you 
think it should.


Regards
-Darryl



signature.asc
Description: OpenPGP digital signature


Re: Django Admin CSS Problems in Safari

2006-05-09 Thread Wilson Miner

I still haven't been able to confirm this particular display problem,
but adding the padding rule to #container doesn't break anything, so I
went ahead and commited that change.

On 4/29/06, parsch <[EMAIL PROTECTED]> wrote:
>
>
> Matthew Flanagan schrieb:
>
> > I can confirm that i'm seeing this padding issue in safari and the
> > webkit inspector shows:
> > padding-top:10px;
> > padding-right:20px;
> > padding-bottom:10px;
> > padding-left:20px;
> >
> > I've been seeing it since wilson did the split of all the css files a
> > while back but I thought it was something i had done. I just removed
> > all my css customizations and i'm still seeing it. Add "padding:0px;"
> > to #container in layout.css fixed it for me.
> >
>
> That works, thank you Matthew.
>
>
> >
>

--~--~-~--~~~---~--~~
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: Django Admin CSS Problems in Safari

2006-04-29 Thread parsch


Matthew Flanagan schrieb:

> I can confirm that i'm seeing this padding issue in safari and the
> webkit inspector shows:
> padding-top:10px;
> padding-right:20px;
> padding-bottom:10px;
> padding-left:20px;
>
> I've been seeing it since wilson did the split of all the css files a
> while back but I thought it was something i had done. I just removed
> all my css customizations and i'm still seeing it. Add "padding:0px;"
> to #container in layout.css fixed it for me.
> 

That works, thank you Matthew.


--~--~-~--~~~---~--~~
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: Django Admin CSS Problems in Safari

2006-04-28 Thread Matthew Flanagan

I can confirm that i'm seeing this padding issue in safari and the
webkit inspector shows:
padding-top:10px;
padding-right:20px;
padding-bottom:10px;
padding-left:20px;

I've been seeing it since wilson did the split of all the css files a
while back but I thought it was something i had done. I just removed
all my css customizations and i'm still seeing it. Add "padding:0px;"
to #container in layout.css fixed it for me.

On 4/29/06, James Bennett <[EMAIL PROTECTED]> wrote:
>
> On 4/28/06, parsch <[EMAIL PROTECTED]> wrote:
> > Thanks for your attention, I'll keep on trying to to find out what
> > causes the problem.
>
> If you go grab a WebKit nightly build, you can use its built-in
> inspector to try to isolate the problem.
>
> --
> "May the forces of evil become confused on the way to your house."
>   -- George Carlin
>
> >
>

--~--~-~--~~~---~--~~
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: Django Admin CSS Problems in Safari

2006-04-28 Thread James Bennett

On 4/28/06, parsch <[EMAIL PROTECTED]> wrote:
> Thanks for your attention, I'll keep on trying to to find out what
> causes the problem.

If you go grab a WebKit nightly build, you can use its built-in
inspector to try to isolate the problem.

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

--~--~-~--~~~---~--~~
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: Django Admin CSS Problems in Safari

2006-04-28 Thread parsch

Thanks for your attention, I'll keep on trying to to find out what
causes the problem.


--~--~-~--~~~---~--~~
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: Django Admin CSS Problems in Safari

2006-04-28 Thread James Bennett

On 4/28/06, parsch <[EMAIL PROTECTED]> wrote:
> No, for modifications I use another server.
> The screenshots show the results of the original CSS of the latest MR
> version (I changed the background-color only).

I'm running the latest magic-removal as well, and I'm unable to reproduce this.

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

--~--~-~--~~~---~--~~
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: Django Admin CSS Problems in Safari

2006-04-28 Thread parsch

No, for modifications I use another server.
The screenshots show the results of the original CSS of the latest MR
version (I changed the background-color only).


--~--~-~--~~~---~--~~
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: Django Admin CSS Problems in Safari

2006-04-28 Thread James Bennett

On 4/28/06, parsch <[EMAIL PROTECTED]> wrote:
> i also used the django admin in safari a thousand times - the error
> appeared just some days ago and was reproduced on 4 computers at this
> time.

Did it start happening right around the time you started modifying the CSS?

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

--~--~-~--~~~---~--~~
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: Django Admin CSS Problems in Safari

2006-04-28 Thread parsch

hello james,

thanks for your answer.

i also used the django admin in safari a thousand times - the error
appeared just some days ago and was reproduced on 4 computers at this
time.

2 screenshots:

http://www.vonautomatisch.at/DjangoAdminIndex.png
http://www.vonautomatisch.at/DjangoAdminChangelist.png


--~--~-~--~~~---~--~~
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: Django Admin CSS Problems in Safari

2006-04-28 Thread James Bennett

On 4/28/06, parsch <[EMAIL PROTECTED]> wrote:
> there are some basic problems with the django admin css (magic-removal)
> and safari (2.0.3 but also earlier versions):

I use the Django admin in Safari on a daily basis, and have never seen
any rendering problems. Can you reproduce this on another computer?
Even better, can you take screenshots?


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

--~--~-~--~~~---~--~~
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: Django admin css not fully working in MS IE6 ...

2006-04-27 Thread Sam Tran

On 4/27/06, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:
>
> On Thu, 2006-04-27 at 13:06 -0400, Sam Tran wrote:
> > On 4/27/06, James Bennett <[EMAIL PROTECTED]> wrote:
> > >
> > > On 4/27/06, Sam Tran <[EMAIL PROTECTED]> wrote:
> > > > I have been working with the Django admin using Firefox.
> > > > Today I tried MS IE 6 and it looks like the css file used is not fully
> > > > compatible with IE.
> > > > For instance, the blue submit buttons are grey in IE.
> > >
> > > IE on XP (if that's what you're using) doesn't always respect certain
> > > styles on HTML INPUT elements, in much the same way that Safari always
> > > uses the default Aqua form controls.
> > >
> > > What other problems are you seeing?
> > >
> >
> > Let's say I have a table defined as follows:
> >
> > 
> >   
> > 
> > 
> > 
> >
> > The first cell has a blue background. The second cell has a blue
> > background and the changelink icon when using Firefox. On IE, the
> > second cell has a white background ...
>
> It's a bit hard to diagnose this without knowing the styles that are
> being applied. Is this with a standard Django stylesheet (which one?) or
> one of your own or...?
>

Hi Malcom,

It is the Django 0.91 admin stylesheets.
Thanks.

Sam

--~--~-~--~~~---~--~~
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: Django admin css not fully working in MS IE6 ...

2006-04-27 Thread Sam Tran

On 4/27/06, James Bennett <[EMAIL PROTECTED]> wrote:
>
> On 4/27/06, Sam Tran <[EMAIL PROTECTED]> wrote:
> > I have been working with the Django admin using Firefox.
> > Today I tried MS IE 6 and it looks like the css file used is not fully
> > compatible with IE.
> > For instance, the blue submit buttons are grey in IE.
>
> IE on XP (if that's what you're using) doesn't always respect certain
> styles on HTML INPUT elements, in much the same way that Safari always
> uses the default Aqua form controls.
>
> What other problems are you seeing?
>

Let's say I have a table defined as follows:


  




The first cell has a blue background. The second cell has a blue
background and the changelink icon when using Firefox. On IE, the
second cell has a white background ...

Sam

--~--~-~--~~~---~--~~
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: Django admin css not fully working in MS IE6 ...

2006-04-27 Thread James Bennett

On 4/27/06, Sam Tran <[EMAIL PROTECTED]> wrote:
> I have been working with the Django admin using Firefox.
> Today I tried MS IE 6 and it looks like the css file used is not fully
> compatible with IE.
> For instance, the blue submit buttons are grey in IE.

IE on XP (if that's what you're using) doesn't always respect certain
styles on HTML INPUT elements, in much the same way that Safari always
uses the default Aqua form controls.

What other problems are you seeing?

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

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---