Friday, March 13, 2015

Re: Django 1.7 I just installed postgres, it works but I cannot see my data in postgres database

Have you issued the command to create the tables.
python manage.py makemigrations
python manage.py migrate

The above will create what ever tables you have in the models.

The actual data that something else?

Johnf

On 03/13/2015 03:29 AM, Sabine Maennel wrote:
I just switched from Sqlite to postgres. Everything is working except that when I open PgAdmin III all tables are still empty. I really wonder where are my data? 

In my settings file I have:
DATABASES = {      'default': {          #'ENGINE': 'django.db.backends.sqlite3',          #'NAME': os.path.join(BASE_DIR, 'dbsqlite3'),          'ENGINE': 'django.db.backends.postgresql_psycopg2',          'NAME': 'postgres',          'USER': 'postgres',         'PASSWORD': (secret),         'HOST': 'localhost',      }  
} 

So how can I check wether it is using the right database, where are my data?

I cannot find any tables in postgres. Please help me and tell me what I am getting wrong here.


--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/904eed7d-b6b1-4726-8f81-1b1723bed47a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment