Commit 7d2b3eac authored by Patrick Colmant's avatar Patrick Colmant

New release

parent 89635832
<!doctype html>
<html class="no-js" lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Foundation | Welcome</title>
<link rel="stylesheet" href="css/foundation.css" />
<script src="js/modernizr.js"></script>
</head>
<body>
<div class="row">
<div class="large-12 columns">
<h1>Welcome to Foundation</h1>
</div>
</div>
<div class="row">
<div class="large-12 columns">
<div class="panel">
<h3>We&rsquo;re stoked you want to try Foundation! </h3>
<p>To get going, this file (index.html) includes some basic styles you can modify, play around with, or totally destroy to get going.</p>
<p>Once you've exhausted the fun in this document, you should check out:</p>
<div class="row">
<div class="large-4 medium-4 columns">
<p><a href="http://foundation.zurb.com/docs">Foundation Documentation</a><br />Everything you need to know about using the framework.</p>
</div>
<div class="large-4 medium-4 columns">
<p><a href="http://github.com/zurb/foundation">Foundation on Github</a><br />Latest code, issue reports, feature requests and more.</p>
</div>
<div class="large-4 medium-4 columns">
<p><a href="http://twitter.com/foundationzurb">@foundationzurb</a><br />Ping us on Twitter if you have questions. If you build something with this we'd love to see it (and send you a totally boss sticker).</p>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="large-8 medium-8 columns">
<h5>Here&rsquo;s your basic grid:</h5>
<!-- Grid Example -->
<div class="row">
<div class="large-12 columns">
<div class="callout panel">
<p><strong>This is a twelve column section in a row.</strong> Each of these includes a div.panel element so you can see where the columns are - it's not required at all for the grid.</p>
</div>
</div>
</div>
<div class="row">
<div class="large-6 medium-6 columns">
<div class="callout panel">
<p>Six columns</p>
</div>
</div>
<div class="large-6 medium-6 columns">
<div class="callout panel">
<p>Six columns</p>
</div>
</div>
</div>
<div class="row">
<div class="large-4 medium-4 small-4 columns">
<div class="callout panel">
<p>Four columns</p>
</div>
</div>
<div class="large-4 medium-4 small-4 columns">
<div class="callout panel">
<p>Four columns</p>
</div>
</div>
<div class="large-4 medium-4 small-4 columns">
<div class="callout panel">
<p>Four columns</p>
</div>
</div>
</div>
<hr />
<h5>We bet you&rsquo;ll need a form somewhere:</h5>
<form>
<div class="row">
<div class="large-12 columns">
<label>Input Label</label>
<input type="text" placeholder="large-12.columns" />
</div>
</div>
<div class="row">
<div class="large-4 medium-4 columns">
<label>Input Label</label>
<input type="text" placeholder="large-4.columns" />
</div>
<div class="large-4 medium-4 columns">
<label>Input Label</label>
<input type="text" placeholder="large-4.columns" />
</div>
<div class="large-4 medium-4 columns">
<div class="row collapse">
<label>Input Label</label>
<div class="small-9 columns">
<input type="text" placeholder="small-9.columns" />
</div>
<div class="small-3 columns">
<span class="postfix">.com</span>
</div>
</div>
</div>
</div>
<div class="row">
<div class="large-12 columns">
<label>Select Box</label>
<select>
<option value="husker">Husker</option>
<option value="starbuck">Starbuck</option>
<option value="hotdog">Hot Dog</option>
<option value="apollo">Apollo</option>
</select>
</div>
</div>
<div class="row">
<div class="large-6 medium-6 columns">
<label>Choose Your Favorite</label>
<input type="radio" name="pokemon" value="Red" id="pokemonRed"><label for="pokemonRed">Radio 1</label>
<input type="radio" name="pokemon" value="Blue" id="pokemonBlue"><label for="pokemonBlue">Radio 2</label>
</div>
<div class="large-6 medium-6 columns">
<label>Check these out</label>
<input id="checkbox1" type="checkbox"><label for="checkbox1">Checkbox 1</label>
<input id="checkbox2" type="checkbox"><label for="checkbox2">Checkbox 2</label>
</div>
</div>
<div class="row">
<div class="large-12 columns">
<label>Textarea Label</label>
<textarea placeholder="small-12.columns"></textarea>
</div>
</div>
</form>
</div>
<div class="large-4 medium-4 columns">
<h5>Try one of these buttons:</h5>
<p><a href="#" class="small button">Simple Button</a><br/>
<a href="#" class="small radius button">Radius Button</a><br/>
<a href="#" class="small round button">Round Button</a><br/>
<a href="#" class="medium success button">Success Btn</a><br/>
<a href="#" class="medium alert button">Alert Btn</a><br/>
<a href="#" class="medium secondary button">Secondary Btn</a></p>
<div class="panel">
<h5>So many components, girl!</h5>
<p>A whole kitchen sink of goodies comes with Foundation. Checkout the docs to see them all, along with details on making them your own.</p>
<a href="http://foundation.zurb.com/docs/" class="small button">Go to Foundation Docs</a>
</div>
</div>
</div>
<script src="js/jquery.js"></script>
<script src="js/foundation.min.js"></script>
<script>
$(document).foundation();
</script>
</body>
</html>
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
"site","username","password","email","first_name","last_name","phone1","phone2","fax","bank_account","address","short_profile_name","long_profile_name","memo","date_previous_balance","previous_balance","amount_in","amount_out","represent_this_buyinggroup"
3,,,,,,,,,"IBAN","address","ZZC-CRASEN","ZZC-CRASEN","Mémo ZZC-CRASEN",2013-10-31,0,0,0,"False"
3,,,,,,,,,"IBAN","address","ZZC-GASATH ASBL","ZZC-GASATH ASBL","Mémo ZZC-GASATH ASBL",2013-10-31,0,0,0,"False"
3,,,,,,,,,"IBAN","address","ZZC-SITE WEB","ZZC-SITE WEB","Mémo ZZC-SITE WEB",2013-10-31,0,0,0,"False"
3,,,,,,,,,"IBAN","address","ZZC-COTISATIONS PTI DEJ","ZZC-COTISATIONS PTI DEJ","Mémo ZZC-COTISATIONS PTI DEJ",2013-10-31,0,0,0,"True"
3,"BELOEIL","demo","BELOEIL@ask.it","BELOEIL","demo","phone1","phone2","fax","IBAN","address","BELOEIL","BELOEIL","Mémo BELOEIL",2013-10-31,0,0,0,"False"
3,"BLONDEEL","demo","BLONDEEL@ask.it","BLONDEEL","demo","phone1","phone2","fax","IBAN","address","BLONDEEL","BLONDEEL","Mémo BLONDEEL",2013-10-31,0,0,0,"False"
3,"BRUYERE","demo","BRUYERE@ask.it","BRUYERE","demo","phone1","phone2","fax","IBAN","address","BRUYERE","BRUYERE","Mémo BRUYERE",2013-10-31,0,0,0,"False"
3,"CAUCHIE","demo","CAUCHIE@ask.it","CAUCHIE","demo","phone1","phone2","fax","IBAN","address","CAUCHIE","CAUCHIE","Mémo CAUCHIE",2013-10-31,0,0,0,"False"
3,"D'HONDT","demo","D'HONDT@ask.it","D'HONDT","demo","phone1","phone2","fax","IBAN","address","D'HONDT","D'HONDT","Mémo D'HONDT",2013-10-31,0,0,0,"False"
3,"DORLOU","demo","DORLOU@ask.it","DORLOU","demo","phone1","phone2","fax","IBAN","address","DORLOU","DORLOU","Mémo DORLOU",2013-10-31,0,0,0,"False"
3,"FOURMANOY","demo","FOURMANOY@ask.it","FOURMANOY","demo","phone1","phone2","fax","IBAN","address","FOURMANOY","FOURMANOY","Mémo FOURMANOY",2013-10-31,0,0,0,"False"
3,"FRISHKORN","demo","FRISHKORN@ask.it","FRISHKORN","demo","phone1","phone2","fax","IBAN","address","FRISHKORN","FRISHKORN","Mémo FRISHKORN",2013-10-31,0,0,0,"False"
3,"HOSTIE","demo","HOSTIE@ask.it","HOSTIE","demo","phone1","phone2","fax","IBAN","address","HOSTIE","HOSTIE","Mémo HOSTIE",2013-10-31,0,0,0,"False"
3,"LONGLUNE","demo","LONGLUNE@ask.it","LONGLUNE","demo","phone1","phone2","fax","IBAN","address","LONGLUNE","LONGLUNE","Mémo LONGLUNE",2013-10-31,0,0,0,"False"
3,"MOTTE","demo","MOTTE@ask.it","MOTTE","demo","phone1","phone2","fax","IBAN","address","MOTTE","MOTTE","Mémo MOTTE",2013-10-31,0,0,0,"False"
3,"MOULIN","demo","MOULIN@ask.it","MOULIN","demo","phone1","phone2","fax","IBAN","address","MOULIN","MOULIN","Mémo MOULIN",2013-10-31,0,0,0,"False"
3,"POM D'HAPPY","demo","POM D'HAPPY@ask.it","POM D'HAPPY","demo","phone1","phone2","fax","IBAN","address","POM D'HAPPY","POM D'HAPPY","Mémo POM D'HAPPY",2013-10-31,"-130.70",0,0,"False"
3,"PORTOIS","demo","PORTOIS@ask.it","PORTOIS","demo","phone1","phone2","fax","IBAN","address","PORTOIS","PORTOIS","Mémo PORTOIS",2013-10-31,0,0,0,"False"
3,"RAUCQ","demo","RAUCQ@ask.it","RAUCQ","demo","phone1","phone2","fax","IBAN","address","RAUCQ","RAUCQ","Mémo RAUCQ",2013-10-31,0,0,0,"False"
3,"URBAIN","demo","URBAIN@ask.it","URBAIN","demo","phone1","phone2","fax","IBAN","address","URBAIN","URBAIN","Mémo URBAIN",2013-10-31,0,0,0,"False"
4,,,,,,,,,"IBAN","address","ZZC-CRASEN","ZZC-CRASEN","Mémo ZZC-CRASEN",2013-10-31,0,0,0,"False"
4,,,,,,,,,"IBAN","address","ZZC-GASATH ASBL","ZZC-GASATH ASBL","Mémo ZZC-GASATH ASBL",2013-10-31,0,0,0,"False"
4,,,,,,,,,"IBAN","address","ZZC-SITE WEB","ZZC-SITE WEB","Mémo ZZC-SITE WEB",2013-10-31,0,0,0,"False"
4,,,,,,,,,"IBAN","address","ZZC-COTISATIONS APERO","ZZC-COTISATIONS APERO","Mémo ZZC-COTISATIONS APERO",2013-10-31,0,0,0,"True"
4,"BELOEIL","demo","BELOEIL@ask.it","BELOEIL","demo","phone1","phone2","fax","IBAN","address","BELOEIL","BELOEIL","Mémo BELOEIL",2013-10-31,0,0,0,"False"
4,"BLONDEEL","demo","BLONDEEL@ask.it","BLONDEEL","demo","phone1","phone2","fax","IBAN","address","BLONDEEL","BLONDEEL","Mémo BLONDEEL",2013-10-31,0,0,0,"False"
4,"BRUYERE","demo","BRUYERE@ask.it","BRUYERE","demo","phone1","phone2","fax","IBAN","address","BRUYERE","BRUYERE","Mémo BRUYERE",2013-10-31,0,0,0,"False"
4,"CAUCHIE","demo","CAUCHIE@ask.it","CAUCHIE","demo","phone1","phone2","fax","IBAN","address","CAUCHIE","CAUCHIE","Mémo CAUCHIE",2013-10-31,0,0,0,"False"
4,"D'HONDT","demo","D'HONDT@ask.it","D'HONDT","demo","phone1","phone2","fax","IBAN","address","D'HONDT","D'HONDT","Mémo D'HONDT",2013-10-31,0,0,0,"False"
4,"DORLOU","demo","DORLOU@ask.it","DORLOU","demo","phone1","phone2","fax","IBAN","address","DORLOU","DORLOU","Mémo DORLOU",2013-10-31,0,0,0,"False"
4,"FOURMANOY","demo","FOURMANOY@ask.it","FOURMANOY","demo","phone1","phone2","fax","IBAN","address","FOURMANOY","FOURMANOY","Mémo FOURMANOY",2013-10-31,0,0,0,"False"
4,"FRISHKORN","demo","FRISHKORN@ask.it","FRISHKORN","demo","phone1","phone2","fax","IBAN","address","FRISHKORN","FRISHKORN","Mémo FRISHKORN",2013-10-31,0,0,0,"False"
4,"HOSTIE","demo","HOSTIE@ask.it","HOSTIE","demo","phone1","phone2","fax","IBAN","address","HOSTIE","HOSTIE","Mémo HOSTIE",2013-10-31,0,0,0,"False"
4,"LONGLUNE","demo","LONGLUNE@ask.it","LONGLUNE","demo","phone1","phone2","fax","IBAN","address","LONGLUNE","LONGLUNE","Mémo LONGLUNE",2013-10-31,0,0,0,"False"
4,"MOTTE","demo","MOTTE@ask.it","MOTTE","demo","phone1","phone2","fax","IBAN","address","MOTTE","MOTTE","Mémo MOTTE",2013-10-31,0,0,0,"False"
4,"MOULIN","demo","MOULIN@ask.it","MOULIN","demo","phone1","phone2","fax","IBAN","address","MOULIN","MOULIN","Mémo MOULIN",2013-10-31,0,0,0,"False"
4,"POM D'HAPPY","demo","POM D'HAPPY@ask.it","POM D'HAPPY","demo","phone1","phone2","fax","IBAN","address","POM D'HAPPY","POM D'HAPPY","Mémo POM D'HAPPY",2013-10-31,"-130.70",0,0,"False"
4,"PORTOIS","demo","PORTOIS@ask.it","PORTOIS","demo","phone1","phone2","fax","IBAN","address","PORTOIS","PORTOIS","Mémo PORTOIS",2013-10-31,0,0,0,"False"
4,"RAUCQ","demo","RAUCQ@ask.it","RAUCQ","demo","phone1","phone2","fax","IBAN","address","RAUCQ","RAUCQ","Mémo RAUCQ",2013-10-31,0,0,0,"False"
4,"URBAIN","demo","URBAIN@ask.it","URBAIN","demo","phone1","phone2","fax","IBAN","address","URBAIN","URBAIN","Mémo URBAIN",2013-10-31,0,0,0,"False"
5,,,,,,,,,"IBAN","address","ZZC-LE PANIER LENSOIS","ZZC-LE PANIER LENSOIS","Mémo ZZC-LE PANIER LENSOIS",2013-10-31,0,0,0,"True"
5,"ROISIN","demo","ROISIN@ask.it","ROISIN","demo","phone1","phone2","fax","IBAN","address","ROISIN","ROISIN","Mémo ROISIN",2013-10-31,0,0,0,"False"
5,"BEAUREGARD","demo","BEAUREGARD@ask.it","BEAUREGARD","demo","phone1","phone2","fax","IBAN","address","BEAUREGARD","BEAUREGARD","Mémo BEAUREGARD",2013-10-31,0,0,0,"False"
5,"BETTE","demo","BETTE@ask.it","BETTE","demo","phone1","phone2","fax","IBAN","address","BETTE","BETTE","Mémo BETTE",2013-10-31,0,0,0,"False"
5,"BRUYERE","demo","BRUYERE@ask.it","BRUYERE","demo","phone1","phone2","fax","IBAN","address","BRUYERE","BRUYERE","Mémo BRUYERE",2013-10-31,0,0,0,"False"
5,"HOSTIE","demo","HOSTIE@ask.it","HOSTIE","demo","phone1","phone2","fax","IBAN","address","HOSTIE","HOSTIE","Mémo HOSTIE",2013-10-31,0,0,0,"False"
5,"RAUCQ","demo","RAUCQ@ask.it","RAUCQ","demo","phone1","phone2","fax","IBAN","address","RAUCQ","RAUCQ","Mémo RAUCQ",2013-10-31,0,0,0,"False"
This diff is collapsed.
"id","domain","name"
1,"$REPANIER.BE$","Site $REPANIER.BE$"
2,"producer.$REPANIER.BE$","Site producer.$REPANIER.BE$"
3,"ptidej.$REPANIER.BE$","Site ptidej.$REPANIER.BE$"
4,"apero.$REPANIER.BE$","Site apero.$REPANIER.BE$"
5,"lelensois.$REPANIER.BE$","Site lelensois.$REPANIER.BE$"
"site","username","password","email","first_name","last_name","long_name","customer_responsible","permission"
3,"ptidej-web","demo","ptidej-web@ask.it","Webmaster","Ptidej","Webmaster Ptidej","Bawamby","Webmaster"
3,"ptidej-cde","demo","ptidej-cde@ask.it","Order","Ptidej","Order Ptidej","Bawamby","Order"
3,"ptidej-adm","demo","ptidej-adm@ask.it","Administration","Ptidej","Administration Ptidej","Bawamby","Administration"
3,"ptidej-cpt","demo","ptidej-cpt@ask.it","Account","Ptidej","Account Ptidej","Bawamby","Account"
4,"apero-web","demo","apero-web@ask.it","Webmaster","Apéro","Webmaster Apéro","Amores","Webmaster"
4,"apero-cde","demo","apero-cde@ask.it","Order","Apéro","Order Apéro","Amores","Order"
4,"apero-adm","demo","apero-adm@ask.it","Administration","Apéro","Administration Apéro","Amores","Administration"
4,"apero-cpt","demo","apero-cpt@ask.it","Account","Apéro","Account Apéro","Amores","Account"
5,"lelensois-web","demo","lelensois-web@ask.it","Webmaster","Le Lensois","Webmaster Le Lensois","1003-Philippe","Webmaster"
5,"lelensois-cde","demo","lelensois-cde@ask.it","Order","Le Lensois","Order Le Lensois","1003-Philippe","Order"
5,"lelensois-adm","demo","lelensois-adm@ask.it","Administration","Le Lensois","Administration Le Lensois","1003-Philippe","Administration"
5,"lelensois-cpt","demo","lelensois-cpt@ask.it","Account","Le Lensois","Account Le Lensois","1003-Philippe","Account"
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys, traceback
import telnetlib
import socket
import time
import datetime
import xmlrpclib
HOST = "192.168.1.1"
USER = "admin"
PASSWORD = "$SERIAL_NUMBER_OF_BELGACOM_BBOX2$"
# A récupérer depuis l'interface Gandi
ZONE_ID = $ZONE_ID$
DOMAIN_ID = $DOMAIN_ID$
API_PROD = 'https://rpc.gandi.net/xmlrpc/'
APIKEY_PROD = $APIKEY_PROD$
API_STA = 'https://rpc.ote.gandi.net/xmlrpc/'
APIKEY_STA = $APIKEY_STA$
API = API_PROD
APIKEY = APIKEY_PROD
DOMAIN_NAME = '$REPANIER.BE$'
DNS_RECORD = {'name': '@', 'type': 'A'}
DNS_TTL = 300
def main():
print datetime.datetime.now().strftime("%Y-%m-%d %H:%M") +" : start"
exit = False
error_counter = 0
while(not(exit) and (error_counter < 5)):
try:
tn = telnetlib.Telnet(HOST,23,0.1)
api = xmlrpclib.ServerProxy(API)
try:
tn.read_until("login: ")
tn.write(USER + "\n")
tn.read_until("Password: ")
tn.write(PASSWORD + "\n")
while(True):
tn.write("rg_conf_ram_print /dev/ppp0/ip" + "\n")
tn.read_until("(ip(")
new_ip = tn.read_until("))")[:-2]
current_ip = socket.getaddrinfo(DOMAIN_NAME,80)[0][4][0]
if(new_ip <> None) and (new_ip <> current_ip):
gandi_ip = api.domain.zone.record.list(APIKEY, ZONE_ID, 0)[0]['value']
if(gandi_ip <> None) and (new_ip <> gandi_ip):
print datetime.datetime.now().strftime("%Y-%m-%d %H:%M") +" : old " + gandi_ip + ", new " + new_ip
# print api.domain.zone.list(APIKEY)
version_id = api.domain.zone.version.new(APIKEY, ZONE_ID)
# Mise a jour (suppression puis création de l'enregistrement)
delete_count = api.domain.zone.record.delete(APIKEY, ZONE_ID, version_id, DNS_RECORD)
if(delete_count == 0):
print "no record to delete"
else:
DNS_RECORD['value'] = new_ip
DNS_RECORD['ttl'] = DNS_TTL
api.domain.zone.record.add(APIKEY, ZONE_ID, version_id, DNS_RECORD)
# On valide les modifications sur la zone
api.domain.zone.version.set(APIKEY, ZONE_ID, version_id)
api.domain.zone.set(APIKEY, DOMAIN_NAME, ZONE_ID)
time.sleep(2)
except EOFError:
error_counter +=1
pass
except socket.timeout:
error_counter +=1
pass
except socket.error:
error_counter +=1
pass
tn.write("exit\n")
except KeyboardInterrupt:
exit=True
except:
error_counter +=1
print traceback.format_exc()
if __name__ == '__main__':
main()
\ No newline at end of file
#!/bin/bash
if [ -z "$1" ]; then
echo "usage: $0 directory_of_the_new_virtualenv"
exit
fi
cd ~
sudo -k
sudo -l
mkdir $1
virtualenv $1
cd $1
source bin/activate
sudo apt-get install gettext
sudo apt-get install libpq-dev python-dev python-setuptools
pip install psycopg2
# IF installing the latest stable version
# pip install django-cms
# ELSE installing the latest development version
# sudo apt-get install unzip
# wget https://github.com/divio/django-cms/archive/develop.zip
# unzip develop.zip
# pip install -e django-cms-develop/
# ELSE installing a specific version
pip install https://github.com/divio/django-cms/archive/3.0.0.beta3.zip
# ENDIF
pip install djangocms-text-ckeditor
# For easy_thumbnails which need Pillow (https://github.com/python-imaging/Pillow)
sudo apt-get install libtiff4-dev libjpeg8-dev zlib1g-dev libfreetype6-dev liblcms1-dev libwebp-dev tcl8.5-dev tk8.5-dev
pip install Pillow
pip install cmsplugin-filer
pip install django-reversion
pip install django_compressor
# pip install django_debug_toolbar
# pip install django-dajaxice ! not working with Django 1.6
# pip install django-custom-user
# pip install django-registration
pip install django-crispy-forms
pip install crispy-forms-foundation
export DJANGO_SETTINGS_MODULE=
django-admin.py startproject mysite
cd ~/$1/mysite/mysite
mkdir media
cd media
mkdir repanier.be
cd repanier.be
mkdir public
cd public
mkdir cms
mkdir cms_page_media
sudo chgrp www-data cms_page_media
chmod g+w cms_page_media
mkdir tmp
sudo chgrp www-data tmp
chmod g+w tmp
mkdir filer_public
sudo chgrp www-data filer_public
chmod g+w filer_public
mkdir filer_public_thumbnails
sudo chgrp www-data filer_public_thumbnails
chmod g+w filer_public_thumbnails
mkdir uploaded_pictures
sudo chgrp www-data uploaded_pictures
chmod g+w uploaded_pictures
cd ..
mkdir smedia
cd smedia
mkdir filer_private
sudo chgrp www-data filer_private
chmod g+w filer_private
mkdir filer_private_thumbnails
sudo chgrp www-data filer_private_thumbnails
chmod g+w filer_private_thumbnails
cd ..
cd ..
mkdir apero.repanier.be
cd apero.repanier.be
mkdir public
cd public
mkdir cms
mkdir cms_page_media
sudo chgrp www-data cms_page_media
chmod g+w cms_page_media
mkdir tmp
sudo chgrp www-data tmp
chmod g+w tmp
mkdir filer_public
sudo chgrp www-data filer_public
chmod g+w filer_public
mkdir filer_public_thumbnails
sudo chgrp www-data filer_public_thumbnails
chmod g+w filer_public_thumbnails
mkdir uploaded_pictures
sudo chgrp www-data uploaded_pictures
chmod g+w uploaded_pictures
cd ..
mkdir smedia
cd smedia
mkdir filer_private
sudo chgrp www-data filer_private
chmod g+w filer_private
mkdir filer_private_thumbnails
sudo chgrp www-data filer_private_thumbnails
chmod g+w filer_private_thumbnails
cd ..
cd ..
mkdir producteur.repanier.be
cd producteur.repanier.be
mkdir public
cd public
mkdir cms
mkdir cms_page_media
sudo chgrp www-data cms_page_media
chmod g+w cms_page_media
mkdir tmp
sudo chgrp www-data tmp
chmod g+w tmp
mkdir filer_public
sudo chgrp www-data filer_public
chmod g+w filer_public
mkdir filer_public_thumbnails
sudo chgrp www-data filer_public_thumbnails
chmod g+w filer_public_thumbnails
mkdir uploaded_pictures
sudo chgrp www-data uploaded_pictures
chmod g+w uploaded_pictures
cd ..
mkdir smedia
cd smedia
mkdir filer_private
sudo chgrp www-data filer_private
chmod g+w filer_private
mkdir filer_private_thumbnails
sudo chgrp www-data filer_private_thumbnails
chmod g+w filer_private_thumbnails
cd ..
cd ..
mkdir ptidej.repanier.be
cd ptidej.repanier.be
mkdir public
cd public
mkdir cms
mkdir cms_page_media
sudo chgrp www-data cms_page_media
chmod g+w cms_page_media
mkdir tmp
sudo chgrp www-data tmp
chmod g+w tmp
mkdir filer_public
sudo chgrp www-data filer_public
chmod g+w filer_public
mkdir filer_public_thumbnails
sudo chgrp www-data filer_public_thumbnails
chmod g+w filer_public_thumbnails
mkdir uploaded_pictures
sudo chgrp www-data uploaded_pictures
chmod g+w uploaded_pictures
cd ..
mkdir smedia
cd smedia
mkdir filer_private
sudo chgrp www-data filer_private
chmod g+w filer_private
mkdir filer_private_thumbnails
sudo chgrp www-data filer_private_thumbnails
chmod g+w filer_private_thumbnails
cd ..
cd ..
mkdir lepanierlensois.repanier.be
cd lepanierlensois.repanier.be
mkdir public
cd public
mkdir cms
mkdir cms_page_media
sudo chgrp www-data cms_page_media
chmod g+w cms_page_media
mkdir tmp
sudo chgrp www-data tmp
chmod g+w tmp
mkdir filer_public
sudo chgrp www-data filer_public
chmod g+w filer_public
mkdir filer_public_thumbnails
sudo chgrp www-data filer_public_thumbnails
chmod g+w filer_public_thumbnails
mkdir uploaded_pictures
sudo chgrp www-data uploaded_pictures
chmod g+w uploaded_pictures
cd ..
mkdir smedia
cd smedia
mkdir filer_private
sudo chgrp www-data filer_private
chmod g+w filer_private
mkdir filer_private_thumbnails
sudo chgrp www-data filer_private_thumbnails
chmod g+w filer_private_thumbnails
cd ..
cd ..
mkdir l_epi_dici.be
cd l_epi_dici.be
mkdir public
cd public
mkdir cms
mkdir cms_page_media
sudo chgrp www-data cms_page_media
chmod g+w cms_page_media
mkdir tmp
sudo chgrp www-data tmp
chmod g+w tmp
mkdir filer_public
sudo chgrp www-data filer_public
chmod g+w filer_public
mkdir filer_public_thumbnails
sudo chgrp www-data filer_public_thumbnails
chmod g+w filer_public_thumbnails
mkdir uploaded_pictures
sudo chgrp www-data uploaded_pictures
chmod g+w uploaded_pictures
cd ..
mkdir smedia
cd smedia
mkdir filer_private
sudo chgrp www-data filer_private
chmod g+w filer_private
mkdir filer_private_thumbnails
sudo chgrp www-data filer_private_thumbnails
chmod g+w filer_private_thumbnails
cd ..
cd ..
cd ..
mkdir collect-static
mkdir templates
cd ~/$1/mysite
# ----------------- Use compressor
cd ~/$1/mysite/mysite/collect-static
mkdir compressor
cd compressor
mkdir css
sudo chgrp www-data css
chmod g+w css
mkdir js
sudo chgrp www-data js
chmod g+w js
# ----------------- Use django cache
cd /var/tmp
mkdir django_cache
sudo chgrp www-data django_cache
chmod g+w django_cache
rm -rf /var/tmp/django_cache/*
# ----------------- Use django file session
cd /var/tmp
mkdir django_session
sudo chgrp www-data django_session
chmod g+w django_session
rm -rf /var/tmp/django_session/*
cd ~/$1
echo "#"
echo "# To be done manually :"
echo "# ---------------------"
echo "# Copy /mysite/*_settings.py, urls.py and subfolers (templates, js, ...) to $1/mysite/mysite/*"
echo "# Copy /mysite/media/favico to $1/mysite/mysite/media/*"
echo "# Copy /mysite/template/* and subfolder to $1/mysite/mysite/template/*"
echo "# Copy /repanier/* and subfolders to $1/mysite/repanier/*"
echo "# Copy static files to be available through the webserver"
echo cd ~/$1/mysite
echo python manage.py collectstatic --settings=mysite.repanier_settings
echo "# Copy without replacing /mysite/collect-static/* and subfolder to $1/mysite/mysite/collect-static/*"
echo "# If some errors execute python manage.py collectstatic --traceback --settings=mysite.repanier_settings"
echo "# Create the DB with south"
echo "# Check DB paramters, secret_key, ... into ~/$1/mysite/mysite/production_settings.py"
echo cd ~/$1/mysite
echo python manage.py syncdb --all --settings=mysite.repanier_settings
echo python manage.py schemamigration repanier --initial --settings=mysite.repanier_settings
echo python manage.py migrate --fake --settings=mysite.repanier_settings
echo "# Check if CMS is ok"
echo cd ~/$1/mysite
echo python manage.py cms check --settings=mysite.repanier_settings
echo "# Compile translation files"
echo cd ~/$1/mysite/repanier
echo django-admin.py compilemessages
echo cd ~/$1/mysite/mysite
echo django-admin.py compilemessages
echo "# Initialize the DB with test content"
echo "# Copy /mysite/createdb/createdb.py and *.csv into ~/$1/mysite/"
echo cd ~/$1/mysite/
echo export DJANGO_SETTINGS_MODULE='mysite.repanier_settings'
echo python createdb.py
echo "#"
echo "# WHEN READY"
echo ln -s ~/$1 ~/production
echo "# Restart the webserver"
echo sudo /etc/init.d/nginx restart
echo sudo /etc/init.d/uwsgi stop
echo rm -rf /var/tmp/django_cache/*
echo sudo /etc/init.d/uwsgi start
user www-data;
worker_processes 4;
pid /var/run/nginx.pid;
events {
worker_connections 768;
# multi_accept on;
}
http {
##
# Basic Settings
##
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
# server_tokens off;
server_names_hash_bucket_size 64;
# server_name_in_redirect off;
include /etc/nginx/mime.types;
default_type application/octet-stream;
##
# Logging Settings
##
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
##
# Gzip Settings
##
gzip on;
gzip_static on;
gzip_disable "msie6";
gzip_vary on;
gzip_proxied any;
gzip_comp_level 2;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
##
# nginx-naxsi config
##
# Uncomment it if you installed nginx-naxsi
##
#include /etc/nginx/naxsi_core.rules;
##
# nginx-passenger config
##
# Uncomment it if you installed nginx-passenger
##
#passenger_root /usr;
#passenger_ruby /usr/bin/ruby;
##
# Virtual Host Configs
##
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}
#mail {
# # See sample authentication script at:
# # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
#
# # auth_http localhost/auth.php;
# # pop3_capabilities "TOP" "USER";
# # imap_capabilities "IMAP4rev1" "UIDPLUS";
#
# server {
# listen localhost:110;
# protocol pop3;
# proxy on;
# }
#
# server {
# listen localhost:143;