From ae3fe8cd423be5268d630a498361e376c6add776 Mon Sep 17 00:00:00 2001 From: substantialnoninfringinguser Date: Thu, 2 Jul 2009 20:43:18 +0100 Subject: [PATCH] [svn] Renaming troggle.expo to troggle.core. To do this, used: perl -p -i -e "s/expo(?=[\s\.']+)/core/g" `find -name \*.py` and then manually checked each change (had to remove a couple) --- {expo => core}/__init__.py | 0 {expo => core}/admin.py | 6 +++--- {expo => core}/context.py | 2 +- {expo => core}/fileAbstraction.py | 0 {expo => core}/forms.py | 0 {expo => core}/imagekit_specs.py | 0 {expo => core}/models.py | 4 ++-- {expo => core}/models_survex.py | 0 {expo => core}/randSent.py | 2 +- {expo => core}/search.py | 0 {expo => core}/templatetags/__init__.py | 0 {expo => core}/templatetags/link.py | 0 {expo => core}/templatetags/survex_markup.py | 0 {expo => core}/templatetags/wiki_markup.py | 2 +- {expo => core}/view_surveys.py | 0 {expo => core}/views.py | 0 {expo => core}/views_caves.py | 4 ++-- {expo => core}/views_logbooks.py | 4 ++-- {expo => core}/views_other.py | 4 ++-- {expo => core}/views_survex.py | 0 export/tocavetab.py | 2 +- export/toqms.py | 2 +- parsers/QMs.py | 2 +- parsers/cavetab.py | 2 +- parsers/logbooks.py | 2 +- parsers/subcaves.py | 7 +------ parsers/survex.py | 2 +- parsers/surveys.py | 4 ++-- profiles/views.py | 2 +- save_carefully.py | 2 +- settings.py | 6 +++--- urls.py | 8 ++++---- 32 files changed, 32 insertions(+), 37 deletions(-) rename {expo => core}/__init__.py (100%) rename {expo => core}/admin.py (94%) rename {expo => core}/context.py (77%) rename {expo => core}/fileAbstraction.py (100%) rename {expo => core}/forms.py (100%) rename {expo => core}/imagekit_specs.py (100%) rename {expo => core}/models.py (97%) rename {expo => core}/models_survex.py (100%) rename {expo => core}/randSent.py (92%) rename {expo => core}/search.py (100%) rename {expo => core}/templatetags/__init__.py (100%) rename {expo => core}/templatetags/link.py (100%) rename {expo => core}/templatetags/survex_markup.py (100%) rename {expo => core}/templatetags/wiki_markup.py (97%) rename {expo => core}/view_surveys.py (100%) rename {expo => core}/views.py (100%) rename {expo => core}/views_caves.py (95%) rename {expo => core}/views_logbooks.py (95%) rename {expo => core}/views_other.py (96%) rename {expo => core}/views_survex.py (100%) diff --git a/expo/__init__.py b/core/__init__.py similarity index 100% rename from expo/__init__.py rename to core/__init__.py diff --git a/expo/admin.py b/core/admin.py similarity index 94% rename from expo/admin.py rename to core/admin.py index e88e1cd..e304966 100644 --- a/expo/admin.py +++ b/core/admin.py @@ -1,12 +1,12 @@ -from troggle.expo.models import * +from troggle.core.models import * from django.contrib import admin from feincms.admin import editor from django.forms import ModelForm import django.forms as forms -from expo.forms import LogbookEntryForm +from core.forms import LogbookEntryForm from django.http import HttpResponse from django.core import serializers -from expo.views_other import downloadLogbook +from core.views_other import downloadLogbook #from troggle.reversion.admin import VersionAdmin #django-reversion version control #overriding admin save so we have the new since parsing field diff --git a/expo/context.py b/core/context.py similarity index 77% rename from expo/context.py rename to core/context.py index bb38a84..a77de49 100644 --- a/expo/context.py +++ b/core/context.py @@ -1,5 +1,5 @@ from django.conf import settings -from expo.models import Expedition +from core.models import Expedition def troggle_context(request): return { 'settings':settings, 'Expedition':Expedition } \ No newline at end of file diff --git a/expo/fileAbstraction.py b/core/fileAbstraction.py similarity index 100% rename from expo/fileAbstraction.py rename to core/fileAbstraction.py diff --git a/expo/forms.py b/core/forms.py similarity index 100% rename from expo/forms.py rename to core/forms.py diff --git a/expo/imagekit_specs.py b/core/imagekit_specs.py similarity index 100% rename from expo/imagekit_specs.py rename to core/imagekit_specs.py diff --git a/expo/models.py b/core/models.py similarity index 97% rename from expo/models.py rename to core/models.py index c07b86d..8e00941 100644 --- a/expo/models.py +++ b/core/models.py @@ -591,7 +591,7 @@ class Photo(TroggleImageModel): lat_utm = models.FloatField(blank=True,null=True) class IKOptions: - spec_module = 'expo.imagekit_specs' + spec_module = 'core.imagekit_specs' cache_dir = 'thumbs' image_field = 'file' @@ -620,7 +620,7 @@ class ScannedImage(TroggleImageModel): lat_utm = models.FloatField(blank=True,null=True) class IKOptions: - spec_module = 'expo.imagekit_specs' + spec_module = 'core.imagekit_specs' cache_dir = 'thumbs' image_field = 'file' #content_type = models.ForeignKey(ContentType) diff --git a/expo/models_survex.py b/core/models_survex.py similarity index 100% rename from expo/models_survex.py rename to core/models_survex.py diff --git a/expo/randSent.py b/core/randSent.py similarity index 92% rename from expo/randSent.py rename to core/randSent.py index a99b974..efcc005 100644 --- a/expo/randSent.py +++ b/core/randSent.py @@ -1,6 +1,6 @@ import troggle.settings as settings from django import forms -from troggle.expo.models import LogbookEntry +from troggle.core.models import LogbookEntry import random import re diff --git a/expo/search.py b/core/search.py similarity index 100% rename from expo/search.py rename to core/search.py diff --git a/expo/templatetags/__init__.py b/core/templatetags/__init__.py similarity index 100% rename from expo/templatetags/__init__.py rename to core/templatetags/__init__.py diff --git a/expo/templatetags/link.py b/core/templatetags/link.py similarity index 100% rename from expo/templatetags/link.py rename to core/templatetags/link.py diff --git a/expo/templatetags/survex_markup.py b/core/templatetags/survex_markup.py similarity index 100% rename from expo/templatetags/survex_markup.py rename to core/templatetags/survex_markup.py diff --git a/expo/templatetags/wiki_markup.py b/core/templatetags/wiki_markup.py similarity index 97% rename from expo/templatetags/wiki_markup.py rename to core/templatetags/wiki_markup.py index 4bcd07d..07e6468 100644 --- a/expo/templatetags/wiki_markup.py +++ b/core/templatetags/wiki_markup.py @@ -3,7 +3,7 @@ from django.utils.html import conditional_escape from django.template.defaultfilters import stringfilter from django.utils.safestring import mark_safe from django.conf import settings -from expo.models import QM, Photo +from core.models import QM, Photo import re, urlparse register = template.Library() diff --git a/expo/view_surveys.py b/core/view_surveys.py similarity index 100% rename from expo/view_surveys.py rename to core/view_surveys.py diff --git a/expo/views.py b/core/views.py similarity index 100% rename from expo/views.py rename to core/views.py diff --git a/expo/views_caves.py b/core/views_caves.py similarity index 95% rename from expo/views_caves.py rename to core/views_caves.py index d633c36..f4327f3 100644 --- a/expo/views_caves.py +++ b/core/views_caves.py @@ -1,5 +1,5 @@ -from troggle.expo.models import Cave, CaveAndEntrance, Survey, Expedition, QM -import troggle.expo.models as models +from troggle.core.models import Cave, CaveAndEntrance, Survey, Expedition, QM +import troggle.core.models as models import troggle.settings as settings from django.forms.models import formset_factory import search diff --git a/expo/views_logbooks.py b/core/views_logbooks.py similarity index 95% rename from expo/views_logbooks.py rename to core/views_logbooks.py index afcdafc..5fa550c 100644 --- a/expo/views_logbooks.py +++ b/core/views_logbooks.py @@ -1,10 +1,10 @@ from django.shortcuts import render_to_response -from troggle.expo.models import Expedition, Person, PersonExpedition, PersonTrip, LogbookEntry +from troggle.core.models import Expedition, Person, PersonExpedition, PersonTrip, LogbookEntry import troggle.settings as settings from django.db import models from troggle.parsers.logbooks import LoadLogbookForExpedition from troggle.parsers.people import GetPersonExpeditionNameLookup -from troggle.expo.forms import PersonForm +from troggle.core.forms import PersonForm from django.core.urlresolvers import reverse from django.http import HttpResponseRedirect diff --git a/expo/views_other.py b/core/views_other.py similarity index 96% rename from expo/views_other.py rename to core/views_other.py index 790c779..b3da852 100644 --- a/expo/views_other.py +++ b/core/views_other.py @@ -1,4 +1,4 @@ -from troggle.expo.models import Cave, Expedition, Person, LogbookEntry, PersonExpedition, PersonTrip, Photo +from troggle.core.models import Cave, Expedition, Person, LogbookEntry, PersonExpedition, PersonTrip, Photo import troggle.settings as settings from django import forms from django.template import loader, Context @@ -9,7 +9,7 @@ import randSent from django.http import HttpResponse, HttpResponseRedirect from django.core.urlresolvers import reverse from troggle.alwaysUseRequestContext import render_response # see views_logbooks for explanation on this. -from expo.models import * +from core.models import * def showrequest(request): return HttpResponse(request.GET) diff --git a/expo/views_survex.py b/core/views_survex.py similarity index 100% rename from expo/views_survex.py rename to core/views_survex.py diff --git a/export/tocavetab.py b/export/tocavetab.py index 2ffc5be..bf0170d 100644 --- a/export/tocavetab.py +++ b/export/tocavetab.py @@ -1,4 +1,4 @@ -import troggle.expo.models as models +import troggle.core.models as models from django.conf import settings import csv, re, os diff --git a/export/toqms.py b/export/toqms.py index dd58fca..a6a264a 100644 --- a/export/toqms.py +++ b/export/toqms.py @@ -1,4 +1,4 @@ -import troggle.expo.models as models +import troggle.core.models as models from django.conf import settings import csv diff --git a/parsers/QMs.py b/parsers/QMs.py index ef38c3f..b259bf1 100644 --- a/parsers/QMs.py +++ b/parsers/QMs.py @@ -2,7 +2,7 @@ import csv from django.conf import settings -from expo.models import QM, LogbookEntry, Cave +from core.models import QM, LogbookEntry, Cave from datetime import * from troggle.save_carefully import save_carefully import re, os diff --git a/parsers/cavetab.py b/parsers/cavetab.py index d0fb052..1a73f9e 100644 --- a/parsers/cavetab.py +++ b/parsers/cavetab.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -import troggle.expo.models as models +import troggle.core.models as models from django.conf import settings import csv, time, re, os, logging from troggle.save_carefully import save_carefully diff --git a/parsers/logbooks.py b/parsers/logbooks.py index ebfd54e..70805ca 100644 --- a/parsers/logbooks.py +++ b/parsers/logbooks.py @@ -1,7 +1,7 @@ #.-*- coding: utf-8 -*- from django.conf import settings -import expo.models as models +import core.models as models from parsers.people import GetPersonExpeditionNameLookup from parsers.cavetab import GetCaveLookup diff --git a/parsers/subcaves.py b/parsers/subcaves.py index 024a229..b8ee4d2 100644 --- a/parsers/subcaves.py +++ b/parsers/subcaves.py @@ -4,14 +4,9 @@ This module is the part of troggle that parses descriptions of cave parts (subca import sys, os -sys.path.append('C:\\troggle') -sys.path.append('C:\\') -os.environ['DJANGO_SETTINGS_MODULE']='troggle.settings' -import troggle.expo as expo - import os, re, logging from django.conf import settings -from expo.models import Subcave, Cave +from core.models import Subcave, Cave from troggle.save_carefully import save_carefully def getLinksInCaveDescription(cave): diff --git a/parsers/survex.py b/parsers/survex.py index 93f708e..2360300 100644 --- a/parsers/survex.py +++ b/parsers/survex.py @@ -1,5 +1,5 @@ import troggle.settings as settings -import troggle.expo.models as models +import troggle.core.models as models from troggle.parsers.people import GetPersonExpeditionNameLookup diff --git a/parsers/surveys.py b/parsers/surveys.py index da94fe6..0a15d25 100644 --- a/parsers/surveys.py +++ b/parsers/surveys.py @@ -3,10 +3,10 @@ import sys, os, types, logging #from troggle import * #os.environ['DJANGO_SETTINGS_MODULE']='troggle.settings' import troggle.settings as settings -from troggle.expo.models import * +from troggle.core.models import * from PIL import Image #import settings -#import expo.models as models +#import core.models as models import csv import re import datetime diff --git a/profiles/views.py b/profiles/views.py index b3e3672..aca2a6a 100644 --- a/profiles/views.py +++ b/profiles/views.py @@ -14,7 +14,7 @@ from django.template import RequestContext from django.views.generic.list_detail import object_list from django import forms -from expo.models import Person +from core.models import Person from troggle.alwaysUseRequestContext import render_response diff --git a/save_carefully.py b/save_carefully.py index ee7c0cc..bacd91d 100644 --- a/save_carefully.py +++ b/save_carefully.py @@ -7,7 +7,7 @@ def save_carefully(objectType, lookupAttribs={}, nonLookupAttribs={}): -if instance exists in DB and was not modified using Troggle: overwrite instance, return (instance, False) The checking is accomplished using Django's get_or_create and the new_since_parsing boolean field - defined in expo.models.TroggleModel. + defined in core.models.TroggleModel. """ diff --git a/settings.py b/settings.py index 45d1867..e4c3407 100644 --- a/settings.py +++ b/settings.py @@ -54,7 +54,7 @@ TEMPLATE_LOADERS = ( # 'django.template.loaders.eggs.load_template_source', ) -TEMPLATE_CONTEXT_PROCESSORS = ( "django.core.context_processors.auth", "expo.context.troggle_context", ) +TEMPLATE_CONTEXT_PROCESSORS = ( "django.core.context_processors.auth", "core.context.troggle_context", ) LOGIN_REDIRECT_URL = '/' @@ -70,7 +70,7 @@ ROOT_URLCONF = 'troggle.urls' ACCOUNT_ACTIVATION_DAYS=3 -AUTH_PROFILE_MODULE = 'expo.person' +AUTH_PROFILE_MODULE = 'core.person' INSTALLED_APPS = ( 'django.contrib.admin', @@ -84,7 +84,7 @@ INSTALLED_APPS = ( #'django_evolution', 'troggle.registration', 'troggle.profiles', - 'troggle.expo', + 'troggle.core', 'troggle.imagekit', 'mptt', #This is django-mptt (modifed preorder tree traversal) which allows the tree structure of subcaves. 'feincms' #This is a little content management app that does the javascript admin page for mptt. diff --git a/urls.py b/urls.py index 5f0822a..a3686ae 100644 --- a/urls.py +++ b/urls.py @@ -1,10 +1,10 @@ from django.conf.urls.defaults import * import troggle.settings as settings -from expo.views import * # flat import -from expo.views_caves import * -from expo.views_survex import * -from expo.models import * +from core.views import * # flat import +from core.views_caves import * +from core.views_survex import * +from core.models import * from django.views.generic.create_update import create_object from django.contrib import admin from django.views.generic.list_detail import object_list