Re: Models not appearing in db. Am I missing something?

2014-12-16 Thread Mario Gudelj
Pgadmin3 is the bomb. Try that gui tool On 16/12/2014 4:40 pm, "Shazwi Suwandi" wrote: > Hey guys, > > I figured it was a problem with the app I'm using for the db. I went to > use another app and now the tables are showing. Silly me. Thanks Mario and > David for your

Re: Models not appearing in db. Am I missing something?

2014-12-15 Thread Shazwi Suwandi
Hey guys, I figured it was a problem with the app I'm using for the db. I went to use another app and now the tables are showing. Silly me. Thanks Mario and David for your helpful advice. :) On Tuesday, 16 December 2014 13:33:36 UTC+8, Shazwi Suwandi wrote: > > Hey Mario, > > The output I get

Re: Models not appearing in db. Am I missing something?

2014-12-15 Thread Shazwi Suwandi
Hey Mario, The output I get when I use makemigrations is 0001_initial.py: - Create model Member. I've double checked: - The 'Member' model is in core/models.py - 'Core' is inside project/settings.py I use python manage.py shell and I accessed the 'User' object and the linked

Re: Models not appearing in db. Am I missing something?

2014-12-15 Thread Mario Gudelj
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

Re: Models not appearing in db. Am I missing something?

2014-12-15 Thread Shazwi Suwandi
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,

Re: Models not appearing in db. Am I missing something?

2014-12-15 Thread David Palao
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 : > I've added

Re: Models not appearing in db. Am I missing something?

2014-12-14 Thread Shazwi Suwandi
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): >

Models not appearing in db. Am I missing something?

2014-12-14 Thread Shazwi Suwandi
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 =