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

  • Home
  • SEARCH
  • 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 3451842
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T09:11:21+00:00 2026-05-18T09:11:21+00:00

I am just starting to fiddle around with django. First I made a small

  • 0

I am just starting to fiddle around with django. First I made a small app on my windows machine and verified it worked fine
Then, I zipped the entire project, and opened the zip on a linux machine.
The linux machine was installed with mod_wsgi and django 1.1.1, of course.

I created the following dirs:

  • /usr/local/bin/ROOT – contains only one file, django.wsgi
  • /usr/local/bin/ROOT/myapp – root dir of django app

Per the instructions here, I added to httpd.conf:

<VirtualHost *:80>

    ServerName server
    ServerAlias server
    ServerAdmin webmaster@example.com


    WSGIScriptAlias /myapp /usr/local/bin/ROOT/django.wsgi

    <Directory /usr/local/bin/ROOT/>
    Order allow,deny
    Allow from all
    </Directory>

</VirtualHost>

Now per the instructions here I put in /usr/local/bin/ROOT/django.wsgi:

import os
import sys
path = '/usr/local/bin/ROOT'
if path not in sys.path:
    sys.path.append(path)
os.environ['DJANGO_SETTINGS_MODULE'] = 'myapp.settings'

import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()

If it is of any importance: there is nothing set on PYTHOHPATH before the application starts.

After that I did a graceful restart to apache, and went to server/myapp. I got a 500 error.
Lookin in the log I see:

[Sun Dec 05 12:24:17 2010] [error] [client XXXX] ImproperlyConfigured: Error importing middleware django.middleware.csrf: "No module named csrf"

What am I doing wrong? all other threads I found about this always either end up with a conclusion that it’s an old version of django (but mine’s 1.1.1) or that there are several apps running, but I have only one…

Help?

  • 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-18T09:11:21+00:00Added an answer on May 18, 2026 at 9:11 am

    “django.middleware.csrf” is the package in Django 1.2.x

    For Django 1.1.x CSRF settings read the appropriate docs Here

    The package in 1.1.x was “django.contrib.csrf.middleware.CsrfMiddleware”

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Just starting out with my first commercial app for the iStore but dont have
Here is my Fiddle: http://jsfiddle.net/LLFpp/ I'm just starting to learn CSS and Divs (moving
Just starting to play around with Flask on a local server and I'm noticing
Just starting with js, decided to convert Friendfeed to a fluid app, and as
Just starting to poke around iPhone development. I am trying to add an external
Just starting with Django and have began creating an application for test purposes. However,
just starting to get my hands dirty with the jQuery goodness and the first
Just starting to learn some basic C and messing around with the stat() system
Just starting to play around with bootstrap and it's amazing. I'm trying to figure
Just starting out with canvas and javascript and can't get my head around why

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.