2008-11-02 23:14:37 +00:00
|
|
|
import os
|
|
|
|
import settings
|
|
|
|
os.environ['PYTHONPATH'] = settings.PYTHON_PATH
|
|
|
|
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
|
|
|
|
from django.core import management
|
|
|
|
from django.db import connection
|
|
|
|
|
|
|
|
cursor = connection.cursor()
|
|
|
|
cursor.execute("drop database %s" % settings.DATABASE_NAME)
|
|
|
|
cursor.execute("create database %s" % settings.DATABASE_NAME)
|
|
|
|
cursor.execute("ALTER DATABASE %s CHARACTER SET=utf8" % settings.DATABASE_NAME)
|
|
|
|
cursor.execute("USE %s" % settings.DATABASE_NAME)
|
|
|
|
management.call_command('syncdb')
|
|
|
|
from django.contrib.auth.models import User
|
|
|
|
user = User.objects.create_user('m', 'm@m.com', 'm')
|
|
|
|
user.is_staff = True
|
|
|
|
user.is_superuser = True
|
|
|
|
user.save()
|
|
|
|
|
|
|
|
import parsers.cavetab
|
2009-01-24 23:59:45 +00:00
|
|
|
parsers.cavetab.LoadCaveTab()
|
2009-01-18 15:59:37 +00:00
|
|
|
import parsers.people
|
|
|
|
parsers.people.LoadPersonsExpos()
|
2009-01-04 14:06:01 +00:00
|
|
|
import parsers.logbooks
|
2009-01-18 15:59:37 +00:00
|
|
|
parsers.logbooks.LoadLogbooks()
|
2009-01-15 23:25:36 +00:00
|
|
|
import parsers.survex
|
2009-01-19 00:22:54 +00:00
|
|
|
parsers.survex.LoadAllSurvexBlocks()
|
2009-01-24 14:07:36 +00:00
|
|
|
import parsers.QMs
|
2009-02-17 01:09:11 +00:00
|
|
|
import parsers.surveys
|