Rename phototagger.py to photodb.py
This commit is contained in:
parent
c84acca6c9
commit
80cb66b825
4 changed files with 8 additions and 8 deletions
|
@ -1,10 +1,10 @@
|
||||||
# Use with
|
# Use with
|
||||||
# py -i etiquette_easy.py
|
# py -i etiquette_easy.py
|
||||||
|
|
||||||
import etiquette.phototagger
|
import etiquette.photodb
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
P = etiquette.phototagger.PhotoDB()
|
P = etiquette.photodb.PhotoDB()
|
||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
def easytagger():
|
def easytagger():
|
||||||
|
|
|
@ -14,7 +14,7 @@ from etiquette import exceptions
|
||||||
from etiquette import helpers
|
from etiquette import helpers
|
||||||
from etiquette import jsonify
|
from etiquette import jsonify
|
||||||
from etiquette import objects
|
from etiquette import objects
|
||||||
from etiquette import phototagger
|
from etiquette import photodb
|
||||||
from etiquette import searchhelpers
|
from etiquette import searchhelpers
|
||||||
from etiquette import sessions
|
from etiquette import sessions
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ site.jinja_env.trim_blocks = True
|
||||||
site.jinja_env.lstrip_blocks = True
|
site.jinja_env.lstrip_blocks = True
|
||||||
site.debug = True
|
site.debug = True
|
||||||
|
|
||||||
P = phototagger.PhotoDB()
|
P = photodb.PhotoDB()
|
||||||
|
|
||||||
session_manager = sessions.SessionManager()
|
session_manager = sessions.SessionManager()
|
||||||
|
|
||||||
|
@ -534,7 +534,7 @@ def get_search_core():
|
||||||
def get_search_html():
|
def get_search_html():
|
||||||
search_results = get_search_core()
|
search_results = get_search_core()
|
||||||
search_kwargs = search_results['search_kwargs']
|
search_kwargs = search_results['search_kwargs']
|
||||||
qualname_map = P.export_tags(exporter=phototagger.tag_export_qualname_map)
|
qualname_map = P.export_tags(exporter=photodb.tag_export_qualname_map)
|
||||||
session = session_manager.get(request)
|
session = session_manager.get(request)
|
||||||
response = flask.render_template(
|
response = flask.render_template(
|
||||||
'search.html',
|
'search.html',
|
||||||
|
@ -559,7 +559,7 @@ def get_search_json():
|
||||||
|
|
||||||
def get_tags_core(specific_tag=None):
|
def get_tags_core(specific_tag=None):
|
||||||
try:
|
try:
|
||||||
tags = P.export_tags(phototagger.tag_export_easybake, specific_tag=specific_tag)
|
tags = P.export_tags(photodb.tag_export_easybake, specific_tag=specific_tag)
|
||||||
except exceptions.NoSuchTag:
|
except exceptions.NoSuchTag:
|
||||||
flask.abort(404, 'That tag doesnt exist')
|
flask.abort(404, 'That tag doesnt exist')
|
||||||
tags = tags.split('\n')
|
tags = tags.split('\n')
|
||||||
|
|
|
@ -3,7 +3,7 @@ import os
|
||||||
import sqlite3
|
import sqlite3
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
import phototagger
|
import etiquette.photodb
|
||||||
|
|
||||||
def upgrade_1_to_2(sql):
|
def upgrade_1_to_2(sql):
|
||||||
'''
|
'''
|
||||||
|
@ -68,7 +68,7 @@ def upgrade_all(database_filename):
|
||||||
|
|
||||||
cur.execute('PRAGMA user_version')
|
cur.execute('PRAGMA user_version')
|
||||||
current_version = cur.fetchone()[0]
|
current_version = cur.fetchone()[0]
|
||||||
needed_version = phototagger.DATABASE_VERSION
|
needed_version = etiquette.photodb.DATABASE_VERSION
|
||||||
|
|
||||||
if current_version == needed_version:
|
if current_version == needed_version:
|
||||||
print('Already up-to-date with version %d.' % needed_version)
|
print('Already up-to-date with version %d.' % needed_version)
|
||||||
|
|
Loading…
Reference in a new issue