Skip to content

Commit c078b33

Browse files
authored
fix: changing default project name to my_project
1 parent 73cbb9c commit c078b33

File tree

1 file changed

+25
-25
lines changed

1 file changed

+25
-25
lines changed

docs/tutorial/quickstart.md

+25-25
Original file line numberDiff line numberDiff line change
@@ -18,32 +18,32 @@ Create a new Django project named `tutorial`, then start a new app called `quick
1818
pip install djangorestframework
1919

2020
# Set up a new project with a single application
21-
django-admin startproject tutorial . # Note the trailing '.' character
22-
cd tutorial
21+
django-admin startproject my_project . # Note the trailing '.' character
22+
cd my_project
2323
django-admin startapp quickstart
2424
cd ..
2525

2626
The project layout should look like:
2727

2828
$ pwd
29-
<some path>/tutorial
29+
<some path>/my_project
3030
$ find .
3131
.
32-
./tutorial
33-
./tutorial/asgi.py
34-
./tutorial/__init__.py
35-
./tutorial/quickstart
36-
./tutorial/quickstart/migrations
37-
./tutorial/quickstart/migrations/__init__.py
38-
./tutorial/quickstart/models.py
39-
./tutorial/quickstart/__init__.py
40-
./tutorial/quickstart/apps.py
41-
./tutorial/quickstart/admin.py
42-
./tutorial/quickstart/tests.py
43-
./tutorial/quickstart/views.py
44-
./tutorial/settings.py
45-
./tutorial/urls.py
46-
./tutorial/wsgi.py
32+
./my_project
33+
./my_project/asgi.py
34+
./my_project/__init__.py
35+
./my_project/quickstart
36+
./my_project/quickstart/migrations
37+
./my_project/quickstart/migrations/__init__.py
38+
./my_project/quickstart/models.py
39+
./my_project/quickstart/__init__.py
40+
./my_project/quickstart/apps.py
41+
./my_project/quickstart/admin.py
42+
./my_project/quickstart/tests.py
43+
./my_project/quickstart/views.py
44+
./my_project/settings.py
45+
./my_project/urls.py
46+
./my_project/wsgi.py
4747
./env
4848
./env/...
4949
./manage.py
@@ -62,7 +62,7 @@ Once you've set up a database and the initial user is created and ready to go, o
6262

6363
## Serializers
6464

65-
First up we're going to define some serializers. Let's create a new module named `tutorial/quickstart/serializers.py` that we'll use for our data representations.
65+
First up we're going to define some serializers. Let's create a new module named `my_project/quickstart/serializers.py` that we'll use for our data representations.
6666

6767
from django.contrib.auth.models import Group, User
6868
from rest_framework import serializers
@@ -83,12 +83,12 @@ Notice that we're using hyperlinked relations in this case with `HyperlinkedMode
8383

8484
## Views
8585

86-
Right, we'd better write some views then. Open `tutorial/quickstart/views.py` and get typing.
86+
Right, we'd better write some views then. Open `my_project/quickstart/views.py` and get typing.
8787

8888
from django.contrib.auth.models import Group, User
8989
from rest_framework import permissions, viewsets
9090

91-
from tutorial.quickstart.serializers import GroupSerializer, UserSerializer
91+
from my_project.quickstart.serializers import GroupSerializer, UserSerializer
9292

9393

9494
class UserViewSet(viewsets.ModelViewSet):
@@ -114,12 +114,12 @@ We can easily break these down into individual views if we need to, but using vi
114114

115115
## URLs
116116

117-
Okay, now let's wire up the API URLs. On to `tutorial/urls.py`...
117+
Okay, now let's wire up the API URLs. On to `my_project/urls.py`...
118118

119119
from django.urls import include, path
120120
from rest_framework import routers
121121

122-
from tutorial.quickstart import views
122+
from my_project.quickstart import views
123123

124124
router = routers.DefaultRouter()
125125
router.register(r'users', views.UserViewSet)
@@ -139,7 +139,7 @@ Again, if we need more control over the API URLs we can simply drop down to usin
139139
Finally, we're including default login and logout views for use with the browsable API. That's optional, but useful if your API requires authentication and you want to use the browsable API.
140140

141141
## Pagination
142-
Pagination allows you to control how many objects per page are returned. To enable it add the following lines to `tutorial/settings.py`
142+
Pagination allows you to control how many objects per page are returned. To enable it add the following lines to `my_project/settings.py`
143143

144144
REST_FRAMEWORK = {
145145
'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.PageNumberPagination',
@@ -148,7 +148,7 @@ Pagination allows you to control how many objects per page are returned. To enab
148148

149149
## Settings
150150

151-
Add `'rest_framework'` to `INSTALLED_APPS`. The settings module will be in `tutorial/settings.py`
151+
Add `'rest_framework'` to `INSTALLED_APPS`. The settings module will be in `my_project/settings.py`
152152

153153
INSTALLED_APPS = [
154154
...

0 commit comments

Comments
 (0)