Skip to content

Commit 319154c

Browse files
committed
adding version to Home page
1 parent c1eb975 commit 319154c

File tree

2 files changed

+9
-17
lines changed

2 files changed

+9
-17
lines changed

README.md

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -37,25 +37,12 @@ Demo: http://dj.lxer.eu
3737
- $ cd project
3838
- $ source bin/activate
3939

40-
- Now there are 2 options: either run install.sh
40+
- run install.sh :
4141
- $ source <(wget -qO- https://raw.githubusercontent.com/allox/django-base-template/master/install.sh)
4242

43-
or run the following manually:
44-
45-
- $ pip install Django
46-
- $ bin/django-admin.py startproject --template https://github.com/allox/django-base-template-1.8/zipball/master --extension py,md,rst mainapp
47-
- $ mv mainapp/ src
48-
- $ cd src
49-
- Uncomment your preferred database adapter in requirements/compiled.txt (MySQL, Postgresql, or skip this step to stick with SQLite)
50-
- $ pip install -r requirements/local.txt
51-
- $ cp mainapp/settings/local-dist.py mainapp/settings/local.py
52-
- $ chmod +x manage.py
53-
- $ ./manage.py makemigrations
54-
- $ ./manage.py migrate
55-
- $ ./manage.py createsuperuser
56-
- $ ./manage.py collectstatic
57-
- $ ./manage.py runserver
43+
(To see what actually happens check https://raw.githubusercontent.com/allox/django-base-template/master/install.sh )
5844

45+
...and that's all!
5946

6047

6148

base/views.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
""" Views for the base application """
22

33
from django.shortcuts import render, render_to_response, HttpResponseRedirect
4+
import django
45

56
def home(request):
67
""" Default view for the root """
7-
return render(request, 'base/home.html')
8+
djangoversion = django.get_version()
9+
return render(request, 'base/home.html',{'djangoversion':djangoversion })
10+
11+
12+
return render(request, 'base/home.html')
813

914
def profile(request):
1015
return render(request, "user/profile.html" )

0 commit comments

Comments
 (0)