diff options
| author | Étienne Loks <etienne.loks@peacefrogs.net> | 2012-10-21 15:04:28 +0200 | 
|---|---|---|
| committer | Étienne Loks <etienne.loks@peacefrogs.net> | 2012-10-21 15:04:28 +0200 | 
| commit | f31f0f269a68b2dfc5c834ce420bb5a02a3ecd0c (patch) | |
| tree | a8d881b59447269f2e92578cf5924759bad17704 /archaeological_files/models.py | |
| parent | 48eb91979705f9999b724c8e2f960fd7931775c1 (diff) | |
| download | Ishtar-f31f0f269a68b2dfc5c834ce420bb5a02a3ecd0c.tar.bz2 Ishtar-f31f0f269a68b2dfc5c834ce420bb5a02a3ecd0c.zip | |
Djangoization - Major refactoring (step 8)
* clean-up on request and storage args in methods
* view creation now managed by South
* clean some mess in session values by using MultiValueDict
Diffstat (limited to 'archaeological_files/models.py')
| -rw-r--r-- | archaeological_files/models.py | 12 | 
1 files changed, 2 insertions, 10 deletions
| diff --git a/archaeological_files/models.py b/archaeological_files/models.py index 0bc9a9566..0b95c021a 100644 --- a/archaeological_files/models.py +++ b/archaeological_files/models.py @@ -26,7 +26,7 @@ from django.utils.translation import ugettext_lazy as _, ugettext  from ishtar_common.models import GeneralType, BaseHistorizedItem, \      HistoricalRecords, OwnPerms, Person, Organization, Department, Town, \ -    Dashboard +    Dashboard, IshtarUser  class FileType(GeneralType):      class Meta: @@ -169,15 +169,7 @@ class File(BaseHistorizedItem, OwnPerms):  class FileByDepartment(models.Model):      ''' -    Database view: don't forget to create it - -    create view file_department (id, department_id, file_id) as -        select town."id", town."departement_id", file_towns."file_id" -            from ishtar_base_town town -        inner join ishtar_base_file_towns file_towns on -            file_towns."town_id"=town."id" order by town."departement_id"; -    CREATE RULE file_department_delete -                            AS ON DELETE TO file_department DO INSTEAD(); +    Database view for dashboard      '''      file = models.ForeignKey(File, verbose_name=_(u"File"))      department = models.ForeignKey(Department, verbose_name=_(u"Department"), | 
