Difference between revisions of "Simple "Hello world" application"
From MyWiki
Line 8: | Line 8: | ||
''$ python manage.py startapp hello'' <br> | ''$ python manage.py startapp hello'' <br> | ||
This will create a folder called "hello" containing a variety of files<br> | This will create a folder called "hello" containing a variety of files<br> | ||
− | In the lecture3 folder edit the settings.py file and add the hello app to the configuration | + | '''In the lecture3 folder edit the settings.py file and add the hello app to the configuration''' |
<source lang="text"> | <source lang="text"> | ||
INSTALLED_APPS = [ | INSTALLED_APPS = [ |
Revision as of 13:20, 18 March 2021
Start a project:
$ django-admin startproject lecture3
Change directory into the folder "lecture3:
$ cd lecture3
Run the webserver then navigate to http://localhost:8000 to check that it is working
$ python manage.py runserver
Create a simple app called "hello"
$ python manage.py startapp hello
This will create a folder called "hello" containing a variety of files
In the lecture3 folder edit the settings.py file and add the hello app to the configuration
INSTALLED_APPS = [ 'hello', 'django.contrib.admin'