model rh + admin import dans projet
authorOlivier Larchevêque <olivier.larcheveque@auf.org>
Fri, 6 May 2011 19:37:32 +0000 (15:37 -0400)
committerOlivier Larchevêque <olivier.larcheveque@auf.org>
Fri, 6 May 2011 19:37:32 +0000 (15:37 -0400)
project/rh/admin.py [new file with mode: 0644]
project/rh/models.py
project/settings.py

diff --git a/project/rh/admin.py b/project/rh/admin.py
new file mode 100644 (file)
index 0000000..405b00b
--- /dev/null
@@ -0,0 +1,122 @@
+# -*- encoding: utf-8 -*-
+
+from models import *
+from django.contrib import admin
+
+class CommentaireAdmin(admin.ModelAdmin):
+    pass
+
+class PosteAdmin(admin.ModelAdmin):
+    pass
+
+class PosteFinancementAdmin(admin.ModelAdmin):
+    pass
+
+class PostePieceAdmin(admin.ModelAdmin):
+    pass
+
+class PosteCommentaireAdmin(admin.ModelAdmin):
+    pass
+
+class EmployeAdmin(admin.ModelAdmin):
+    pass
+
+class EmployePieceAdmin(admin.ModelAdmin):
+    pass
+
+class EmployeCommentaireAdmin(admin.ModelAdmin):
+    pass
+
+class AyantDroitAdmin(admin.ModelAdmin):
+    pass
+
+class AyantDroitCommentaireAdmin(admin.ModelAdmin):
+    pass
+
+class DossierAdmin(admin.ModelAdmin):
+    pass
+
+class DossierPieceAdmin(admin.ModelAdmin):
+    pass
+
+class DossierCommentaireAdmin(admin.ModelAdmin):
+    pass
+
+class RemunerationAdmin(admin.ModelAdmin):
+    pass
+
+class ContratAdmin(admin.ModelAdmin):
+    pass
+
+class EvenementAdmin(admin.ModelAdmin):
+    pass
+
+class EvenementRemunerationAdmin(admin.ModelAdmin):
+    pass
+
+class FamilleEmploiAdmin(admin.ModelAdmin):
+    pass
+
+class TypePosteAdmin(admin.ModelAdmin):
+    pass
+
+class TypeRemunerationAdmin(admin.ModelAdmin):
+    pass
+
+class TypeRevalorisationAdmin(admin.ModelAdmin):
+    pass
+
+class ServiceAdmin(admin.ModelAdmin):
+    pass
+
+class OrganismeBstgAdmin(admin.ModelAdmin):
+    pass
+
+class StatutAdmin(admin.ModelAdmin):
+    pass
+
+class ClassementAdmin(admin.ModelAdmin):
+    pass
+
+class TauxChangeAdmin(admin.ModelAdmin):
+    pass
+
+class ValeurPointAdmin(admin.ModelAdmin):
+    pass
+
+class DeviseAdmin(admin.ModelAdmin):
+    pass
+
+class TypeContratAdmin(admin.ModelAdmin):
+    pass
+
+
+admin.site.register(Commentaire, CommentaireAdmin)
+admin.site.register(Poste, PosteAdmin)
+admin.site.register(PosteFinancement, PosteFinancementAdmin)
+admin.site.register(PostePiece, PostePieceAdmin)
+admin.site.register(PosteCommentaire, PosteCommentaireAdmin)
+admin.site.register(Employe, EmployeAdmin)
+admin.site.register(EmployePiece, EmployePieceAdmin)
+admin.site.register(EmployeCommentaire, EmployeCommentaireAdmin)
+admin.site.register(AyantDroit, AyantDroitAdmin)
+admin.site.register(AyantDroitCommentaire, AyantDroitCommentaireAdmin)
+admin.site.register(Dossier, DossierAdmin)
+admin.site.register(DossierPiece, DossierPieceAdmin)
+admin.site.register(DossierCommentaire, DossierCommentaireAdmin)
+admin.site.register(Remuneration, RemunerationAdmin)
+admin.site.register(Contrat, ContratAdmin)
+admin.site.register(Evenement, EvenementAdmin)
+admin.site.register(EvenementRemuneration, EvenementRemunerationAdmin)
+admin.site.register(FamilleEmploi, FamilleEmploiAdmin)
+admin.site.register(TypePoste, TypePosteAdmin)
+admin.site.register(TypeRemuneration, TypeRemunerationAdmin)
+admin.site.register(TypeRevalorisation, TypeRevalorisationAdmin)
+admin.site.register(Service, ServiceAdmin)
+admin.site.register(OrganismeBstg, OrganismeBstgAdmin)
+admin.site.register(Statut, StatutAdmin)
+admin.site.register(Classement, ClassementAdmin)
+admin.site.register(TauxChange, TauxChangeAdmin)
+admin.site.register(ValeurPoint, ValeurPointAdmin)
+admin.site.register(Devise, DeviseAdmin)
+admin.site.register(TypeContrat, TypeContratAdmin)
index 7cccc07..52217d3 100644 (file)
@@ -37,15 +37,15 @@ class Metadata(models.Model):
     date_creation = models.DateField(auto_now_add=True)
     user_creation = models.ForeignKey('auth.User', 
                             db_column='user_creation', related_name='+',
     date_creation = models.DateField(auto_now_add=True)
     user_creation = models.ForeignKey('auth.User', 
                             db_column='user_creation', related_name='+',
-                            null=True, blank=True, default=True)
+                            null=True, blank=True)
     date_modification = models.DateField(auto_now=True)
     user_modification = models.ForeignKey('auth.User', 
                             db_column='user_modification', related_name='+',
     date_modification = models.DateField(auto_now=True)
     user_modification = models.ForeignKey('auth.User', 
                             db_column='user_modification', related_name='+',
-                            null=True, blank=True, default=True)
-    date_desactivation = models.DateField(null=True, blank=True, default=True)
+                            null=True, blank=True)
+    date_desactivation = models.DateField(null=True, blank=True)
     user_desactivation = models.ForeignKey('auth.User', 
                             db_column='user_desactivation', related_name='+',
     user_desactivation = models.ForeignKey('auth.User', 
                             db_column='user_desactivation', related_name='+',
-                            null=True, blank=True, default=True)
+                            null=True, blank=True)
     
     class Meta:
         abstract = True
     
     class Meta:
         abstract = True
@@ -78,7 +78,7 @@ class Poste(Metadata):
     nom = models.CharField(max_length=255, 
                             verbose_name=u"Titre du poste", )
     nom_feminin = models.CharField(max_length=255,
     nom = models.CharField(max_length=255, 
                             verbose_name=u"Titre du poste", )
     nom_feminin = models.CharField(max_length=255,
-                            verbose_name=u"Titre du poste (au féminin)"
+                            verbose_name=u"Titre du poste (au féminin)",
                             null=True)
     implantation = models.ForeignKey(ref.Implantation, 
                             db_column='implantation', related_name='+')
                             null=True)
     implantation = models.ForeignKey(ref.Implantation, 
                             db_column='implantation', related_name='+')
@@ -469,8 +469,7 @@ class RemunerationMixin(Metadata):
                             db_column='type_revalorisation', 
                             related_name='+',
                             null=True, blank=True)
                             db_column='type_revalorisation', 
                             related_name='+',
                             null=True, blank=True)
-    montant = models.FloatField(max_digits=12, decimal_places=2, 
-                            null=True, blank=True,
+    montant = models.FloatField(null=True, blank=True,
                             default=0)
                             # Annuel (12 mois, 52 semaines, 364 jours?)
     devise = models.ForeignKey('Devise', to_field='code',
                             default=0)
                             # Annuel (12 mois, 52 semaines, 364 jours?)
     devise = models.ForeignKey('Devise', to_field='code',
index 5c8459c..14743ad 100644 (file)
@@ -64,7 +64,7 @@ INSTALLED_APPS = (
     'ajax_select',
     'south',
     'reversion',
     'ajax_select',
     'south',
     'reversion',
-    #'project.rh', 
+    'project.rh', 
     'project.rh_v1',
     'project.dae',
 )
     'project.rh_v1',
     'project.dae',
 )