Difference between revisions of "Django app"

From Finninday
Jump to: navigation, search
Line 45: Line 45:
  
 
2 directories, 5 files
 
2 directories, 5 files
 +
</pre>
 +
 +
=== sidebar to set up git repo for the code ===
 +
 +
Tried running the development server on weasel, but ran into firewall rules.
 +
Moved development to a workstation which is more in the spirit of the tutorial.
 +
 +
Had to install django there...
 +
 +
<pre>
 +
root@ferret:~/git/church-django/mysite# apt-get install python-django
 +
</pre>
 +
And get the codebase
 +
<pre>
 +
rday@ferret:~/git$ git clone ssh://weasel/drobo2/git/church-django.git
 +
Cloning into 'church-django'...
 
</pre>
 
</pre>

Revision as of 04:20, 5 May 2014

Notes while running through the Django tutorial.

First, browse the overview here: https://docs.djangoproject.com/en/1.6/intro/overview/

The real tutorial is here: https://docs.djangoproject.com/en/1.6/intro/tutorial01/

Oops, have to install (https://docs.djangoproject.com/en/1.6/intro/install/) before doing the tutorial.

Ahh, I guess it *is* installed:

rday@weasel:~/bin$ dpkg -l "*django*"
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                        Version            Architecture       Description
+++-===========================-==================-==================-============================================================
ii  python-django               1.6.1-2ubuntu0.2   all                High-level Python web development framework
un  python-django-doc           <none>             <none>             (no description available)
ii  python-django-tagging       1:0.3.1-3          all                Generic tagging application for Django projects

rday@weasel:~/bin$ python
Python 2.7.6 (default, Mar 22 2014, 22:59:56) 
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import django
>>> print(django.get_version())
1.6.1

OK, back to the tutorial.

rday@weasel:~/church-django$ django-admin.py startproject mysite
rday@weasel:~/church-django$ tree
.
└── mysite
    ├── manage.py
    └── mysite
        ├── __init__.py
        ├── settings.py
        ├── urls.py
        └── wsgi.py

2 directories, 5 files

sidebar to set up git repo for the code

Tried running the development server on weasel, but ran into firewall rules. Moved development to a workstation which is more in the spirit of the tutorial.

Had to install django there...

root@ferret:~/git/church-django/mysite# apt-get install python-django

And get the codebase

rday@ferret:~/git$ git clone ssh://weasel/drobo2/git/church-django.git
Cloning into 'church-django'...