#11366: mysql table name changed after command, 'python manage.py inspectdb >
mysite/myapp/models.py'
------------------------------------+---------------------------------------
          Reporter:  macky123       |         Owner:  nobody
            Status:  reopened       |     Milestone:        
         Component:  Uncategorized  |       Version:  1.0   
        Resolution:                 |      Keywords:        
             Stage:  Unreviewed     |     Has_patch:  0     
        Needs_docs:  0              |   Needs_tests:  0     
Needs_better_patch:  0              |  
------------------------------------+---------------------------------------
Changes (by macky123):

  * status:  closed => reopened
  * resolution:  invalid =>

Comment:

 Thanks for your reply. But note that I'm using a legacy database and one
 of my tables had been named Users weeks ago, and somehow that name was
 changed. In other words, I had everything set up correctly in my views,
 and I suddenly got this error message that the table Users did not exist,
 and after searching through models.py I discovered a name change to this
 table and model class, from Users to myapp.users. I'm following the
 tutorials and 'The Definitive Guide to django' very closely, since I'm new
 to web programming and don't know what I'm doing, and perhaps I did make a
 mistake, but I find that unlikely in this case. In Chapter 16 of that
 book, it discusses all this, and it all seems pretty straightforward.
 inspectdb examines the tables in the database and prints the generated
 model class for each table. To save the output to the models.py file
 within the application, you simply type the shell command: python
 mysite/manage.py inspectdb > mysite/myapp/models.py. Somehow, the name of
 my table got changed when, from the shell,  after I typed this command. A
 bug perhaps? I'm using the development version of Django. Again, thanks
 for replying, and perhaps I made some mistake.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/11366#comment:2>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to