Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3231686
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T17:04:27+00:00 2026-05-17T17:04:27+00:00

I am using Django-page-CMS Everything works fine However once I create my own views

  • 0

I am using Django-page-CMS

Everything works fine However once I create my own views which extend from pages used within the CMS the CSS does not display.

This is strange because these pages display the CSS fine, as long as I do not use my own views.

I would greatly appreciate some help on this matter or at least some suggestions on why this is happening and how it could be rectified.

I am using the static files trick.

if settings.DEBUG:
urlpatterns += patterns('',
    url(r'^media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}),
    url(r'^admin_media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.ADMIN_MEDIA_ROOT}),

Here is how I have linked styles….links to jquery also exist but this should not affect.

<head>
<link type="text/css" rel="stylesheet" href="{{ MEDIA_URL }}css/style.css" />
</head>

I have some styles in pages which extend the base linked in the following way….

{% extends "base.html" %}
{% block page_style %}
<link type="text/css" rel="stylesheet" href="{{ MEDIA_URL }}css/index.css" />
{% endblock %}

Again, Everything works fine until I create my own views and pages which extend from any of these pages. Once I view the new pages no css displays in any page. not even the base however if I do not use my own views everything is displayed fine. I would greatly appreciate help on this matter.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T17:04:27+00:00Added an answer on May 17, 2026 at 5:04 pm

    The MEDIA_URL was not coming through properly.

    RequestContext() was the problem. The content_instance was not set therefore the MEDIA_URL variable would not come through when the template was rendered.

    When using render_to_response…..

    return render_to_response(YOUR_TEMPLATE, YOUR_TEMPLATE_CONTEXT,
    context_instance=RequestContext(request))
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm developing a web page using django and I want to add some javascript
I installed Django tiny mce however i am getting a normal text area in
I'm working on a Google App Engine project using Django. I noticed that for
Using Django 1.1: The Django admin docs describe using arbitrary methods or attributes on
I'm using Django PayPal . PayPal has a list of options you can pass
I am using Django and am making some long running processes that I am
I'm writing a Django app to serve some documentation written in RestructuredText. I have
i am making a history page for a website. The structure of my classes
So, I am doing a presentation using Beamer. In my earlier presentation, I used
I realize this is more of a server question (since all media requests bypass

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.