mirror of
https://expo.survex.com/repositories/expoweb/.git/
synced 2024-11-24 00:01:58 +00:00
785a130d0c
Logbook parser now looks for mugshots when adding people. If it finds an image, it adds a new photo model instance linked to that person. If it finds an html page, it adds the body text of that page as the person's "blurb" and then adds the mugshot. My interface web design isn't working, sorry. Need a blank slate on that one.
24 lines
774 B
Python
24 lines
774 B
Python
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
|
|
import parsers.logbooks
|
|
import parsers.QMs
|
|
import parsers.survex
|