add README
This commit is contained in:
parent
29756f9fbe
commit
b98fd07a35
19
README
Normal file
19
README
Normal 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
|
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue
Block a user