Created
January 21, 2017 03:59
-
-
Save MingqianYang/77f88a0c57f9bdc40466f25b12a9a89c to your computer and use it in GitHub Desktop.
django toutoril
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<component name="ProjectDictionaryState"> | |
<dictionary name="a1" /> | |
</component> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<module type="PYTHON_MODULE" version="4"> | |
<component name="NewModuleRootManager"> | |
<content url="file://$MODULE_DIR$" /> | |
<orderEntry type="inheritedJdk" /> | |
<orderEntry type="sourceFolder" forTests="false" /> | |
</component> | |
<component name="TestRunnerService"> | |
<option name="PROJECT_TEST_RUNNER" value="Unittests" /> | |
</component> | |
</module> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<component name="InspectionProjectProfileManager"> | |
<settings> | |
<option name="USE_PROJECT_PROFILE" value="false" /> | |
<version value="1.0" /> | |
</settings> | |
</component> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<component name="InspectionProjectProfileManager"> | |
<profile version="1.0"> | |
<option name="myName" value="Project Default" /> | |
</profile> | |
</component> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<project version="4"> | |
<component name="ProjectInspectionProfilesVisibleTreeState"> | |
<entry key="Project Default"> | |
<profile-state> | |
<expanded-state> | |
<State> | |
<id /> | |
</State> | |
</expanded-state> | |
<selected-state> | |
<State> | |
<id>Buildout</id> | |
</State> | |
</selected-state> | |
</profile-state> | |
</entry> | |
</component> | |
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.4.0 (/Library/Frameworks/Python.framework/Versions/3.4/bin/python3.4)" project-jdk-type="Python SDK" /> | |
<component name="masterDetails"> | |
<states> | |
<state key="ScopeChooserConfigurable.UI"> | |
<settings> | |
<splitter-proportions> | |
<option name="proportions"> | |
<list> | |
<option value="0.2" /> | |
</list> | |
</option> | |
</splitter-proportions> | |
</settings> | |
</state> | |
</states> | |
</component> | |
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<project version="4"> | |
<component name="ProjectModuleManager"> | |
<modules> | |
<module fileurl="file://$PROJECT_DIR$/.idea/djangoPlayground.iml" filepath="$PROJECT_DIR$/.idea/djangoPlayground.iml" /> | |
</modules> | |
</component> | |
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
django install | |
django-admin startproject projectName | |
django-admin startapp blog | |
edit settings.py | |
app add----->blog | |
edit views url.py | |
url(r'blog/index/$', 'blog.views.index') | |
edit blog/views.py | |
from django.http import HttpResponse | |
def index(req): | |
return HttpResponse('<h1>hello</h1>') | |
python3.4 manage.py runserver | |
url:127.0.0.1:8000 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment