Add a blank (with comments) models.py file to djblets/webapi/.

Review Request #6083 — Created July 8, 2014 and discarded

Information

Djblets
release-0.8.x
9f40778...

Reviewers

Django has an interesting bug during syncdb. If it knows that a
particular module (say, foo.webapi) has a models.py file, it will then
look for SQL files relative to that. When it does that, it loops through
all modules in INSTALLED_APPS, looking for an app named 'webapi', even
if it isn't the original one it found models in. When it finds one that
doesn't have a models.py (say, djblets.webapi), it will fail with an
error.

The easiest workaround is to just provide a models.py here, so that it
will move along without being so very angry.

I was able to add a models.py to reviewboard/webapi/ without syncdb blowing
up, and with the models appearing in my database.

david
  1. Is there a bug filed against django for this?

    1. I don't know that it's even relevant anymore with all the new migration stuff. I've found references to this, saying "It's an old Django bug," but I can't find the bug number.

  2. 
      
david
  1. Ship It!

  2. 
      
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        djblets/webapi/models.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        djblets/webapi/models.py
    
    
  2. 
      
chipx86
Review request changed
Status:
Discarded
Change Summary:
Opted to remove djblets.webapi from INSTALLED_APPS instead, as per Django app guidelines.