just started trying to use django, which is so much good had read (at least here
). I would like the
Curious: the occasion to talk about Django, he went out as usual, the problem of pronunciation. Well-informed sources say that it is said dżangoh (d voiceless, oh oh passing in;)). As I went walking companion:
DjangoBook
, will seek solutions to problems in the first and accessible to the terms of the GNU
book. At the moment, not all its chapters are written (most are), so sometimes you will need to support the search engine.
starter kit I already have: Linux (Ubuntu DD-> EE-> FF), Python, Django, MySQL. All to find in Synaptic. Of course, you can use django with other common databases (and without any database, which also used to verify). In DjangoBooku (hereinafter DB) write that check whether you have the mysql-python, I have in Ubuntu python-MySQLdb and it seems that it is precisely this package. In addition, of course, one can check if it works phpmyadmin (unfortunately, at the moment of Linux IMHO the lack of a better tool, you can still try to kexi). worth mentioning on the occasion of my knowledge of Python. I wrote a few (very few) scripts (in size, as I say, the screen). I read a little about the language (including one mid-sized book), is interested in him for a long time. Professionally, however, always was programming in other languages. What _mi_ in Python like the most is attached batteries as indentation and force (as someone will take classes in programming for beginners in any language like C, you will know why this is a plus language). Knowledge of Django: I heard that a good and nothing more. Meaning: Python 4 / 10, Django 1 / 10.
database to my project, I was almost ready, so you probably will not be specifically bent over her. At the beginning of the terminal, go to your directory with the parties (in my public_html directory and write: django-admin
startproject mdjango
(DB write:
django-admin.py startproject mysite
, but the installation package django added somewhere in an elegant script and knows that it starts python). From what I know at the moment, Django can store several applications in one project.
project database stores settings, options, Django, and App.
arise following files: __init__.py
, manage.py, settings.py, urls.py
. What you will need to write what they are. Yes
resulting page, you can immediately check with the built-in mini http server. Just run it (in the directory mdjango): . / Manage.py runserver
(DB again given the long version: python manage.py
runserver
). I just have a default port (8000) busy, so get the error: Error: That port is already in use. Port changes trywalnie: . / Manage.py runserver
8080 (DB: python manage.py
runserver
8080). After entering the http://localhost:8080/
acting immediately see the project page with instructions. Time for a first evaluation: I have a few tried and tested frameworks (including RoR and CakePHP) Django wins at this stage, the time to come to that point was just short as possible.
0 comments:
Post a Comment