c3nav.mapdata.cache → c3nav.mapdata.utils.cache
This commit is contained in:
parent
14330de29e
commit
116590b88f
10 changed files with 9 additions and 9 deletions
|
@ -20,9 +20,9 @@ from django.utils.translation import ungettext_lazy
|
|||
from c3nav.editor.models.changedobject import ApplyToInstanceError, ChangedObject
|
||||
from c3nav.editor.utils import is_created_pk
|
||||
from c3nav.editor.wrappers import ModelInstanceWrapper, ModelWrapper
|
||||
from c3nav.mapdata.cache import changed_geometries
|
||||
from c3nav.mapdata.models import LocationSlug, MapUpdate
|
||||
from c3nav.mapdata.models.locations import LocationRedirect
|
||||
from c3nav.mapdata.utils.cache import changed_geometries
|
||||
from c3nav.mapdata.utils.models import get_submodels
|
||||
|
||||
|
||||
|
|
|
@ -5,5 +5,5 @@ class MapdataConfig(AppConfig):
|
|||
name = 'c3nav.mapdata'
|
||||
|
||||
def ready(self):
|
||||
from c3nav.mapdata.cache import register_signals
|
||||
from c3nav.mapdata.utils.cache import register_signals
|
||||
register_signals()
|
||||
|
|
|
@ -15,12 +15,12 @@ from shapely.geometry import JOIN_STYLE, LineString, MultiPolygon
|
|||
from shapely.geometry.polygon import orient
|
||||
from shapely.ops import unary_union
|
||||
|
||||
from c3nav.mapdata.cache import changed_geometries
|
||||
from c3nav.mapdata.fields import GeometryField
|
||||
from c3nav.mapdata.models import Level
|
||||
from c3nav.mapdata.models.access import AccessRestrictionMixin
|
||||
from c3nav.mapdata.models.geometry.base import GeometryMixin
|
||||
from c3nav.mapdata.models.locations import SpecificLocation
|
||||
from c3nav.mapdata.utils.cache import changed_geometries
|
||||
from c3nav.mapdata.utils.geometry import (assert_multilinestring, assert_multipolygon, clean_cut_polygon,
|
||||
cut_polygon_with_line)
|
||||
|
||||
|
|
|
@ -5,10 +5,10 @@ from django.utils.text import format_lazy
|
|||
from django.utils.translation import ugettext_lazy as _
|
||||
from shapely.geometry import CAP_STYLE, JOIN_STYLE, mapping
|
||||
|
||||
from c3nav.mapdata.cache import changed_geometries
|
||||
from c3nav.mapdata.fields import GeometryField
|
||||
from c3nav.mapdata.models.geometry.base import GeometryMixin
|
||||
from c3nav.mapdata.models.locations import SpecificLocation
|
||||
from c3nav.mapdata.utils.cache import changed_geometries
|
||||
from c3nav.mapdata.utils.json import format_geojson
|
||||
|
||||
|
||||
|
|
|
@ -92,7 +92,7 @@ class MapUpdate(models.Model):
|
|||
if not new_updates:
|
||||
return ()
|
||||
|
||||
from c3nav.mapdata.cache import changed_geometries
|
||||
from c3nav.mapdata.utils.cache import changed_geometries
|
||||
changed_geometries.reset()
|
||||
|
||||
logger.info('Recalculating altitude areas...')
|
||||
|
@ -142,7 +142,7 @@ class MapUpdate(models.Model):
|
|||
with suppress(FileExistsError):
|
||||
os.mkdir(os.path.dirname(self._changed_geometries_filename()))
|
||||
|
||||
from c3nav.mapdata.cache import changed_geometries
|
||||
from c3nav.mapdata.utils.cache import changed_geometries
|
||||
pickle.dump(changed_geometries, open(self._changed_geometries_filename(), 'wb'))
|
||||
|
||||
transaction.on_commit(
|
||||
|
|
|
@ -13,8 +13,8 @@ from shapely import prepared
|
|||
from shapely.geometry import GeometryCollection, LineString, MultiLineString
|
||||
from shapely.ops import unary_union
|
||||
|
||||
from c3nav.mapdata.cache import MapHistory
|
||||
from c3nav.mapdata.models import AltitudeArea, Level, MapUpdate
|
||||
from c3nav.mapdata.utils.cache import MapHistory
|
||||
from c3nav.mapdata.utils.geometry import assert_multipolygon, get_rings
|
||||
from c3nav.mapdata.utils.mesh import triangulate_polygon, triangulate_rings
|
||||
from c3nav.mapdata.utils.mpl import shapely_to_mpl
|
||||
|
|
|
@ -5,10 +5,10 @@ from django.utils.functional import cached_property
|
|||
from shapely import prepared
|
||||
from shapely.geometry import box
|
||||
|
||||
from c3nav.mapdata.cache import MapHistory
|
||||
from c3nav.mapdata.models import Level, MapUpdate
|
||||
from c3nav.mapdata.render.data import LevelRenderData, hybrid_union
|
||||
from c3nav.mapdata.render.engines.base import FillAttribs, StrokeAttribs
|
||||
from c3nav.mapdata.utils.cache import MapHistory
|
||||
|
||||
|
||||
class MapRenderer:
|
||||
|
|
|
@ -11,11 +11,11 @@ from django.shortcuts import get_object_or_404
|
|||
from django.views.decorators.http import etag
|
||||
from shapely.geometry import box
|
||||
|
||||
from c3nav.mapdata.cache import MapHistory
|
||||
from c3nav.mapdata.middleware import no_language
|
||||
from c3nav.mapdata.models import Level, MapUpdate, Source
|
||||
from c3nav.mapdata.render import MapRenderer, get_render_level_ids, get_tile_access_cookie, set_tile_access_cookie
|
||||
from c3nav.mapdata.render.engines import ImageRenderEngine
|
||||
from c3nav.mapdata.utils.cache import MapHistory
|
||||
|
||||
|
||||
@no_language()
|
||||
|
|
0
src/c3nav/tileserver/__init__.py
Normal file
0
src/c3nav/tileserver/__init__.py
Normal file
Loading…
Add table
Add a link
Reference in a new issue