Merge remote-tracking branch 'origin/master'

This commit is contained in:
自由的飞翔 2018-12-24 23:37:26 +08:00
commit b49f0ab556
2 changed files with 11 additions and 8 deletions

View File

@ -139,9 +139,9 @@ STATICFILES_DIRS = [
STATIC_ROOT = '/var/www/p3/drought/shared/static' STATIC_ROOT = '/var/www/p3/drought/shared/static'
MEDIA_ROOT = '/var/www/p3/drought/shared/static/media/' MEDIA_ROOT = '/var/www/p3/drought/shared/static/media/'
# CORS_ORIGIN_ALLOW_ALL = True
# CORS_URLS_REGEX = r'^//disaster/.*$' # CORS_URLS_REGEX = r'^//disaster/.*$'
#跨域增加忽略
CORS_ALLOW_CREDENTIALS = True CORS_ALLOW_CREDENTIALS = True
CORS_ORIGIN_ALLOW_ALL = True CORS_ORIGIN_ALLOW_ALL = True
CORS_ORIGIN_WHITELIST = ( CORS_ORIGIN_WHITELIST = (

17
gs.py
View File

@ -120,11 +120,14 @@ if __name__ == '__main__':
gs = GeoServer('http://210.77.68.250:8080/geoserver', 'admin', 'geoserver', 'baoji') gs = GeoServer('http://210.77.68.250:8080/geoserver', 'admin', 'geoserver', 'baoji')
# name = gs.create_and_publish_geotiff('baoji/sample/Baojishi_Cotton_2016_1KM.tif') for y in range(1979, 2016):
# for m in range(1, 13):
# print('coverage storage name :' + name) file_name = "%s-%s-temp.tif" % (y, m)
# print('layer name :' + name) print(file_name)
name = gs.create_and_publish_geotiff('baoji/temp/%s' % (file_name))
name = gs.create_and_publish_shp('baoji/sample/baoji_grid.shp') print('coverage storage name :' + name)
print('data storage name:' + name)
print('layer name :' + name) print('layer name :' + name)
# name = gs.create_and_publish_shp('baoji/sample/baoji_grid.shp')
# print('data storage name:' + name)
# print('layer name:' + name)