I followed the webfaction django tutorial video and created a django app/website to the root of my webfactional.com domain. These were the mappings for the website config:

django_pastebin -----> /
pastebin_static_media -----> /media
django_pastebin_admin/media -----> /media/admin

All was working.

I then decided that I wanted to do other things with the webfactional.com domain and it would be better to have django in a subdirectory. I updated the mapping so that it would look like this. New mapping...which is not working perfectly...I think some times the URLs can't be resolved by django.

django_pastebin -----> /django
pastebin_static_media -----> /django/media
django_pastebin_admin/media -----> /django/media/admin

I updated settings.py and urls.py to reflect these change (I think correctly).

Now after I enter a new pastebin entry I see: "There is no application mounted at the root of this domain." THe url in the browser is "xxx.webfactional.com/3/" (it was the third record that I entered). If I manually add /django (xxx.webfactional.com/django/3/) then I see the record.

What am I missing? What else do I need to tweak? I'm just a beginner when it comes to python and django.

asked 23 Jan '11, 09:02

milesmeow's gravatar image

milesmeow
169
accept rate: 0%

edited 23 Jan '11, 09:10


Django requires some changes to be made for it to work on a sub-url - please check the following directions on this subject: http://docs.webfaction.com/software/django/config.html#mounting-a-django-application-on-a-subpath

On a side note you can create subdomains under your webfactional.com domain which you can use to host multiple different applications and websites, while keeping each application mounted at the root URL.

link

answered 23 Jan '11, 09:10

tie's gravatar image

tie
1.4k13
accept rate: 44%

Isn't user_name.webfactional.com already a subdomain? How would I add another one?

dev.user_name.webfacdtional.com? Will that work?

(23 Jan '11, 10:23) milesmeow milesmeow's gravatar image

User_name.webfactional.com is present as a main domain inside the Control Panel. So, adding a subdomain to it would work.

You can add a new subdomain via Control Panel -> Domains/Websites -> Domains -> Edit icon.

(23 Jan '11, 10:28) tie tie's gravatar image
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

Tags:

×743
×35

Asked: 23 Jan '11, 09:02

Seen: 1,585 times

Last updated: 23 Jan '11, 10:31

Plans & prices    Sign up    Why WebFaction?    Contact us    Affiliate program    Support    Legal    Jobs    Blog    Control panel login
Powered by OSQA
© Copyright 2003-2012 Swarma Limited - WebFaction is a service of Swarma Limited