kopia lustrzana https://github.com/hholzgra/maposmatic/
Porównaj commity
3 Commity
ee5ad39915
...
d7972606e1
Autor | SHA1 | Data |
---|---|---|
Hartmut Holzgraefe | d7972606e1 | |
Hartmut Holzgraefe | 2a3c3f9f2c | |
Hartmut Holzgraefe | 7cc0430fda |
|
@ -190,13 +190,15 @@ def _jobs_post(request):
|
|||
job.paper_width_mm = 210
|
||||
job.paper_height_mm = 297
|
||||
|
||||
# TODO: either both or none of width/height need to be set
|
||||
# TODO: size and width/height are mutually exclusive
|
||||
if 'paper_width' in input:
|
||||
job.paper_width_mm = input['paper_width']
|
||||
if 'paper_height' in input:
|
||||
job.paper_height_mm = input['paper_height']
|
||||
if 'paper_size' in input:
|
||||
if 'paper_width' in input or 'paper_height' in input:
|
||||
if 'paper_size' in input:
|
||||
result['error']['paper_size'] = "paper_size and paper_width/height are mutually exclusive"
|
||||
elif 'paper_width' in input and 'paper_height' in input:
|
||||
job.paper_width_mm = input['paper_width']
|
||||
job.paper_height_mm = input['paper_height']
|
||||
else:
|
||||
result['error']['paper_width'] = "both paper_width and paper_height need to be given"
|
||||
elif 'paper_size' in input:
|
||||
try:
|
||||
_ocitysmap = ocitysmap.OCitySMap(www.settings.OCITYSMAP_CFG_PATH)
|
||||
p = _ocitysmap.get_paper_size_by_name(input['paper_size'])
|
||||
|
|
|
@ -208,7 +208,7 @@ class MapRenderingJobForm(forms.ModelForm):
|
|||
if mode == 'admin':
|
||||
# TODO as bounding box override now exists (Issue #24)
|
||||
# we need to do the same bbox checks here as in
|
||||
# the mode=bbox section below?
|
||||
# the mode=bbox section below?
|
||||
if city == "":
|
||||
msg = _(u"Administrative city required")
|
||||
self._errors["administrative_city"] = ErrorList([msg])
|
||||
|
|
|
@ -195,8 +195,7 @@ LANGUAGE_FLAGS = {
|
|||
|
||||
LOCALE_PATHS = [
|
||||
os.path.join(PROJECT_PATH, 'locale'),
|
||||
# TODO ocitysmap path should not be hardcoded
|
||||
os.path.join('/home/maposmatic/ocitysmap', 'locale'),
|
||||
os.path.join(OCITYSMAP_PATH, 'locale'),
|
||||
]
|
||||
|
||||
# Associate a Django language code with:
|
||||
|
|
Ładowanie…
Reference in New Issue