Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
D
django-url-follower
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nikolaos S. Papaspyrou
django-url-follower
Commits
f4b661c7
Commit
f4b661c7
authored
Jun 15, 2015
by
Nikolaos S. Papaspyrou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add part 2, admin user and automatic forms
parent
b6c0fa2b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
0 deletions
+17
-0
README.md
README.md
+12
-0
admin.py
urlapp/admin.py
+5
-0
No files found.
README.md
View file @
f4b661c7
A simple web application in Python, using Django
A simple web application in Python, using Django
================================================
================================================
Part 1
------
Install the virtual environment:
Install the virtual environment:
virtualenv --no-site-packages venv
virtualenv --no-site-packages venv
...
@@ -69,3 +72,12 @@ Show in the interactive shell:
...
@@ -69,3 +72,12 @@ Show in the interactive shell:
>>> u.url_set.count()
>>> u.url_set.count()
1
1
Part 2
------
Create admin user:
python manage.py createsuperuser
Edit
`urlapp/admin.py`
to allow modifications to the app.
urlapp/admin.py
View file @
f4b661c7
from
django.contrib
import
admin
from
django.contrib
import
admin
# Register your models here.
# Register your models here.
from
.models
import
User
,
Url
admin
.
site
.
register
(
User
)
admin
.
site
.
register
(
Url
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment