Bonjour,
Fraichement sorti de l’oeuf j’aurais aimé apprendre à programmer un peu, en python et notamment avec le framework django.
Python v2.6
J’ai installé django v1.2.3 depuis les dépôts avec apt-get, et je reste bloqué ici sur la documentation
[code]Creating a project
If this is your first time using Django, you’ll have to take care of some initial setup. Namely, you’ll need to auto-generate some code that establishes a Django project – a collection of settings for an instance of Django, including database configuration, Django-specific options and application-specific settings.
From the command line, cd into a directory where you’d like to store your code, then run the following command:
django-admin.py startproject mysite
This will create a mysite directory in your current directory. If it didn’t work, see Problems running django-admin.py.[/code]
Je vais donc ici If it didn’t work, see Problems running django-admin.py.
voilà les messages d’erreur sur différentes commandes:
[code]>>> import django
django-admin startproject website
File “”, line 1
django-admin startproject website
^
SyntaxError: invalid syntaxdjango-admin.py startproject website
File “”, line 1
django-admin.py startproject website
^
SyntaxError: invalid syntaxdjango-admin.py
Traceback (most recent call last):
File “”, line 1, in
NameError: name ‘admin’ is not defined
[/code]
le $path de mon terminal est /home/user et
[code]>>> import sys
from pprint import pprint as pp
pp(sys.path)
[’’,
’/home/user’,
’/home/user/python’,
’/usr/lib/python2.6’,
’/usr/lib/python2.6/plat-linux2’,
’/usr/lib/python2.6/lib-tk’,
’/usr/lib/python2.6/lib-old’,
’/usr/lib/python2.6/lib-dynload’,
’/usr/local/lib/python2.6/dist-packages’,
’/usr/lib/python2.6/dist-packages’,
’/usr/lib/python2.6/dist-packages/PIL’,
’/usr/lib/python2.6/dist-packages/gst-0.10’,
’/usr/lib/pymodules/python2.6’,
’/usr/lib/pymodules/python2.6/gtk-2.0’]
[/code]
J’attends votre aide. Merci