What's the output of your makemigrations command? If those models are
inside core/models.py and your app is inside installed apps in settings
this should totally work. The default name for the table will be
appname_modelname. Do you get an error when accessing the model? How are
you checking the db for tables?
On 15/12/2014 11:00 pm, "Shazwi Suwandi" <supersha...@gmail.com> wrote:

> Hey David,
>
> You're right, I have to practise writing tests along with my codes.
> However, just to clarify, data input and output works. I can call the data
> in the Member object. I'm just confused as to why the Member table does not
> show up in my postgres database. It's weird.
>
> Nevertheless, I'll start writing unit tests.
>
> On Monday, 15 December 2014 19:03:23 UTC+8, David Palao wrote:
>>
>> Hello,
>> From your post I understand you did not write unittests for your models?
>> I would recommend to write some sensible tests for them and start
>> tracing your problem from the failures you should get.
>> Best,
>>
>> David
>>
>> 2014-12-15 8:15 GMT+01:00 Shazwi Suwandi <super...@gmail.com>:
>> > I've added 'core' to settings.py file under INSTALLED_APPS too.
>> >
>> >
>> > On Monday, 15 December 2014 15:10:12 UTC+8, Shazwi Suwandi wrote:
>> >>
>> >> from django.db import models
>> >> from django.contrib.auth.models import User
>> >>
>> >> # CORE APPLICATION
>> >> # Create your models here.
>> >> class Member(models.Model):
>> >>     user = models.OneToOneField(User)
>> >>     description = models.CharField(max_length=250)
>> >>     date_of_birth = models.DateField()
>> >>     location = models.CharField(max_length=100)
>> >>     gender = models.CharField(max_length=15)
>> >>
>> >> class NewTable(models.Model):
>> >> test = models.CharField(max_length=25)
>> >>
>> >> I've created some models and I used makemigrations and migrate. I went
>> to
>> >> my db and checked that only the default tables are there (auth_group
>> ...
>> >> django_session). I know that my connection settings are right and that
>> I see
>> >> new rows being added to the auth_user table when I create users in
>> django
>> >> admin page.
>> >>
>> >> Is there something that I must have missed out?
>> >
>> > --
>> > 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...@googlegroups.com.
>> > To post to this group, send email to django...@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/7af04f16-
>> 09a8-458d-8857-c71694394101%40googlegroups.com.
>> >
>> > For more options, visit https://groups.google.com/d/optout.
>>
>  --
> 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+unsubscr...@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/6dff229e-34c3-4e4f-bb34-f95c43bec18f%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/6dff229e-34c3-4e4f-bb34-f95c43bec18f%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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+unsubscr...@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/CAHqTbjmh6cG08TNO8Eab1Av4amkaHk%2BdZEgmMODpDq7YS0cz8g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to