Recrutement: Création de l'application
authornilovna.bascunan-vasquez <nilovna.bascunan-vasquez@localhost.localdomain>
Wed, 25 May 2011 18:51:43 +0000 (14:51 -0400)
committernilovna.bascunan-vasquez <nilovna.bascunan-vasquez@localhost.localdomain>
Wed, 25 May 2011 18:51:43 +0000 (14:51 -0400)
project/recrutement/__init__.py [new file with mode: 0755]
project/recrutement/models.py [new file with mode: 0755]
project/recrutement/templates/recrutement/index.html [new file with mode: 0644]
project/recrutement/tests.py [new file with mode: 0755]
project/recrutement/urls.py [new file with mode: 0644]
project/recrutement/views.py [new file with mode: 0755]
project/settings.py
project/urls.py

diff --git a/project/recrutement/__init__.py b/project/recrutement/__init__.py
new file mode 100755 (executable)
index 0000000..e69de29
diff --git a/project/recrutement/models.py b/project/recrutement/models.py
new file mode 100755 (executable)
index 0000000..71a8362
--- /dev/null
@@ -0,0 +1,3 @@
+from django.db import models
+
+# Create your models here.
diff --git a/project/recrutement/templates/recrutement/index.html b/project/recrutement/templates/recrutement/index.html
new file mode 100644 (file)
index 0000000..452d7a0
--- /dev/null
@@ -0,0 +1,15 @@
+{% extends 'base.html' %}
+
+{% block title %}RH{% endblock %}
+{% block titre %}Ressources humaines{% endblock %}
+{% block sous_titre %}Accueil{% endblock %}
+
+{% block main %}
+<h1>Recrutement</h1>
+
+<p>
+Recrutement
+</p>
+
+{% endblock %}
+
diff --git a/project/recrutement/tests.py b/project/recrutement/tests.py
new file mode 100755 (executable)
index 0000000..2247054
--- /dev/null
@@ -0,0 +1,23 @@
+"""
+This file demonstrates two different styles of tests (one doctest and one
+unittest). These will both pass when you run "manage.py test".
+
+Replace these with more appropriate tests for your application.
+"""
+
+from django.test import TestCase
+
+class SimpleTest(TestCase):
+    def test_basic_addition(self):
+        """
+        Tests that 1 + 1 always equals 2.
+        """
+        self.failUnlessEqual(1 + 1, 2)
+
+__test__ = {"doctest": """
+Another way to test that 1 + 1 is equal to 2.
+
+>>> 1 + 1 == 2
+True
+"""}
+
diff --git a/project/recrutement/urls.py b/project/recrutement/urls.py
new file mode 100644 (file)
index 0000000..f231760
--- /dev/null
@@ -0,0 +1,7 @@
+# -*- encoding: utf-8 -*
+from django.conf.urls.defaults import patterns, url
+
+urlpatterns = patterns(
+    'project.recrutement.views',
+    url(r'^$', 'index', name='index'),
+)
diff --git a/project/recrutement/views.py b/project/recrutement/views.py
new file mode 100755 (executable)
index 0000000..b5919be
--- /dev/null
@@ -0,0 +1,8 @@
+# -*- encoding: utf-8 -*-
+from django.shortcuts import redirect, render_to_response, get_object_or_404
+from django.template import RequestContext
+
+from project.recrutement import models as recr
+
+def index(request):
+    return render_to_response('recrutement/index.html', {}, RequestContext(request))
index f78182c..75a02bc 100644 (file)
@@ -70,6 +70,7 @@ INSTALLED_APPS = (
     'project.rh_v1',
     'project.dae',
     'project.budget', 
+    'project.recrutement', 
 )
 
 TEMPLATE_CONTEXT_PROCESSORS = (
index 9525657..759afd0 100644 (file)
@@ -15,6 +15,7 @@ urlpatterns = patterns(
     (r'^connexion/$', 'django.contrib.auth.views.login'),
     (r'^deconnexion/$', 'django.contrib.auth.views.logout'),
     (r'^dae/', include('project.dae.urls')),
+    (r'^recrutement/', include('project.recrutement.urls')),
     (r'^', include('project.rh.urls')),
     (r'^prive/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.PRIVE_MEDIA_ROOT}),
 )