Skip to content

Commit 22ae856

Browse files
committed
Initial commit
0 parents  commit 22ae856

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

99 files changed

+3772
-0
lines changed

.coveragerc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[run]
2+
include = pyconve_site/*
3+
omit = *migrations*

.editorconfig

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# http://editorconfig.org
2+
3+
root = true
4+
5+
[*]
6+
charset = utf-8
7+
end_of_line = lf
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.{py,rst,ini}]
12+
indent_style = space
13+
indent_size = 4
14+
15+
[*.py]
16+
# https://github.com/timothycrosley/isort/wiki/isort-Settings
17+
line_length=120
18+
known_first_party=pyconve_site
19+
multi_line_output=3
20+
default_section=THIRDPARTY
21+
22+
[*.yml]
23+
indent_style = space
24+
indent_size = 2
25+
26+
[*.md]
27+
trim_trailing_whitespace = false
28+
29+
[Makefile]
30+
indent_style = tab

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto

.gitignore

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
### OSX ###
2+
.DS_Store
3+
.AppleDouble
4+
.LSOverride
5+
6+
### SublimeText ###
7+
# cache files for sublime text
8+
*.tmlanguage.cache
9+
*.tmPreferences.cache
10+
*.stTheme.cache
11+
12+
# workspace files are user-specific
13+
*.sublime-workspace
14+
15+
# project files should be checked into the repository, unless a significant
16+
# proportion of contributors will probably not be using SublimeText
17+
# *.sublime-project
18+
19+
# sftp configuration file
20+
sftp-config.json
21+
22+
# Basics
23+
*.py[cod]
24+
*.pyc
25+
__pycache__
26+
27+
# Logs
28+
*.log
29+
pip-log.txt
30+
31+
# Unit test / coverage reports
32+
.coverage
33+
.tox
34+
nosetests.xml
35+
htmlcov
36+
37+
# Translations
38+
*.mo
39+
*.pot
40+
41+
# Pycharm
42+
.idea
43+
44+
# Vim
45+
46+
*~
47+
*.swp
48+
*.swo
49+
50+
# npm
51+
node_modules/
52+
53+
# Compass
54+
.sass-cache
55+
56+
# virtual environments
57+
.env

.travis.yml

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
before_install:
2+
- sudo apt-get update -qq
3+
- sudo apt-get install -qq build-essential gettext python-dev zlib1g-dev libpq-dev xvfb
4+
- sudo apt-get install -qq libtiff4-dev libjpeg8-dev libfreetype6-dev liblcms1-dev libwebp-dev
5+
- sudo apt-get install -qq graphviz-dev python-setuptools python3-dev python-virtualenv python-pip
6+
- sudo apt-get install -qq firefox automake libtool libreadline6 libreadline6-dev libreadline-dev
7+
- sudo apt-get install -qq libsqlite3-dev libxml2 libxml2-dev libssl-dev libbz2-dev wget curl llvm
8+
language: python
9+
python:
10+
- "3.4"
11+
install:
12+
- "pip install hitch"
13+
- "cd tests"
14+
- "hitch init"
15+
script:
16+
- "hitch test . --extra '{\"xvfb\":true, \"pause_on_failure\":false}'"

CONTRIBUTORS.txt

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Luis Alberto Santana

Dockerfile

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
FROM python:2.7
2+
ENV PYTHONUNBUFFERED 1
3+
4+
# Requirements have to be pulled and installed here, otherwise caching won't work
5+
ADD ./requirements /requirements
6+
ADD ./requirements.txt /requirements.txt
7+
8+
RUN pip install -r /requirements.txt
9+
RUN pip install -r /requirements/local.txt
10+
11+
RUN groupadd -r django && useradd -r -g django django
12+
ADD . /app
13+
RUN chown -R django /app
14+
15+
ADD ./compose/django/gunicorn.sh /gunicorn.sh
16+
ADD ./compose/django/entrypoint.sh /entrypoint.sh
17+
18+
RUN chmod +x /entrypoint.sh && chown django /entrypoint.sh
19+
RUN chmod +x /gunicorn.sh && chown django /gunicorn.sh
20+
21+
WORKDIR /app
22+
23+
ENTRYPOINT ["/entrypoint.sh"]

Gruntfile.js

+134
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
module.exports = function (grunt) {
2+
3+
var appConfig = grunt.file.readJSON('package.json');
4+
5+
// Load grunt tasks automatically
6+
// see: https://github.com/sindresorhus/load-grunt-tasks
7+
require('load-grunt-tasks')(grunt);
8+
9+
// Time how long tasks take. Can help when optimizing build times
10+
// see: https://npmjs.org/package/time-grunt
11+
require('time-grunt')(grunt);
12+
13+
var pathsConfig = function (appName) {
14+
this.app = appName || appConfig.name;
15+
16+
return {
17+
app: this.app,
18+
templates: this.app + '/templates',
19+
css: this.app + '/static/css',
20+
sass: this.app + '/static/sass',
21+
fonts: this.app + '/static/fonts',
22+
images: this.app + '/static/images',
23+
js: this.app + '/static/js',
24+
manageScript: 'manage.py',
25+
26+
}
27+
};
28+
29+
grunt.initConfig({
30+
31+
paths: pathsConfig(),
32+
pkg: appConfig,
33+
34+
// see: https://github.com/gruntjs/grunt-contrib-watch
35+
watch: {
36+
gruntfile: {
37+
files: ['Gruntfile.js']
38+
},
39+
sass: {
40+
files: ['<%= paths.sass %>/**/*.{scss,sass}'],
41+
tasks: ['sass:dev'],
42+
options: {
43+
atBegin: true
44+
}
45+
},
46+
livereload: {
47+
files: [
48+
'<%= paths.js %>/**/*.js',
49+
'<%= paths.sass %>/**/*.{scss,sass}',
50+
'<%= paths.app %>/**/*.html'
51+
],
52+
options: {
53+
spawn: false,
54+
livereload: true,
55+
},
56+
},
57+
},
58+
59+
// see: https://github.com/sindresorhus/grunt-sass
60+
sass: {
61+
dev: {
62+
options: {
63+
outputStyle: 'nested',
64+
sourceMap: false,
65+
precision: 10
66+
},
67+
files: {
68+
'<%= paths.css %>/project.css': '<%= paths.sass %>/project.scss'
69+
},
70+
},
71+
dist: {
72+
options: {
73+
outputStyle: 'compressed',
74+
sourceMap: false,
75+
precision: 10
76+
},
77+
files: {
78+
'<%= paths.css %>/project.css': '<%= paths.sass %>/project.scss'
79+
},
80+
}
81+
},
82+
83+
//see https://github.com/nDmitry/grunt-postcss
84+
postcss: {
85+
options: {
86+
map: true, // inline sourcemaps
87+
88+
processors: [
89+
require('pixrem')(), // add fallbacks for rem units
90+
require('autoprefixer-core')({browsers: [
91+
'Android 2.3',
92+
'Android >= 4',
93+
'Chrome >= 20',
94+
'Firefox >= 24',
95+
'Explorer >= 8',
96+
'iOS >= 6',
97+
'Opera >= 12',
98+
'Safari >= 6'
99+
]}), // add vendor prefixes
100+
require('cssnano')() // minify the result
101+
]
102+
},
103+
dist: {
104+
src: '<%= paths.css %>/*.css'
105+
}
106+
},
107+
108+
// see: https://npmjs.org/package/grunt-bg-shell
109+
bgShell: {
110+
_defaults: {
111+
bg: true
112+
},
113+
runDjango: {
114+
cmd: 'python <%= paths.manageScript %> runserver'
115+
},
116+
117+
}
118+
});
119+
120+
grunt.registerTask('serve', [
121+
'bgShell:runDjango',
122+
'watch'
123+
]);
124+
125+
grunt.registerTask('build', [
126+
'sass:dist',
127+
'postcss'
128+
]);
129+
130+
grunt.registerTask('default', [
131+
'build'
132+
]);
133+
134+
};

LICENSE

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
Copyright (c) 2015, Luis Alberto Santana
2+
All rights reserved.
3+
4+
Redistribution and use in source and binary forms, with or without modification,
5+
are permitted provided that the following conditions are met:
6+
7+
* Redistributions of source code must retain the above copyright notice, this
8+
list of conditions and the following disclaimer.
9+
10+
* Redistributions in binary form must reproduce the above copyright notice, this
11+
list of conditions and the following disclaimer in the documentation and/or
12+
other materials provided with the distribution.
13+
14+
* Neither the name of pyconve_site nor the names of its
15+
contributors may be used to endorse or promote products derived from this
16+
software without specific prior written permission.
17+
18+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
19+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21+
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
22+
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
23+
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
25+
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
26+
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
27+
OF THE POSSIBILITY OF SUCH DAMAGE.

Procfile

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
web: gunicorn config.wsgi:application

0 commit comments

Comments
 (0)