This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class MyManager(models.Manager): | |
| use_for_related_fields = True | |
| def get_query_set(self): | |
| return super(MyManager, self).get_query_set().filter(is_deleted=False) | |
| class MyModel(gis_models.Model): | |
| is_deleted = models.BooleanField(default=False, db_index=True) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| oldfile = open('freeze_old.txt') | |
| newfile = open('freeze_new.txt') | |
| packages = {} | |
| def splitpackage(line): | |
| result = line.split('==') | |
| if not len(result) == 2: | |
| result = line.split('@') | |