Estes passos assumem que o Colab e o Gitlab já estão instalados e funcionando com seus bancos default (sem dados).
Todos os passos a seguir devem ser executados no beta.softwarepublico.gov.br:
upstream django_app { | |
server 127.0.0.1:8000; | |
} |
#! /bin/sh | |
USER=$1; GROUP=$2; HOME=$3 | |
if [ 0 -ne $(getent passwd $USER > /dev/null)$? ] | |
then useradd $USER --home $HOME --gid $GROUP -n; fi | |
OLDGID=`getent passwd $USER | awk -F: '{print $4}'` | |
OLDGROUP=`getent group $OLDGID | awk -F: '{print $1}'` | |
OLDHOME=`getent passwd $USER | awk -F: '{print $6}'` | |
if [ "$GROUP" != "$OLDGID" ] && [ "$GROUP" != "$OLDGROUP" ] | |
then usermod --gid $GROUP $USER; fi | |
if [ "$HOME" != "$OLDHOME" ] |
# -*- coding: utf-8 -*- | |
# Header ^^^ por causa de acento no código fonte | |
import string | |
from random import shuffle | |
1673 us | |
1332 de | |
568 fr | |
445 nl | |
305 ru | |
287 gb | |
220 se | |
203 ca | |
120 ch | |
113 cz |
import collections | |
class HTTPHeaderMap(collections.MutableMapping): | |
""" | |
A structure that contains HTTP headers. | |
HTTP headers are a curious beast. At the surface level they look roughly | |
like a name-value set, but in practice they have many variations that | |
make them tricky: |
<html> | |
<head> | |
<style> | |
#barcode {height: 60px;} | |
#barcode span {margin: 0;padding-bottom: 34px;height: 16px;} | |
.n {padding-right: 1px;} | |
.w {padding-right: 3px;} | |
.n, .w {background-color: #000;} | |
.s {background-color: #fff;} | |
</style> |
If you need to use a template different from the Django's default (for example to generate a Google News sitemap) you can extend the you Sitemap class and setting a sitemap_template
attribute. For Example:
from django.contrib.sitemaps import GenericSitemap
sitemap_template = 'sitemap_googlenews.xml'
""" | |
BOSH Client | |
----------- | |
Quite simple BOSH client used by Django-XMPPAuth | |
For now, it only supports the DIGEST-MD5 authentication method. | |
""" | |
import httplib, sys, random |
# encoding: utf-8 | |
from __future__ import absolute_import, division, print_function, unicode_literals | |
import operator | |
import warnings | |
from django.utils import six | |
from haystack import connection_router, connections |