FTP | CCD | Buscar | Trucos | Trabajo | Foros |
|
Registrarse | FAQ | Miembros | Calendario | Guía de estilo | Temas de Hoy |
|
Herramientas | Buscar en Tema | Desplegado |
#3
|
||||
|
||||
Creamos una carpeta pyhton y dentro creamos un proyecto, y editamos el archivo settings.py en el cual ponemos el user y pass y dbname de una base de datos previamente creada, con mysql, aunque puede usarse cualquier otra.
#mkdir python #cd python/ #django-admin startproject pruebas #cd pruebas #vi settings.py #python manage.py syncdb Aqui obtenemos un error: File "/usr/lib/pymodules/python2.6/django/db/backends/mysql/base.py", line 14, in <module> raise ImproperlyConfigured("Error loading MySQLdb module: %s" % e) django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: No module named MySQLdb A ver si es que necesitamos instalar el paquete python-mysql: #sudo aptitude install python-mysqldb Probamos de nuevo: #python manage.py syncdb Creating table auth_permission Creating table auth_group_permissions Creating table auth_group Creating table auth_user_user_permissions Creating table auth_user_groups Creating table auth_user Creating table auth_message Creating table django_content_type Creating table django_session Creating table django_site You just installed Django's auth system, which means you don't have any superusers defined. Would you like to create one now? (yes/no): yes Username (Leave blank to use 'nailuj'): E-mail address: julian@clubdelphi.com Password: Password (again): Superuser created successfully. Installing index for auth.Permission model Installing index for auth.Group_permissions model Installing index for auth.User_user_permissions model Installing index for auth.User_groups model Installing index for auth.Message model No fixtures found. Ahora sí que vá. Y podemos ver el resultado lenzando el script en la shell: #python manage.py runserver 0.0.0.0:8000 y abriendo la url en el navegador: http://<mi_server>:8000
__________________
"la única iglesia que ilumina es la que arde" Anonimo Última edición por Julián fecha: 03-04-2011 a las 04:08:25. |
|
|
Temas Similares | ||||
Tema | Autor | Foro | Respuestas | Último mensaje |
Como Selecciona Impresora Para Tickets Y Otra Para Contratos, Ayuda!!! | kizé | Impresión | 1 | 17-10-2010 18:41:00 |
word para torpes | armando | Servers | 15 | 12-01-2009 13:59:38 |
WordPara Torpes y PascalScript | Gambito | Servers | 5 | 06-06-2008 16:23:58 |
Word para torpes y D2006 | maxvera | Servers | 0 | 18-08-2007 12:08:06 |
hay alguna utilería para abrir Quick Reports para una posterior impresión? | akela | Impresión | 3 | 30-01-2006 21:40:42 |
|