website and backend code and scripts. Public Videos is a library of original, royalty-free stock video footage that are dedicated to the public domain.
JavaScript Other
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


====== Local Development ======

This page describes how to get the development environment setup from scratch and how to keep it synced with the latest changes.

===== - Requirements =====
  * Git
  * Python 2.5+
  * MySQL 5+
  * MySQL for Python
  * Django 1.0+
  * Jinja2.2+
  * MPlayer/MEncoder
  * FFMpeg
  * ffmpeg2theora

===== - Installation =====

==== - Get the Source ====

git clone

==== - Install MySQL ==== (get the 32 bit version on Mac OS because the Mac OS Python is 32)

==== - Install MySQL for Python (MySQLdb) ====
Warning: Installing MySQLdb can be a pain in the ass on MacOSX, be prepared.

Download the tar file, something like this probably:
(maybe it is best to use the 1.2.1 version and follow on Mac)

Unpack it, edit the site.cfg file if needed (to change the path of mysql_config to /usr/local/mysql/bin/mysql_config on MacOSX for example). You might need to edit a couple of more files on MacOSX as well, see here

For Mac OS X 10.6 users, the trick is to install the 64 bits of MySQL, then download the latest version of mysql-python, then build and install with the proper flags as described here and maybe restart the computer.

  ARCHFLAGS='-arch x86_64' python build
  ARCHFLAGS='-arch x86_64' python install
==== - Install Django Trunk ====
==== - Install Jinja Trunk ====

sudo easy_install Jinja2==dev
=== - (optional MacOSX) Install Jinja Textmate bundle ===
  - Unpack the file located at your jinja installation folder/ext
  - copy it to your ~/Library/Application Support/Textmate/Bundles
  - restart Textmate

==== - Install django-authopenid ====
<code>sudo easy_install -U django-authopenid</code>

==== - Install python-daemon ====
sudo easy_install python-daemon

==== - Create Dev Database ====
  # sudo mysqld_safe&
  # mysql --url=root
  # create database publicvideos_dev default character set utf8;
  # grant all on publicvideos_dev.* to m1ch43l@localhost identified by 'p4l1n'; 

===== - Getting Latest Changes from Trunk =====

  - git pull
  - python sqlall main | pbcopy
    * [[troubleshooting for the sqlall step]]
  - <code>mysql -u root publicvideos_dev -e "show tables" | grep -v Tables_in | grep -v "+" | gawk '{print "drop table " $1 ";"}' | mysql -u root publicvideos_dev</code>
  - mysql -u root publicvideos_dev
    * (paste the mysql commands copied from the sqlall)
  - mysql> exit
  - python syncdb
  - python runserver

===== - Deploy =====