Recently, while working on a new Django project I need to create two Django sites that referred to each other. One would be the main domain i.e. mysite.com and the other would be a subdomain i.e. hello.mysite.com. So I started wondering if there was a way to test this locally in my development environment, and after 2 days of searching online I really found nothing and started to think it was impossible.
However, after speaking with a good friend of mine, Chaz Hill, who happens to be a really kick-ass System Administrator he pointed me in the right direction. I was trying to do all this with Vagrant at the time but in this post I’ll show you how you can do it the normal way, through the shell.
Create your Django project and app, then launch the Django development server using port 80, this is the important part (even though I’ve been using Django for sometime now, it totally slipped my mine I could set the port to 80). Now if you tried running this without sudo - you will get an permissions error, the fix of course is to do this => sudo python manage.py runserver 127.0.0.1:80
Pic of Django development server running in shell and in the foreground the hosts file.
With the Django development server running, open your hosts file, /etc/hosts and add 188.8.131.52 mysite.com - save the file and goto your browser and type mysite.com, you’ll happily see your Django site running
This crime mapping system I devise was inspired by SpatialKey and was spurred into action because of excitement to use Python in some way.
I recently twisted my ankle and during my recovery I was unable to play for awhile. As I dreamed of playing again, my mind turned to the upcoming football training days that might be rainy and with slippery field conditions. Days like those I would not be able to play, but how many possible days might I miss?
In the Caribbean we have a huge problem, what is the problem? The problem is access to data. Data is information and without it we can never begin to answer the questions to the problems we have.
The other day while I was listening to some music (Hip-Hop and Dancehall) on the radio. I started to notice a particular theme to the music that I never realized before. It seems a lot of popular music has a lot of paranoia.
I do feel a lot of music in Caribbean has a lot of under-tones of, “dem a wicked people”, “jealousy”, “friend against friend” and “don’t trust anyone” messages. I’m not sure if there is any correlation between listening to this type of music and Caribbean people’s feelings regarding their trust issues and the treatment they feel in their own communities.
I was going to just generalise and say that Caribbean music was the only offenders of this point, but I did notice it in other music originating outside of the Caribbean region. In conclusion, I don’t think music can force you to act a certain way, but it can add influence to those that are easily influenced.
So at the start of the year (2012) I made a secret commitment to myself, that this year I would strive to increase the amount of apps I have on the App store. I’m not one for “New year’s resolutions” but this goal I know I wanted to set for the year. So as I drafted ideas and played with concepts, I knew for one thing this new app would not be a game, I wanted to make something that was more of a utility type app.