Re: Help with manage.py sql
I'm guessing that for some reason the classes in your app/models.py are not set up correctly, are you sure you inherit from models.Model in your class(es). Example: from django.db import models class MyModel(models.Model): rather instead of : class MyModel(): If it doesn't inherit models.Model Django will not recognize it as being a model. On Monday, December 3, 2012 11:03:11 AM UTC-8, David Brotman wrote: > > Thanks for the response. To answer your questions: > > 1. Have you set up a DB and put the details into your settings.py? If not, > this is the problem. > > *Yes, all the details of my db are in the settings. I am convinced that > the syncdb works since when I ran it the first time, a few tables were > created;* > > auth_group,auth_group_permissions,auth_permission,auth_user, etc. > > 2. If you have done that, then the next step is to try another python > manage syncdb > > *Yep, ran it again and rechecked the database. Nothing new.* > > 3. Are you running python manage.py sql polls from the directory with > manage.py in it? > > *Yep, running it the same directory as manage.py* > > 4. What is your OS and which version of Django? > > *I am on a shared hosting. I am not sure of the version of Linux but it > does list kernel version of 2.6.32-20120131.55.1.bh6.x86_* > > *Django version is the most recent: 1.4.2* > > On Sunday, December 2, 2012 5:54:21 PM UTC-8, Lachlan Musicman wrote: >> >> On Mon, Dec 3, 2012 at 1:43 PM, David Brotman >>wrote: >> > Hi: >> > >> > I am really new to django and I am going thru the online tutorial >> (polls) >> > app and I got to the point in the tutorial where I enter the command: >> > >> > python manage.py sql polls >> > >> > Nothing happens. No error message or anything else displayed. It just >> goes >> > to a prompt. I included 'polls' in the installed apps section of the >> > settings.py file as instructed. Anyone have any ideas on how to >> troubleshoot >> > this issue? >> >> 1. Have you set up a DB and put the details into your settings.py? If >> not, this is the problem >> 2. If you have done that, then the next step is to try another >> >> python manage syncdb >> >> Which you should have run a little earlier, when registering the >> django necessary tables, and this second run should create the tables >> for the polls app. >> >> Are you running python manage.py sql polls from the directory with >> manage.py in it? >> >> What is you OS and which version of Django? >> >> Cheers >> L. >> >> >> > >> > -- >> > You received this message because you are subscribed to the Google >> Groups >> > "Django users" group. >> > To view this discussion on the web visit >> > https://groups.google.com/d/msg/django-users/-/BkUr0V1xy2AJ. >> > To post to this group, send email to django...@googlegroups.com. >> > To unsubscribe from this group, send email to >> > django-users...@googlegroups.com. >> > For more options, visit this group at >> > http://groups.google.com/group/django-users?hl=en. >> >> >> >> -- >> ...we look at the present day through a rear-view mirror. This is >> something Marshall McLuhan said back in the Sixties, when the world >> was in the grip of authentic-seeming future narratives. He said, “We >> look at the present through a rear-view mirror. We march backwards >> into the future.” >> >> http://www.warrenellis.com/?p=14314 >> > -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/dyOurhdchjwJ. 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: Help with manage.py sql
Thanks for the response. To answer your questions: 1. Have you set up a DB and put the details into your settings.py? If not, this is the problem. *Yes, all the details of my db are in the settings. I am convinced that the syncdb works since when I ran it the first time, a few tables were created;* auth_group,auth_group_permissions,auth_permission,auth_user, etc. 2. If you have done that, then the next step is to try another python manage syncdb *Yep, ran it again and rechecked the database. Nothing new.* 3. Are you running python manage.py sql polls from the directory with manage.py in it? *Yep, running it the same directory as manage.py* 4. What is your OS and which version of Django? *I am on a shared hosting. I am not sure of the version of Linux but it does list kernel version of 2.6.32-20120131.55.1.bh6.x86_* *Django version is the most recent: 1.4.2* On Sunday, December 2, 2012 5:54:21 PM UTC-8, Lachlan Musicman wrote: > > On Mon, Dec 3, 2012 at 1:43 PM, David Brotman >wrote: > > Hi: > > > > I am really new to django and I am going thru the online tutorial > (polls) > > app and I got to the point in the tutorial where I enter the command: > > > > python manage.py sql polls > > > > Nothing happens. No error message or anything else displayed. It just > goes > > to a prompt. I included 'polls' in the installed apps section of the > > settings.py file as instructed. Anyone have any ideas on how to > troubleshoot > > this issue? > > 1. Have you set up a DB and put the details into your settings.py? If > not, this is the problem > 2. If you have done that, then the next step is to try another > > python manage syncdb > > Which you should have run a little earlier, when registering the > django necessary tables, and this second run should create the tables > for the polls app. > > Are you running python manage.py sql polls from the directory with > manage.py in it? > > What is you OS and which version of Django? > > Cheers > L. > > > > > > -- > > You received this message because you are subscribed to the Google > Groups > > "Django users" group. > > To view this discussion on the web visit > > https://groups.google.com/d/msg/django-users/-/BkUr0V1xy2AJ. > > To post to this group, send email to > > django...@googlegroups.com. > > > To unsubscribe from this group, send email to > > django-users...@googlegroups.com . > > For more options, visit this group at > > http://groups.google.com/group/django-users?hl=en. > > > > -- > ...we look at the present day through a rear-view mirror. This is > something Marshall McLuhan said back in the Sixties, when the world > was in the grip of authentic-seeming future narratives. He said, “We > look at the present through a rear-view mirror. We march backwards > into the future.” > > http://www.warrenellis.com/?p=14314 > -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/HwdPQ3b7U44J. 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: Help with manage.py sql
On Mon, Dec 3, 2012 at 1:43 PM, David Brotmanwrote: > Hi: > > I am really new to django and I am going thru the online tutorial (polls) > app and I got to the point in the tutorial where I enter the command: > > python manage.py sql polls > > Nothing happens. No error message or anything else displayed. It just goes > to a prompt. I included 'polls' in the installed apps section of the > settings.py file as instructed. Anyone have any ideas on how to troubleshoot > this issue? 1. Have you set up a DB and put the details into your settings.py? If not, this is the problem 2. If you have done that, then the next step is to try another python manage syncdb Which you should have run a little earlier, when registering the django necessary tables, and this second run should create the tables for the polls app. Are you running python manage.py sql polls from the directory with manage.py in it? What is you OS and which version of Django? Cheers L. > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/django-users/-/BkUr0V1xy2AJ. > 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. -- ...we look at the present day through a rear-view mirror. This is something Marshall McLuhan said back in the Sixties, when the world was in the grip of authentic-seeming future narratives. He said, “We look at the present through a rear-view mirror. We march backwards into the future.” http://www.warrenellis.com/?p=14314 -- 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: Help with manage.py sql
On Sunday, December 2, 2012, David Brotman wrote: > Hi: > > I am really new to django and I am going thru the online tutorial (polls) > app and I got to the point in the tutorial where I enter the command: > > python manage.py sql polls > > Nothing happens. No error message or anything else displayed. It just goes > to a prompt. I included 'polls' in the installed apps section of the > settings.py file as instructed. Anyone have any ideas on how to > troubleshoot this issue? > I'd set a breakpoint with pdb in manage and step through it and see exactly what it's doing. -- 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.
Help with manage.py sql
Hi: I am really new to django and I am going thru the online tutorial (polls) app and I got to the point in the tutorial where I enter the command: python manage.py sql polls Nothing happens. No error message or anything else displayed. It just goes to a prompt. I included 'polls' in the installed apps section of the settings.py file as instructed. Anyone have any ideas on how to troubleshoot this issue? -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/BkUr0V1xy2AJ. 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.