1

Here is my models.py

# coding: utf-8
from django.db import models

class P(models.Model):
    n = models.CharField(max_length=255)

class I(models.Model):
    t = models.CharField(max_length=255)
    p = models.ForeignKey(P)

Here is command line:

rm db.sqlite3 
$ python manage.py syncdb
Operations to perform:
  Apply all migrations: admin, contenttypes, auth, sessions
Running migrations:
  Applying contenttypes.0001_initial... OK
  Applying auth.0001_initial... OK
  Applying admin.0001_initial... OK
  Applying sessions.0001_initial... OK

You have installed Django's auth system, and don't have any superusers defined.
Would you like to create one now? (yes/no): no

It pretends it has done everything but I do not see tables in DB, neither my code does

1 Answer 1

1

Make sure your app is listed in the INSTALLED_APPS in the project settings file:

INSTALLED_APPS = (
    ...,
    'your_app',
)
Sign up to request clarification or add additional context in comments.

1 Comment

You are welcome, your progress for the past year is fantastic. Really glad to have you here on SO.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.