add README

This commit is contained in:
Sanj 2012-11-08 16:19:46 +05:30
parent 29756f9fbe
commit b98fd07a35
2 changed files with 20 additions and 1 deletions

19
README Normal file
View File

@ -0,0 +1,19 @@
Setup:
$ virtualenv --system-site-packages .
$ . bin/activate
$ pip install -r requirements.txt
$ mysql -u root
mysql> create database ifa;
mysql> quit;
$ python manage.py syncdb
Import data:
$ python manage.py shell
>>> from ifa.films import imports
>>> imports.do(path="/path/to/FILMS.txt")
Run dev server:
$ python manage.py runserver

View File

@ -1,7 +1,7 @@
path = "/home/sanj/c/ifa/tmp/FILMS.txt"
from models import *
def do():
def do(path=path):
errors = open("errors.txt", "w")
for line in open(path):
txt = line.strip()