WebFaction
Community site: login faq

I am a beginner with WebFaction and I require help to solve an issue I have. My site is django1.4 and python2.7.

I have the following error message displaying on my site after uploading new files to the wf server:

Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, [no address given] and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log.

I have opened the error logs and the error from the logs is:

ImproperlyConfigured: Error importing middleware axes.middleware: "No module named axes.middleware"

This error is from adding django-axes to my local development server and then up-loading the local development files to my wf server.

The changes I made to my to my MIDDLEWARE_CLASSES in my settings.py local development server files is:

MIDDLEWARE_CLASSES = (
    ...
    'axes.middleware.FailedLoginMiddleware'
    ...
)

How do I solve this issue?

asked 03 Apr '14, 22:31

6233114
15210
accept rate: 0%

edited 03 Apr '14, 23:27


Either:

  • a. The axes library isn't installed in your home directory or app directory, or...
  • b. The axes library is installed, but it's in a location that is not on your Python search path.

I've located your account, and based on what I found there (or rather, what I didn't find), I think the problem is (a).

If I'm wrong and you're sure the library is installed, then you should be able to solve the problem by adding axes parent directory to your Python search path.

permanent link

answered 04 Apr '14, 20:52

seanf
12.2k41836
accept rate: 37%

Thanks for your answer, but as I am a noob, how do I install the axes library to my home directory or app directory? This has me confused.

(05 Apr '14, 01:38) 6233114

Further up on the Python Documentation we explain many ways of installing modules in the server environment. How did you install it locally?

(05 Apr '14, 05:51) johns

I used pip install django-axes

(05 Apr '14, 09:13) 6233114

Pip should work on the server the same way(after you easy_install it), it will default to your home directory, the documentation explains how to install a module directly into your application.

(06 Apr '14, 00:23) johns

Thanks! I finally understood it.

(09 Apr '14, 01:49) 6233114
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×909
×103
×52

question asked: 03 Apr '14, 22:31

question was seen: 4,445 times

last updated: 09 Apr '14, 01:49

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM