<?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" /> | |||||
<orderEntry type="module" module-name="dghj" /> | |||||
<orderEntry type="module" module-name="untitled" /> | |||||
<orderEntry type="module" module-name="untitled1" /> | |||||
<orderEntry type="module" module-name="untitled1" /> | |||||
<orderEntry type="module" module-name="django_project" /> | |||||
</component> | |||||
<component name="TestRunnerService"> | |||||
<option name="projectConfiguration" value="py.test" /> | |||||
<option name="PROJECT_TEST_RUNNER" value="py.test" /> | |||||
</component> | |||||
</module> |
<?xml version="1.0" encoding="UTF-8"?> | |||||
<project version="4"> | |||||
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.6 (untitled)" project-jdk-type="Python SDK" /> | |||||
</project> |
<?xml version="1.0" encoding="UTF-8"?> | |||||
<project version="4"> | |||||
<component name="ProjectModuleManager"> | |||||
<modules> | |||||
<module fileurl="file://$PROJECT_DIR$/.idea/MEIM.iml" filepath="$PROJECT_DIR$/.idea/MEIM.iml" /> | |||||
<module fileurl="file://$PROJECT_DIR$/../dghj/.idea/dghj.iml" filepath="$PROJECT_DIR$/../dghj/.idea/dghj.iml" /> | |||||
<module fileurl="file://$PROJECT_DIR$/django_project/.idea/django_project.iml" filepath="$PROJECT_DIR$/django_project/.idea/django_project.iml" /> | |||||
<module fileurl="file://$PROJECT_DIR$/../untitled/.idea/untitled.iml" filepath="$PROJECT_DIR$/../untitled/.idea/untitled.iml" /> | |||||
<module fileurl="file://$PROJECT_DIR$/../prakt3_django/.idea/untitled1.iml" filepath="$PROJECT_DIR$/../prakt3_django/.idea/untitled1.iml" /> | |||||
</modules> | |||||
</component> | |||||
</project> |
<?xml version="1.0" encoding="UTF-8"?> | |||||
<module type="PYTHON_MODULE" version="4"> | |||||
<component name="FacetManager"> | |||||
<facet type="django" name="Django"> | |||||
<configuration> | |||||
<option name="rootFolder" value="$MODULE_DIR$" /> | |||||
<option name="settingsModule" value="djp/settings.py" /> | |||||
<option name="manageScript" value="$MODULE_DIR$/manage.py" /> | |||||
<option name="environment" value="<map/>" /> | |||||
<option name="doNotUseTestRunner" value="false" /> | |||||
</configuration> | |||||
</facet> | |||||
</component> | |||||
<component name="NewModuleRootManager"> | |||||
<content url="file://$MODULE_DIR$" /> | |||||
<orderEntry type="inheritedJdk" /> | |||||
<orderEntry type="sourceFolder" forTests="false" /> | |||||
</component> | |||||
<component name="TemplatesService"> | |||||
<option name="TEMPLATE_CONFIGURATION" value="Django" /> | |||||
<option name="TEMPLATE_FOLDERS"> | |||||
<list> | |||||
<option value="$MODULE_DIR$/../djp\templates" /> | |||||
</list> | |||||
</option> | |||||
</component> | |||||
<component name="TestRunnerService"> | |||||
<option name="projectConfiguration" value="py.test" /> | |||||
<option name="PROJECT_TEST_RUNNER" value="py.test" /> | |||||
</component> | |||||
</module> |
<?xml version="1.0" encoding="UTF-8"?> | |||||
<project version="4"> | |||||
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.6 (untitled)" project-jdk-type="Python SDK" /> | |||||
</project> |
<?xml version="1.0" encoding="UTF-8"?> | |||||
<project version="4"> | |||||
<component name="ProjectModuleManager"> | |||||
<modules> | |||||
<module fileurl="file://$PROJECT_DIR$/.idea/djp.iml" filepath="$PROJECT_DIR$/.idea/djp.iml" /> | |||||
</modules> | |||||
</component> | |||||
</project> |
<?xml version="1.0" encoding="UTF-8"?> | |||||
<project version="4"> | |||||
<component name="VcsDirectoryMappings"> | |||||
<mapping directory="$PROJECT_DIR$/.." vcs="Git" /> | |||||
</component> | |||||
</project> |
1. Import the include() function: from django.urls import include, path | 1. Import the include() function: from django.urls import include, path | ||||
2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) | 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) | ||||
""" | """ | ||||
from django.conf.urls import url, include | |||||
from django.contrib import admin | from django.contrib import admin | ||||
from django.urls import path | |||||
urlpatterns = [ | urlpatterns = [ | ||||
path('admin/', admin.site.urls), | |||||
url(r'^polls/', include('polls.urls')), | |||||
url(r'^admin/', admin.site.urls), | |||||
] | ] |
from django.contrib import admin | |||||
# Register your models here. |
from django.apps import AppConfig | |||||
class PollsConfig(AppConfig): | |||||
name = 'polls' |
from django.db import models | |||||
# Create your models here. |
from django.test import TestCase | |||||
# Create your tests here. |
from django.conf.urls import url | |||||
from . import views | |||||
urlpatterns = [ | |||||
url(r'^$', views.index, name='index'), | |||||
] |
from django.http import HttpResponse | |||||
def index(request): | |||||
return HttpResponse('lalala') | |||||
# Create your views here. |