Re: can't get new model to show up in admin
Glad to help :-) I know that problem messed us (my coworker and I) for a while, so I'm glad to see that our fumbling around led to someone else's solved problem. -Jeff On Dec 11, 1:58 pm, Norm Aleks wrote: > THANK YOU THANK YOU THANK YOU!! Oh man, oh man, was that frustrating, > but hopefully now it won't bite me again. Yes, I had made a "root" > user and a "norm" user, I was logged in as norm, and norm's not an > admin. > > All set now! Thanks again! > > Norm > > On Dec 11, 10:13 am, Jeff FW wrote: > > > Well, here's another possibly silly question--are you logging into the > > admin as an admin user? Otherwise, it's possible you don't have > > privileges to see the new model. My coworker did that--took a long > > time for us to figure out what he was doing wrong ;-) > > > Other than that... I dunno. > > > On Dec 11, 11:37 am, Norm Aleks wrote: > > > > Thanks, it's not silly. Yes, I did that (and tables were created, so > > > the models files at least got seen). > > > Something else I should have mentioned is that the problem still > > > occurs when I'm using the internal development server, so I feel like > > > it's unlikely to be a Dreamhost issue. > > > Norm > > > > On Dec 11, 6:11 am, Jeff FW wrote: > > > > > Possibly a silly question--but did you run syncdb after adding > > > > staticimage2 to your INSTALLED_APPS? > > > > > -Jeff > > > > > On Dec 10, 9:49 pm, Norm Aleks wrote: > > > > > > I'm using Django 1.0.2 (on Dreamhost, if that matters) and having > > > > > trouble getting a new model to show up. I'm cringing a little because > > > > > I know this has been a FAQ -- know that I *have* put some effort into > > > > > Googling this problem, and I read up on the changes to the admin setup > > > > > between 0.96 and 1.0. What's more, I even got it right once on a test > > > > > model that *does* show up in the admin interface, but even though I > > > > > seem to be setting up the new model completely identically, it's not > > > > > showing. > > > > > > So, here's what I have. "root.staticimages" is the app that does show > > > > > up in admin, and "root.staticimages2" is the one that does not. > > > > > > First, Django is running under dispatch.fcgi. When I make changes to > > > > > the configuration, I kill any running Python processes and also touch > > > > > dispatch.fcgi. If I make errors in the configuration, I do get the > > > > > standard Django error pages. > > > > > > Now, my application is named "root" ... > > > > > > root/settings.py: > > > > > > > > > > [...] > > > > > INSTALLED_APPS = ( > > > > > 'django.contrib.auth', > > > > > 'django.contrib.contenttypes', > > > > > 'django.contrib.sessions', > > > > > 'django.contrib.sites', > > > > > 'treemenus', > > > > > 'root.staticimages', > > > > > 'root.staticimages2', > > > > > 'django.contrib.admin', > > > > > 'django.contrib.admindocs', > > > > > ) > > > > > > root/urls.py: > > > > > > > > > > from django.contrib import admin > > > > > from views import * > > > > > from root.songs.models import Artist > > > > > > admin.autodiscover() > > > > > > urlpatterns = patterns('', > > > > > (r'^$', main), > > > > > (r'^admin/doc/', include('django.contrib.admindocs.urls')), > > > > > (r'^admin/(.*)', admin.site.root), > > > > > ) > > > > > > root/staticimages/models.py: > > > > > > > > > > from django.db import models > > > > > > class StaticImage(models.Model): > > > > > image = models.ImageField(upload_to='static_image', > > > > > height_field='T', width_field='T') > > > > > altText = models.TextField() > > > > > > def __unicode__(self): > > > > > return self.image.name > > > > > > root/staticimages/admin.py: > > > > > > > > > > from django.contrib import admin > > > > > from root.staticimages.models import StaticImage > > > > > > class StaticImageAdmin(admin.ModelAdmin): > > > > > pass > > > > > > admin.site.register(StaticImage, StaticImageAdmin) > > > > > > root/staticimages2/models.py: > > > > > > > > > > from django.db import models > > > > > > class StaticImage2(models.Model): > > > > > image = models.ImageField(upload_to='static_image', > > > > > height_field='T', width_field='T') > > > > > altText = models.TextField() > > > > > > def __unicode__(self): > > > > > return self.image.name > > > > > > root/staticimages2/admin.py: > > > > > > > > > > from django.contrib import admin > > > > > from root.staticimages2.models import StaticImage2 > > > > > > class StaticImage2Admin(admin.ModelAdmin): > > > > > pass > > > > > > admin.site.register(StaticImage2, StaticImage2Admin) > > > > > > Any help at all would be appreciated, even if it's a suggestion for a > > > > > better Google search. > > > > > > Thanks, > > > > > > Norm Aleks --~--~-~--~~~---~--~~ Yo
Re: can't get new model to show up in admin
THANK YOU THANK YOU THANK YOU!! Oh man, oh man, was that frustrating, but hopefully now it won't bite me again. Yes, I had made a "root" user and a "norm" user, I was logged in as norm, and norm's not an admin. All set now! Thanks again! Norm On Dec 11, 10:13 am, Jeff FW wrote: > Well, here's another possibly silly question--are you logging into the > admin as an admin user? Otherwise, it's possible you don't have > privileges to see the new model. My coworker did that--took a long > time for us to figure out what he was doing wrong ;-) > > Other than that... I dunno. > > On Dec 11, 11:37 am, Norm Aleks wrote: > > > Thanks, it's not silly. Yes, I did that (and tables were created, so > > the models files at least got seen). > > Something else I should have mentioned is that the problem still > > occurs when I'm using the internal development server, so I feel like > > it's unlikely to be a Dreamhost issue. > > Norm > > > On Dec 11, 6:11 am, Jeff FW wrote: > > > > Possibly a silly question--but did you run syncdb after adding > > > staticimage2 to your INSTALLED_APPS? > > > > -Jeff > > > > On Dec 10, 9:49 pm, Norm Aleks wrote: > > > > > I'm using Django 1.0.2 (on Dreamhost, if that matters) and having > > > > trouble getting a new model to show up. I'm cringing a little because > > > > I know this has been a FAQ -- know that I *have* put some effort into > > > > Googling this problem, and I read up on the changes to the admin setup > > > > between 0.96 and 1.0. What's more, I even got it right once on a test > > > > model that *does* show up in the admin interface, but even though I > > > > seem to be setting up the new model completely identically, it's not > > > > showing. > > > > > So, here's what I have. "root.staticimages" is the app that does show > > > > up in admin, and "root.staticimages2" is the one that does not. > > > > > First, Django is running under dispatch.fcgi. When I make changes to > > > > the configuration, I kill any running Python processes and also touch > > > > dispatch.fcgi. If I make errors in the configuration, I do get the > > > > standard Django error pages. > > > > > Now, my application is named "root" ... > > > > > root/settings.py: > > > > > > > > [...] > > > > INSTALLED_APPS = ( > > > > 'django.contrib.auth', > > > > 'django.contrib.contenttypes', > > > > 'django.contrib.sessions', > > > > 'django.contrib.sites', > > > > 'treemenus', > > > > 'root.staticimages', > > > > 'root.staticimages2', > > > > 'django.contrib.admin', > > > > 'django.contrib.admindocs', > > > > ) > > > > > root/urls.py: > > > > > > > > from django.contrib import admin > > > > from views import * > > > > from root.songs.models import Artist > > > > > admin.autodiscover() > > > > > urlpatterns = patterns('', > > > > (r'^$', main), > > > > (r'^admin/doc/', include('django.contrib.admindocs.urls')), > > > > (r'^admin/(.*)', admin.site.root), > > > > ) > > > > > root/staticimages/models.py: > > > > > > > > from django.db import models > > > > > class StaticImage(models.Model): > > > > image = models.ImageField(upload_to='static_image', > > > > height_field='T', width_field='T') > > > > altText = models.TextField() > > > > > def __unicode__(self): > > > > return self.image.name > > > > > root/staticimages/admin.py: > > > > > > > > from django.contrib import admin > > > > from root.staticimages.models import StaticImage > > > > > class StaticImageAdmin(admin.ModelAdmin): > > > > pass > > > > > admin.site.register(StaticImage, StaticImageAdmin) > > > > > root/staticimages2/models.py: > > > > > > > > from django.db import models > > > > > class StaticImage2(models.Model): > > > > image = models.ImageField(upload_to='static_image', > > > > height_field='T', width_field='T') > > > > altText = models.TextField() > > > > > def __unicode__(self): > > > > return self.image.name > > > > > root/staticimages2/admin.py: > > > > > > > > from django.contrib import admin > > > > from root.staticimages2.models import StaticImage2 > > > > > class StaticImage2Admin(admin.ModelAdmin): > > > > pass > > > > > admin.site.register(StaticImage2, StaticImage2Admin) > > > > > Any help at all would be appreciated, even if it's a suggestion for a > > > > better Google search. > > > > > Thanks, > > > > > Norm Aleks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: can't get new model to show up in admin
Well, here's another possibly silly question--are you logging into the admin as an admin user? Otherwise, it's possible you don't have privileges to see the new model. My coworker did that--took a long time for us to figure out what he was doing wrong ;-) Other than that... I dunno. On Dec 11, 11:37 am, Norm Aleks wrote: > Thanks, it's not silly. Yes, I did that (and tables were created, so > the models files at least got seen). > Something else I should have mentioned is that the problem still > occurs when I'm using the internal development server, so I feel like > it's unlikely to be a Dreamhost issue. > Norm > > On Dec 11, 6:11 am, Jeff FW wrote: > > > Possibly a silly question--but did you run syncdb after adding > > staticimage2 to your INSTALLED_APPS? > > > -Jeff > > > On Dec 10, 9:49 pm, Norm Aleks wrote: > > > > I'm using Django 1.0.2 (on Dreamhost, if that matters) and having > > > trouble getting a new model to show up. I'm cringing a little because > > > I know this has been a FAQ -- know that I *have* put some effort into > > > Googling this problem, and I read up on the changes to the admin setup > > > between 0.96 and 1.0. What's more, I even got it right once on a test > > > model that *does* show up in the admin interface, but even though I > > > seem to be setting up the new model completely identically, it's not > > > showing. > > > > So, here's what I have. "root.staticimages" is the app that does show > > > up in admin, and "root.staticimages2" is the one that does not. > > > > First, Django is running under dispatch.fcgi. When I make changes to > > > the configuration, I kill any running Python processes and also touch > > > dispatch.fcgi. If I make errors in the configuration, I do get the > > > standard Django error pages. > > > > Now, my application is named "root" ... > > > > root/settings.py: > > > > > > [...] > > > INSTALLED_APPS = ( > > > 'django.contrib.auth', > > > 'django.contrib.contenttypes', > > > 'django.contrib.sessions', > > > 'django.contrib.sites', > > > 'treemenus', > > > 'root.staticimages', > > > 'root.staticimages2', > > > 'django.contrib.admin', > > > 'django.contrib.admindocs', > > > ) > > > > root/urls.py: > > > > > > from django.contrib import admin > > > from views import * > > > from root.songs.models import Artist > > > > admin.autodiscover() > > > > urlpatterns = patterns('', > > > (r'^$', main), > > > (r'^admin/doc/', include('django.contrib.admindocs.urls')), > > > (r'^admin/(.*)', admin.site.root), > > > ) > > > > root/staticimages/models.py: > > > > > > from django.db import models > > > > class StaticImage(models.Model): > > > image = models.ImageField(upload_to='static_image', > > > height_field='T', width_field='T') > > > altText = models.TextField() > > > > def __unicode__(self): > > > return self.image.name > > > > root/staticimages/admin.py: > > > > > > from django.contrib import admin > > > from root.staticimages.models import StaticImage > > > > class StaticImageAdmin(admin.ModelAdmin): > > > pass > > > > admin.site.register(StaticImage, StaticImageAdmin) > > > > root/staticimages2/models.py: > > > > > > from django.db import models > > > > class StaticImage2(models.Model): > > > image = models.ImageField(upload_to='static_image', > > > height_field='T', width_field='T') > > > altText = models.TextField() > > > > def __unicode__(self): > > > return self.image.name > > > > root/staticimages2/admin.py: > > > > > > from django.contrib import admin > > > from root.staticimages2.models import StaticImage2 > > > > class StaticImage2Admin(admin.ModelAdmin): > > > pass > > > > admin.site.register(StaticImage2, StaticImage2Admin) > > > > Any help at all would be appreciated, even if it's a suggestion for a > > > better Google search. > > > > Thanks, > > > > Norm Aleks > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: can't get new model to show up in admin
Thanks, it's not silly. Yes, I did that (and tables were created, so the models files at least got seen). Something else I should have mentioned is that the problem still occurs when I'm using the internal development server, so I feel like it's unlikely to be a Dreamhost issue. Norm On Dec 11, 6:11 am, Jeff FW <[EMAIL PROTECTED]> wrote: > Possibly a silly question--but did you run syncdb after adding > staticimage2 to your INSTALLED_APPS? > > -Jeff > > On Dec 10, 9:49 pm, Norm Aleks <[EMAIL PROTECTED]> wrote: > > > I'm using Django 1.0.2 (on Dreamhost, if that matters) and having > > trouble getting a new model to show up. I'm cringing a little because > > I know this has been a FAQ -- know that I *have* put some effort into > > Googling this problem, and I read up on the changes to the admin setup > > between 0.96 and 1.0. What's more, I even got it right once on a test > > model that *does* show up in the admin interface, but even though I > > seem to be setting up the new model completely identically, it's not > > showing. > > > So, here's what I have. "root.staticimages" is the app that does show > > up in admin, and "root.staticimages2" is the one that does not. > > > First, Django is running under dispatch.fcgi. When I make changes to > > the configuration, I kill any running Python processes and also touch > > dispatch.fcgi. If I make errors in the configuration, I do get the > > standard Django error pages. > > > Now, my application is named "root" ... > > > root/settings.py: > > > > [...] > > INSTALLED_APPS = ( > > 'django.contrib.auth', > > 'django.contrib.contenttypes', > > 'django.contrib.sessions', > > 'django.contrib.sites', > > 'treemenus', > > 'root.staticimages', > > 'root.staticimages2', > > 'django.contrib.admin', > > 'django.contrib.admindocs', > > ) > > > root/urls.py: > > > > from django.contrib import admin > > from views import * > > from root.songs.models import Artist > > > admin.autodiscover() > > > urlpatterns = patterns('', > > (r'^$', main), > > (r'^admin/doc/', include('django.contrib.admindocs.urls')), > > (r'^admin/(.*)', admin.site.root), > > ) > > > root/staticimages/models.py: > > > > from django.db import models > > > class StaticImage(models.Model): > > image = models.ImageField(upload_to='static_image', > > height_field='T', width_field='T') > > altText = models.TextField() > > > def __unicode__(self): > > return self.image.name > > > root/staticimages/admin.py: > > > > from django.contrib import admin > > from root.staticimages.models import StaticImage > > > class StaticImageAdmin(admin.ModelAdmin): > > pass > > > admin.site.register(StaticImage, StaticImageAdmin) > > > root/staticimages2/models.py: > > > > from django.db import models > > > class StaticImage2(models.Model): > > image = models.ImageField(upload_to='static_image', > > height_field='T', width_field='T') > > altText = models.TextField() > > > def __unicode__(self): > > return self.image.name > > > root/staticimages2/admin.py: > > > > from django.contrib import admin > > from root.staticimages2.models import StaticImage2 > > > class StaticImage2Admin(admin.ModelAdmin): > > pass > > > admin.site.register(StaticImage2, StaticImage2Admin) > > > Any help at all would be appreciated, even if it's a suggestion for a > > better Google search. > > > Thanks, > > > Norm Aleks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: can't get new model to show up in admin
Possibly a silly question--but did you run syncdb after adding staticimage2 to your INSTALLED_APPS? -Jeff On Dec 10, 9:49 pm, Norm Aleks <[EMAIL PROTECTED]> wrote: > I'm using Django 1.0.2 (on Dreamhost, if that matters) and having > trouble getting a new model to show up. I'm cringing a little because > I know this has been a FAQ -- know that I *have* put some effort into > Googling this problem, and I read up on the changes to the admin setup > between 0.96 and 1.0. What's more, I even got it right once on a test > model that *does* show up in the admin interface, but even though I > seem to be setting up the new model completely identically, it's not > showing. > > So, here's what I have. "root.staticimages" is the app that does show > up in admin, and "root.staticimages2" is the one that does not. > > First, Django is running under dispatch.fcgi. When I make changes to > the configuration, I kill any running Python processes and also touch > dispatch.fcgi. If I make errors in the configuration, I do get the > standard Django error pages. > > Now, my application is named "root" ... > > root/settings.py: > > [...] > INSTALLED_APPS = ( > 'django.contrib.auth', > 'django.contrib.contenttypes', > 'django.contrib.sessions', > 'django.contrib.sites', > 'treemenus', > 'root.staticimages', > 'root.staticimages2', > 'django.contrib.admin', > 'django.contrib.admindocs', > ) > > root/urls.py: > > from django.contrib import admin > from views import * > from root.songs.models import Artist > > admin.autodiscover() > > urlpatterns = patterns('', > (r'^$', main), > (r'^admin/doc/', include('django.contrib.admindocs.urls')), > (r'^admin/(.*)', admin.site.root), > ) > > root/staticimages/models.py: > > from django.db import models > > class StaticImage(models.Model): > image = models.ImageField(upload_to='static_image', > height_field='T', width_field='T') > altText = models.TextField() > > def __unicode__(self): > return self.image.name > > root/staticimages/admin.py: > > from django.contrib import admin > from root.staticimages.models import StaticImage > > class StaticImageAdmin(admin.ModelAdmin): > pass > > admin.site.register(StaticImage, StaticImageAdmin) > > root/staticimages2/models.py: > > from django.db import models > > class StaticImage2(models.Model): > image = models.ImageField(upload_to='static_image', > height_field='T', width_field='T') > altText = models.TextField() > > def __unicode__(self): > return self.image.name > > root/staticimages2/admin.py: > > from django.contrib import admin > from root.staticimages2.models import StaticImage2 > > class StaticImage2Admin(admin.ModelAdmin): > pass > > admin.site.register(StaticImage2, StaticImage2Admin) > > Any help at all would be appreciated, even if it's a suggestion for a > better Google search. > > Thanks, > > Norm Aleks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---