Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Jul 4th, 2012  |  syntax: None  |  size: 0.87 KB  |  views: 64  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. PyDev in Eclipse does not recognize db.add_column from South
  2. find . | grep '^./[a-z]*/migrations/.*.py$' | xargs -I FILE sed -i '
  3. 1 a
  4. #@PydevCodeAnalysisIgnore
  5. ' FILE
  6.        
  7. Preferences > PyDev > Editor > Code Analysis > Undefined
  8.        
  9. _,tr,create_table,send_create_signal,delete_table,add_column,delete_column,alter_column,create_unique,create_index,delete_index
  10.        
  11. --- db/__init__.py.original 2010-12-02 03:00:26.000000000 +1300
  12. +++ db/__init__.py  2011-05-02 14:07:19.353636710 +1200
  13. @@ -72,5 +72,9 @@
  14.      )
  15.      sys.exit(1)
  16.  
  17. -# Finally, to make old migrations work, keep 'db' around as the default database
  18. +# Finally, to make old migrations work, keep 'db' around as the default
  19. +# database. We're setting it explicitly to the generic operations first to
  20. +# avoid pydev errors.
  21. +from south.db import generic
  22. +db = generic.DatabaseOperations(DEFAULT_DB_ALIAS)
  23.  db = dbs[DEFAULT_DB_ALIAS]
clone this paste RAW Paste Data