diff --git a/Vagrantfile b/Vagrantfile index c84c3dd9..e12a45ed 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -10,7 +10,7 @@ Vagrant.configure(2) do |config| # For a complete reference, please see the online documentation at # https://docs.vagrantup.com. - config.vm.box = "ubuntu/trusty64" + config.vm.box = "ubuntu/xenial64" # On associe le port 80 dans la machine virtuelle avec le port 8080 de notre # ordinateur, et le port 8000 avec le port 8000. diff --git a/cof/urls.py b/cof/urls.py index 5134456a..b4c4da3c 100644 --- a/cof/urls.py +++ b/cof/urls.py @@ -1,24 +1,27 @@ # -*- coding: utf-8 -*- +""" +Fichier principal de configuration des urls du projet GestioCOF +""" + from __future__ import division from __future__ import print_function from __future__ import unicode_literals +import autocomplete_light + from django.conf import settings from django.conf.urls import include, url from django.conf.urls.static import static from django.contrib import admin from django.views.generic.base import TemplateView - -import autocomplete_light - from django.contrib.auth import views as django_views from django_cas_ng import views as django_cas_views + from gestioncof import views as gestioncof_views, csv_views from gestioncof.urls import export_patterns, petitcours_patterns, \ surveys_patterns, events_patterns, calendar_patterns, \ clubs_patterns - from gestioncof.autocomplete import autocomplete autocomplete_light.autodiscover() @@ -92,4 +95,5 @@ if settings.DEBUG: # Si on est en production, MEDIA_ROOT est servi par Apache. # Il faut dire à Django de servir MEDIA_ROOT lui-même en développement. - urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) + urlpatterns += static(settings.MEDIA_URL, + document_root=settings.MEDIA_ROOT) diff --git a/provisioning/bootstrap.sh b/provisioning/bootstrap.sh index a873973f..89e8790d 100644 --- a/provisioning/bootstrap.sh +++ b/provisioning/bootstrap.sh @@ -8,7 +8,7 @@ DBNAME="cof_gestion" DBPASSWD="4KZt3nGPLVeWSvtBZPSM3fSzXpzEU4" # Installation de paquets utiles -apt-get update && apt-get install -y mercurial python-pip python-dev \ +apt-get update && apt-get install -y python3-pip python3-dev python3-venv \ libmysqlclient-dev libjpeg-dev git redis-server pip install -U pip @@ -30,10 +30,10 @@ a2ensite gestiocof a2dissite 000-default service apache2 restart mkdir /var/www/static -chown -R vagrant:www-data /var/www/static +chown -R ubuntu:www-data /var/www/static # Mise en place du .bash_profile pour tout configurer lors du `vagrant ssh` -cat > ~vagrant/.bash_profile <> ~ubuntu/.bashrc <