Note that there are some explanatory texts on larger screens.

plurals
  1. PODjango app tables not visible in admin UI
    text
    copied!<p>Gist - Tables have been successfully created from model but not visible in admin UI - Environment - Windows 7, Python 2.7, VirtualEnv, SQLite</p> <p>I have a couple of models defined in my django app. Here is the relevant content of the model.py file</p> <pre><code>from django.contrib.auth.models import User, models class ProviderProfile(models.Model): # This field is required. user = models.OneToOneField(User) # Other fields for Provider here number = models.CharField(('Number'), max_length = 30, blank = True) street_line1 = models.CharField(('Address 1'), max_length = 100, blank = True) street_line2 = models.CharField(('Address 2'), max_length = 100, blank = True) zipcode = models.CharField(('ZIP code'), max_length = 5, blank = True) city = models.CharField(('City'), max_length = 100, blank = True) state = models.CharField(('State'), max_length = 100, blank = True) class Admin: pass </code></pre> <p>Per the instructions here <a href="https://docs.djangoproject.com/en/dev/ref/contrib/admin/#modeladmin-objects" rel="nofollow noreferrer">https://docs.djangoproject.com/en/dev/ref/contrib/admin/#modeladmin-objects</a>, I added an admin.py file to this app which has the following contents</p> <pre><code>from django.contrib import admin from UserProfile.apps.ProviderProfile.models import Service, ServiceProvider, ProviderProfile admin.site.register(Service) admin.site.register(ServiceProvider) admin.site.register(ProviderProfile) </code></pre> <p>I had also added the following in my settings.py file per this <a href="https://stackoverflow.com/questions/4546073/django-ignoring-admin-py">django ignoring admin.py</a></p> <pre><code>INSTALLED_APPS = ( 'Path.To.MyApp', ) </code></pre> <p>Now when I do a syncdb, django tells me it has created the tables (and I verified using SQLiteManager). Unfortunately, I don't see them in the admin UI. I see tables from other apps in there. </p> <p>What am I missing?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload