This commit is contained in:
Bob 2019-10-08 15:22:01 +08:00
parent b79b1ccab8
commit 29f1c00009
3 changed files with 172 additions and 82 deletions

View File

@ -3,8 +3,8 @@
<component name="ChangeListManager">
<list default="true" id="9cbc7ee8-e518-44ca-870c-9743cf0f1b98" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/dashboard/static/dashboard/js/index_1.js" beforeDir="false" afterPath="$PROJECT_DIR$/dashboard/static/dashboard/js/index_1.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/dashboard/static/dashboard/js/index_2.js" beforeDir="false" afterPath="$PROJECT_DIR$/dashboard/static/dashboard/js/index_2.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/linbei/settings.py" beforeDir="false" afterPath="$PROJECT_DIR$/linbei/settings.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/requirements.txt" beforeDir="false" afterPath="$PROJECT_DIR$/requirements.txt" afterDir="false" />
</list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="SHOW_DIALOG" value="false" />
@ -15,28 +15,10 @@
<component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/dashboard/views.py">
<entry file="file://$PROJECT_DIR$/dashboard/templates/dashboard/common/base.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="176">
<caret line="8" column="36" selection-start-line="8" selection-start-column="36" selection-end-line="8" selection-end-column="36" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/dashboard/templates/dashboard/index_2.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="616">
<caret line="28" column="45" selection-start-line="28" selection-start-column="45" selection-end-line="28" selection-end-column="45" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/dashboard/static/dashboard/js/index_2.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-20">
<caret line="25" column="19" selection-start-line="25" selection-start-column="19" selection-end-line="25" selection-end-column="19" />
<state relative-caret-position="550">
<caret line="25" column="21" selection-start-line="25" selection-start-column="21" selection-end-line="25" selection-end-column="21" />
</state>
</provider>
</entry>
@ -56,8 +38,17 @@
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/dashboard/templates/dashboard/index_1.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="286">
<caret line="13" column="29" selection-start-line="13" selection-start-column="29" selection-end-line="13" selection-end-column="29" />
<state relative-caret-position="616">
<caret line="28" column="46" selection-start-line="28" selection-start-column="46" selection-end-line="28" selection-end-column="46" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/dashboard/static/dashboard/js/dashboard.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="44">
<caret line="2" column="3" selection-start-line="2" selection-start-column="3" selection-end-line="2" selection-end-column="3" />
</state>
</provider>
</entry>
@ -65,10 +56,10 @@
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/dashboard/static/dashboard/js/index_1.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="594">
<caret line="36" column="18" selection-start-line="36" selection-start-column="16" selection-end-line="36" selection-end-column="18" />
<state relative-caret-position="332">
<caret line="29" column="18" selection-start-line="29" selection-start-column="18" selection-end-line="29" selection-end-column="18" />
<folding>
<marker date="1568185950574" expanded="true" signature="1253:1279" ph="..." />
<marker date="1568879277382" expanded="true" signature="1253:1279" ph="..." />
</folding>
</state>
</provider>
@ -103,11 +94,11 @@
<provider selected="true" editor-type-id="text-editor" />
</entry>
</file>
<file pinned="false" current-in-tab="false">
<file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/linbei/settings.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="924">
<caret line="45" column="35" selection-start-line="45" selection-start-column="35" selection-end-line="45" selection-end-column="35" />
<state relative-caret-position="498">
<caret line="60" selection-start-line="60" selection-end-line="60" />
<folding>
<element signature="e#305#314#0" expanded="true" />
</folding>
@ -115,6 +106,15 @@
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/requirements.txt">
<provider selected="true" editor-type-id="text-editor">
<state>
<caret column="19" lean-forward="true" selection-start-column="19" selection-end-column="19" />
</state>
</provider>
</entry>
</file>
</leaf>
</component>
<component name="FileTemplateManagerImpl">
@ -128,6 +128,7 @@
<component name="FindInProjectRecents">
<findStrings>
<find>max</find>
<find>cors</find>
</findStrings>
</component>
<component name="Git.Settings">
@ -143,18 +144,18 @@
<option value="$PROJECT_DIR$/graphic/views.py" />
<option value="$PROJECT_DIR$/graphic/templates/graphic/index.html" />
<option value="$PROJECT_DIR$/dashboard/templates/dashboard/common/base.html" />
<option value="$PROJECT_DIR$/linbei/settings.py" />
<option value="$PROJECT_DIR$/fabfile.py" />
<option value="$PROJECT_DIR$/linbei/wsgi.py" />
<option value="$PROJECT_DIR$/requirements.txt" />
<option value="$PROJECT_DIR$/dashboard/templates/dashboard/index.html" />
<option value="$PROJECT_DIR$/dashboard/static/dashboard/js/index.js" />
<option value="$PROJECT_DIR$/linbei/urls.py" />
<option value="$PROJECT_DIR$/dashboard/urls.py" />
<option value="$PROJECT_DIR$/dashboard/views.py" />
<option value="$PROJECT_DIR$/dashboard/templates/dashboard/index_2.html" />
<option value="$PROJECT_DIR$/dashboard/static/dashboard/js/index_1.js" />
<option value="$PROJECT_DIR$/dashboard/static/dashboard/js/index_2.js" />
<option value="$PROJECT_DIR$/dashboard/static/dashboard/js/index_1.js" />
<option value="$PROJECT_DIR$/requirements.txt" />
<option value="$PROJECT_DIR$/linbei/settings.py" />
</list>
</option>
</component>
@ -170,6 +171,7 @@
<foldersAlwaysOnTop value="true" />
</navigator>
<panes>
<pane id="Scope" />
<pane id="ProjectPane">
<subPane>
<expand>
@ -195,6 +197,14 @@
<item name="static" type="462c0819:PsiDirectoryNode" />
<item name="dashboard" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="linbei" type="b2602c69:ProjectViewProjectNode" />
<item name="linbei" type="462c0819:PsiDirectoryNode" />
<item name="dashboard" type="462c0819:PsiDirectoryNode" />
<item name="static" type="462c0819:PsiDirectoryNode" />
<item name="dashboard" type="462c0819:PsiDirectoryNode" />
<item name="css" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="linbei" type="b2602c69:ProjectViewProjectNode" />
<item name="linbei" type="462c0819:PsiDirectoryNode" />
@ -203,6 +213,15 @@
<item name="dashboard" type="462c0819:PsiDirectoryNode" />
<item name="js" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="linbei" type="b2602c69:ProjectViewProjectNode" />
<item name="linbei" type="462c0819:PsiDirectoryNode" />
<item name="dashboard" type="462c0819:PsiDirectoryNode" />
<item name="static" type="462c0819:PsiDirectoryNode" />
<item name="dashboard" type="462c0819:PsiDirectoryNode" />
<item name="js" type="462c0819:PsiDirectoryNode" />
<item name="leaflet.js" type="620a8d5e:NestingTreeNode" />
</path>
<path>
<item name="linbei" type="b2602c69:ProjectViewProjectNode" />
<item name="linbei" type="462c0819:PsiDirectoryNode" />
@ -219,13 +238,58 @@
<path>
<item name="linbei" type="b2602c69:ProjectViewProjectNode" />
<item name="linbei" type="462c0819:PsiDirectoryNode" />
<item name="dashboard" type="462c0819:PsiDirectoryNode" />
<item name="templates" type="462c0819:PsiDirectoryNode" />
<item name="dashboard" type="462c0819:PsiDirectoryNode" />
<item name="common" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="linbei" type="b2602c69:ProjectViewProjectNode" />
<item name="linbei" type="462c0819:PsiDirectoryNode" />
<item name="linbei" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="linbei" type="b2602c69:ProjectViewProjectNode" />
<item name="linbei" type="462c0819:PsiDirectoryNode" />
<item name="static" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="linbei" type="b2602c69:ProjectViewProjectNode" />
<item name="linbei" type="462c0819:PsiDirectoryNode" />
<item name="static" type="462c0819:PsiDirectoryNode" />
<item name="css" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="linbei" type="b2602c69:ProjectViewProjectNode" />
<item name="linbei" type="462c0819:PsiDirectoryNode" />
<item name="static" type="462c0819:PsiDirectoryNode" />
<item name="css" type="462c0819:PsiDirectoryNode" />
<item name="bootstrap.css" type="620a8d5e:NestingTreeNode" />
</path>
<path>
<item name="linbei" type="b2602c69:ProjectViewProjectNode" />
<item name="linbei" type="462c0819:PsiDirectoryNode" />
<item name="static" type="462c0819:PsiDirectoryNode" />
<item name="css" type="462c0819:PsiDirectoryNode" />
<item name="font-awesome.css" type="620a8d5e:NestingTreeNode" />
</path>
<path>
<item name="linbei" type="b2602c69:ProjectViewProjectNode" />
<item name="linbei" type="462c0819:PsiDirectoryNode" />
<item name="static" type="462c0819:PsiDirectoryNode" />
<item name="js" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="linbei" type="b2602c69:ProjectViewProjectNode" />
<item name="linbei" type="462c0819:PsiDirectoryNode" />
<item name="static" type="462c0819:PsiDirectoryNode" />
<item name="js" type="462c0819:PsiDirectoryNode" />
<item name="bootstrap.js" type="620a8d5e:NestingTreeNode" />
</path>
</expand>
<select />
</subPane>
</pane>
<pane id="Scope" />
</panes>
</component>
<component name="PropertiesComponent">
@ -237,9 +301,6 @@
<property name="nodejs_npm_path_reset_for_default_project" value="true" />
</component>
<component name="RecentsManager">
<key name="MoveFile.RECENT_KEYS">
<recent name="D:\python\p3\linbei\dashboard\static\dashboard" />
</key>
<key name="CopyFile.RECENT_KEYS">
<recent name="D:\python\p3\linbei\dashboard\static\dashboard\js" />
<recent name="D:\python\p3\linbei\dashboard\templates\dashboard" />
@ -247,6 +308,9 @@
<recent name="D:\python\p3\linbei\dashboard\static\dashboard\css" />
<recent name="D:\python\p3\linbei\static\js" />
</key>
<key name="MoveFile.RECENT_KEYS">
<recent name="D:\python\p3\linbei\dashboard\static\dashboard" />
</key>
</component>
<component name="RunDashboard">
<option name="ruleStates">
@ -302,7 +366,13 @@
<workItem from="1567827831206" duration="9000" />
<workItem from="1567992171914" duration="1429000" />
<workItem from="1567998459437" duration="1224000" />
<workItem from="1568185200136" duration="797000" />
<workItem from="1568185200136" duration="1001000" />
<workItem from="1568186271609" duration="50000" />
<workItem from="1568870203697" duration="706000" />
<workItem from="1568872451262" duration="933000" />
<workItem from="1568879070987" duration="209000" />
<workItem from="1568879428159" duration="222000" />
<workItem from="1570518069954" duration="876000" />
</task>
<task id="LOCAL-00001" summary="#creat">
<created>1567674653918</created>
@ -374,17 +444,24 @@
<option name="project" value="LOCAL" />
<updated>1567992755517</updated>
</task>
<option name="localTasksCounter" value="11" />
<task id="LOCAL-00011" summary="#index">
<created>1568186037061</created>
<option name="number" value="00011" />
<option name="presentableId" value="LOCAL-00011" />
<option name="project" value="LOCAL" />
<updated>1568186037061</updated>
</task>
<option name="localTasksCounter" value="12" />
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="22550000" />
<option name="totallyTimeSpent" value="25750000" />
</component>
<component name="ToolWindowManager">
<frame x="-8" y="-8" width="1936" height="1056" extended-state="6" />
<editor active="true" />
<layout>
<window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.2683706" />
<window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.28434506" />
<window_info id="Structure" order="1" side_tool="true" weight="0.25" />
<window_info id="Favorites" order="2" side_tool="true" />
<window_info anchor="bottom" id="Message" order="0" />
@ -398,7 +475,7 @@
<window_info anchor="bottom" id="Version Control" order="8" weight="0.32937366" />
<window_info anchor="bottom" id="Database Changes" order="9" />
<window_info anchor="bottom" id="Event Log" order="10" side_tool="true" />
<window_info anchor="bottom" id="Terminal" order="11" visible="true" weight="0.32937366" />
<window_info active="true" anchor="bottom" id="Terminal" order="11" visible="true" weight="0.32937366" />
<window_info anchor="bottom" id="Python Console" order="12" />
<window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
<window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
@ -427,13 +504,6 @@
<entry file="file://$PROJECT_DIR$/dashboard/static/dashboard/js/map-height.js">
<provider selected="true" editor-type-id="text-editor" />
</entry>
<entry file="file://$PROJECT_DIR$/dashboard/static/dashboard/js/dashboard.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="44">
<caret line="2" column="3" selection-start-line="2" selection-start-column="3" selection-end-line="2" selection-end-column="3" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/dashboard/static/dashboard/css/dashboard.css">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-8316" />
@ -457,19 +527,9 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/requirements.txt">
<provider selected="true" editor-type-id="text-editor" />
</entry>
<entry file="file://$PROJECT_DIR$/dashboard/admin.py">
<provider selected="true" editor-type-id="text-editor" />
</entry>
<entry file="file://$PROJECT_DIR$/dashboard/templates/dashboard/common/base.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="550">
<caret line="25" column="21" selection-start-line="25" selection-start-column="21" selection-end-line="25" selection-end-column="21" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/fabfile.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="198">
@ -501,6 +561,23 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/dashboard/static/dashboard/js/index_2.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="550">
<caret line="25" column="19" selection-start-line="25" selection-start-column="19" selection-end-line="25" selection-end-column="19" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/dashboard/static/dashboard/js/crop_planting_distribution.js">
<provider selected="true" editor-type-id="text-editor" />
</entry>
<entry file="file://$PROJECT_DIR$/dashboard/templates/dashboard/common/base.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="550">
<caret line="25" column="21" selection-start-line="25" selection-start-column="21" selection-end-line="25" selection-end-column="21" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/dashboard/urls.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="154">
@ -513,8 +590,15 @@
</entry>
<entry file="file://$PROJECT_DIR$/dashboard/templates/dashboard/index_1.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="286">
<caret line="13" column="29" selection-start-line="13" selection-start-column="29" selection-end-line="13" selection-end-column="29" />
<state relative-caret-position="616">
<caret line="28" column="46" selection-start-line="28" selection-start-column="46" selection-end-line="28" selection-end-column="46" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/dashboard/static/dashboard/js/dashboard.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="44">
<caret line="2" column="3" selection-start-line="2" selection-start-column="3" selection-end-line="2" selection-end-column="3" />
</state>
</provider>
</entry>
@ -541,32 +625,32 @@
<entry file="file://$PROJECT_DIR$/manage.py">
<provider selected="true" editor-type-id="text-editor" />
</entry>
<entry file="file://$PROJECT_DIR$/dashboard/static/dashboard/js/index_1.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="332">
<caret line="29" column="18" selection-start-line="29" selection-start-column="18" selection-end-line="29" selection-end-column="18" />
<folding>
<marker date="1568879277382" expanded="true" signature="1253:1279" ph="..." />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/requirements.txt">
<provider selected="true" editor-type-id="text-editor">
<state>
<caret column="19" lean-forward="true" selection-start-column="19" selection-end-column="19" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/linbei/settings.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="924">
<caret line="45" column="35" selection-start-line="45" selection-start-column="35" selection-end-line="45" selection-end-column="35" />
<state relative-caret-position="498">
<caret line="60" selection-start-line="60" selection-end-line="60" />
<folding>
<element signature="e#305#314#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/dashboard/static/dashboard/js/index_1.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="594">
<caret line="36" column="18" selection-start-line="36" selection-start-column="16" selection-end-line="36" selection-end-column="18" />
<folding>
<marker date="1568185950574" expanded="true" signature="1253:1279" ph="..." />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/dashboard/static/dashboard/js/index_2.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-20">
<caret line="25" column="19" selection-start-line="25" selection-start-column="19" selection-end-line="25" selection-end-column="19" />
</state>
</provider>
</entry>
</component>
</project>

View File

@ -37,6 +37,7 @@ INSTALLED_APPS = [
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'corsheaders',
'bootstrap3',
'dashboard',
]
@ -45,6 +46,7 @@ MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'django.middleware.locale.LocaleMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'corsheaders.middleware.CorsMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
@ -54,6 +56,10 @@ MIDDLEWARE = [
ROOT_URLCONF = 'linbei.urls'
CORS_ALLOW_CREDENTIALS = True
CORS_ORIGIN_ALLOW_ALL = True
CORS_ALLOW_HEADERS = ('*')
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
@ -122,7 +128,6 @@ STATICFILES_DIRS = [
os.path.join(BASE_DIR, "static"),
]
STATIC_ROOT = '/var/www/p3/linbei/static'
MEDIA_URL = '/media/'

View File

@ -0,0 +1 @@
django-cors-headers