The special events app that's special.
Installation for Development
Corkboard uses Django, an amazing Python web framework, and as such it needs a few Python utilities. As of this writing,
Corkboard is compatible with Python 2.7.x and Python 3.x
Fie and double fie upon the one who does these out of order.
sudo easy_install pip
When it comes to Python package managers, pip is the only game in town. It wraps the ironically headache-inducing easy_install
and makes installing python packages a breeze. Be sure to run this command as root (either use sudo or login as root) to install
sudo pip install virtualenv
Virtualenv allows you to install Python packages in walled-off virtual environments, which is great when you have multiple projects on one machine,
each of which may depend on a different version of the same package. Perfect for the developer who can't eat her peas if their touching
sudo pip install autoenv
echo "source /usr/local/opt/autoenv/activate.sh" >> ~/.bash_profile
.env file in any directory, and this nifty little program will automatically execute all shell commands contained
therein whenever you
cd into that directory. Great for activating virtualenvs and issuing threatening console messages.
####Clone this repo:
Unless you're planning on cloning this repo once and then never touching it again, you'll want to clone it via ssh. Make sure
your public key(s) is/are uploaded to your github profile. If you have no idea what that means, go here
and follow the instructions for generating an ssh key pair and uploading your public key. Once that's done,
cd into the directory where you want to clone the project and:
git clone firstname.lastname@example.org:wbrefvem/corkboard.git
####Create and activate virtualenv:
After cloning, run the following:
(You can specify a different version of python from your system default by adding
-p <path-to-python-binary> to the above command.)
echo "source .venv/bin/activate" >> .env
You now have an active Python virtual environment. Anything you install through pip will reside here in this environment and may not be available outside
Note: if you run pip as root while your virtualenv is active, your package(s) will be installed globally, not in your virtualenv.
When working with virtualenvs, it's best to install everything under your own username.
####Install required packages:
pip install -r requirements.txt
####Run database migrations:
By default, Corkboard uses SQLite for development. Don't change this unless you really want to. Matter of fact, don't change it even if you really
want to. SQLite is awesome.
In any case, you'll need to intialize your database schema by running the migrations. Make sure you're in the folder where
manage.py is located
python manage.py migrate
####Create admin account
python manage.py createsuperuser
This creates an admin account that you can use to login, both to the Corkboard app as well as Django's admin interface, which can be accessed
####Run development server:
You're going to want to use Django's development server for development. Don't use it for production unless you hate sleep
python manage.py runserver 0.0.0.0:8008
You will have to choose a different port if something else is running on port
8008. It's also worth noting that using
0.0.0.0 for the host string
will make your Corkboard installation visible to other machines on the network, assuming your firewall is configured to allow http traffic
8008 or whatever port you chose. Use
localhost for the host string or configure your firewall to block http traffic on your chosen port
to prevent this. If you run
runserver without specifying a host and port, it will run on
127.0.0.1:8000 by default.