You are on page 1of 1

ivo@ivo-SVE14125CLB:/var/www/html$ django-admin.

py startproject mysite
ivo@ivo-SVE14125CLB:/var/www/html/mysite$ python manage.py migrate
ivo@ivo-SVE14125CLB:/var/www/html/mysite$ python manage.py runserver
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'prueba',
'USER': 'postgres',
'PASSWORD': '1234',
'HOST': 'localhost',
'PORT': '5432',
},
}
ivo@ivo-SVE14125CLB:/var/www/html/mysite$ python manage.py syncdb
ivo@ivo-SVE14125CLB:/var/www/html/mysite$ python manage.py startapp polls
ivo@ivo-SVE14125CLB:/var/www/html/mysite$ python manage.py makemigrations polls
ivo@ivo-SVE14125CLB:/var/www/html/mysite$ python manage.py sqlmigrate polls 0001
ivo@ivo-SVE14125CLB:/var/www/html/mysite$ python manage.py migrate
#cambiar modelo y aplicar cambios
ivo@ivo-SVE14125CLB:/var/www/html/mysite$ python manage.py makemigrations
ivo@ivo-SVE14125CLB:/var/www/html/mysite$ python manage.py migrate
ivo@ivo-SVE14125CLB:/var/www/html/mysite$ python manage.py shell
ivo@ivo-SVE14125CLB:/var/www/html/mysite$ python manage.py createsuperuser
#Importar bd existente
python manage.py inspectdb> importar/models.py

You might also like