Skip to content

Commit 22c0dce

Browse files
committed
Initial import
0 parents  commit 22c0dce

27 files changed

+797
-0
lines changed

.checkignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
tests/*
2+
docs/*

.codeclimate.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
languages:
2+
Ruby: false
3+
JavaScript: false
4+
PHP: false
5+
Python: true
6+
exclude_paths:
7+
- 'djangocms_multisite/migrations/*'
8+
- 'djangocms_multisite/south_migrations/*'
9+
- 'tests/*'

.coveragerc

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
[run]
2+
branch = True
3+
source = djangocms_multisite
4+
5+
[report]
6+
omit = ../*migrations*,../*tests*,../*compat.*
7+
# Regexes for lines to exclude from consideration
8+
exclude_lines =
9+
# Have to re-enable the standard pragma
10+
pragma: no cover
11+
12+
# Don't complain about missing debug-only code:
13+
def __repr__
14+
if self\.debug
15+
16+
# Don't complain if tests don't hit defensive assertion code:
17+
raise AssertionError
18+
raise NotImplementedError
19+
20+
# Don't complain if non-runnable code isn't run:
21+
if 0:
22+
if __name__ == .__main__.:
23+
24+
ignore_errors = True
25+
26+
[html]
27+
directory = coverage_html

.editorconfig

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# http://editorconfig.org
2+
root = true
3+
4+
[*]
5+
indent_style = space
6+
indent_size = 4
7+
end_of_line = lf
8+
charset = utf-8
9+
trim_trailing_whitespace = true
10+
insert_final_newline = true
11+
max_line_length = 80
12+
13+
[*.md]
14+
trim_trailing_whitespace = false
15+
16+
[*.rst]
17+
max_line_length = 80
18+
19+
[*.py]
20+
max_line_length = 100
21+
22+
[*.{scss,html}]
23+
indent_size = 2
24+
indent_style = space
25+
max_line_length = 120
26+
27+
[*.js]
28+
indent_size = 2
29+
max_line_length = 120
30+
31+
[*.yml]
32+
indent_size = 2
33+
34+
[Makefile]
35+
indent_style = tab

.gitignore

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
*.py[cod]
2+
3+
# C extensions
4+
*.so
5+
6+
# Packages
7+
*.egg
8+
*.egg-info
9+
dist
10+
build
11+
eggs
12+
parts
13+
bin
14+
var
15+
sdist
16+
develop-eggs
17+
.installed.cfg
18+
lib
19+
lib64
20+
21+
# Installer logs
22+
pip-log.txt
23+
24+
# Unit test / coverage reports
25+
.coverage
26+
.tox
27+
nosetests.xml
28+
29+
# Mr Developer
30+
.mr.developer.cfg
31+
.project
32+
.pydevproject
33+
34+
# Complexity
35+
output/*.html
36+
output/*/index.html
37+
38+
# Sphinx
39+
docs/build
40+
41+
*.lokalize
42+
lokalize*
43+
44+
.idea
45+
docs/_build
46+
47+
*~
48+
*.db
49+
*.sqlite

.gitlab-ci.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# This file is generated by GitLab CI
2+
ci:
3+
script:
4+
- COMMAND="coverage run" tox -epep8,isort,py35-django19-cms32,py34-django18-cms31,py27-django16-cms30
5+
- if [[ $? -eq 0 ]]; then coverage report; fi

.travis.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Config file for automatic testing at travis-ci.org
2+
3+
language: python
4+
5+
sudo: false
6+
7+
python:
8+
- 3.5
9+
- 3.4
10+
- 2.7
11+
12+
env:
13+
matrix:
14+
- TOXENV='pep8'
15+
- TOXENV='isort'
16+
- TOXENV='docs'
17+
- DJANGO='django19' CMS='cms33'
18+
- DJANGO='django19' CMS='cms32'
19+
- DJANGO='django18' CMS='cms33'
20+
- DJANGO='django18' CMS='cms32'
21+
22+
23+
# command to install dependencies, e.g. pip install -r requirements.txt --use-mirrors
24+
install:
25+
- "if [[ $TRAVIS_PYTHON_VERSION == '2.7' ]]; then export PYVER=py27; fi"
26+
- "if [[ $TRAVIS_PYTHON_VERSION == '3.4' ]]; then export PYVER=py34; fi"
27+
- "if [[ $TRAVIS_PYTHON_VERSION == '3.5' ]]; then export PYVER=py35; fi"
28+
- "if [[ ${DJANGO}z != 'z' ]]; then export TOXENV=$PYVER-$DJANGO-$CMS; fi"
29+
30+
# command to run tests, e.g. python setup.py test
31+
script: COMMAND='coverage run' tox -e$TOXENV
32+
33+
before_install:
34+
- pip install -U tox>=1.8 coveralls codecov wheel pip
35+
after_success:
36+
- codecov
37+
- coveralls
38+
39+
matrix:
40+
exclude:
41+
- python: 2.7
42+
env: TOXENV='docs'
43+
- python: 2.7
44+
env: TOXENV='pep8'
45+
- python: 2.7
46+
env: TOXENV='isort'
47+
- python: 3.4
48+
env: TOXENV='docs'
49+
- python: 3.4
50+
env: TOXENV='pep8'
51+
- python: 3.4
52+
env: TOXENV='isort'
53+
54+
55+
cache:
56+
directories:
57+
- $HOME/.pip-accel
58+
- $HOME/.cache/pip
59+
60+

AUTHORS.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
=======
2+
Credits
3+
=======
4+
5+
Based on code originally by Stefan Foulis
6+
7+
Development Lead
8+
----------------
9+
10+
* Iacopo Spalletti <[email protected]>
11+
12+
Contributors
13+
------------
14+

CONTRIBUTING.rst

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
============
2+
Contributing
3+
============
4+
5+
Contributions are welcome, and they are greatly appreciated! Every
6+
little bit helps, and credit will always be given.
7+
8+
You can contribute in many ways:
9+
10+
Types of Contributions
11+
----------------------
12+
13+
Report Bugs
14+
~~~~~~~~~~~
15+
16+
Report bugs at https://github.com/nephila/djangocms-multisite/issues.
17+
18+
If you are reporting a bug, please include:
19+
20+
* Your operating system name and version.
21+
* Any details about your local setup that might be helpful in troubleshooting.
22+
* Detailed steps to reproduce the bug.
23+
24+
Fix Bugs
25+
~~~~~~~~
26+
27+
Look through the GitHub issues for bugs. Anything tagged with "bug"
28+
is open to whoever wants to implement it.
29+
30+
Implement Features
31+
~~~~~~~~~~~~~~~~~~
32+
33+
Look through the GitHub issues for features. Anything tagged with "feature"
34+
is open to whoever wants to implement it.
35+
36+
Write Documentation
37+
~~~~~~~~~~~~~~~~~~~
38+
39+
djangocms-multisite could always use more documentation, whether as part of the
40+
official djangocms-multisite docs, in docstrings, or even on the web in blog posts,
41+
articles, and such.
42+
43+
Submit Feedback
44+
~~~~~~~~~~~~~~~
45+
46+
The best way to send feedback is to file an issue at https://github.com/nephila/djangocms-multisite/issues.
47+
48+
If you are proposing a feature:
49+
50+
* Explain in detail how it would work.
51+
* Keep the scope as narrow as possible, to make it easier to implement.
52+
* Remember that this is a volunteer-driven project, and that contributions
53+
are welcome :)
54+
55+
Get Started!
56+
------------
57+
58+
Ready to contribute? Here's how to set up `djangocms-multisite` for local development.
59+
60+
1. Fork the `djangocms-multisite` repo on GitHub.
61+
2. Clone your fork locally::
62+
63+
$ git clone [email protected]:your_name_here/djangocms-multisite.git
64+
65+
3. Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you set up your fork for local development::
66+
67+
$ mkvirtualenv djangocms-multisite
68+
$ cd djangocms-multisite/
69+
$ python setup.py develop
70+
71+
4. Create a branch for local development::
72+
73+
$ git checkout -b name-of-your-bugfix-or-feature
74+
75+
Now you can make your changes locally.
76+
77+
5. When you're done making changes, check that your changes pass flake8 and the
78+
tests, including testing other Python versions with tox::
79+
80+
$ flake8 djangocms_multisite tests
81+
$ python setup.py test
82+
$ tox
83+
84+
To get flake8 and tox, just pip install them into your virtualenv.
85+
86+
6. Commit your changes and push your branch to GitHub::
87+
88+
$ git add .
89+
$ git commit -m "Your detailed description of your changes."
90+
$ git push origin name-of-your-bugfix-or-feature
91+
92+
7. Submit a pull request through the GitHub website.
93+
94+
Pull Request Guidelines
95+
-----------------------
96+
97+
Before you submit a pull request, check that it meets these guidelines:
98+
99+
1. The pull request should include tests.
100+
2. If the pull request adds functionality, the docs should be updated. Put
101+
your new functionality into a function with a docstring, and add the
102+
feature to the list in README.rst.
103+
3. The pull request should work for Python 2.6, 2.7, and 3.3, and for PyPy. Check
104+
https://travis-ci.org/nephila/djangocms-multisite/pull_requests
105+
and make sure that the tests pass for all supported Python versions.
106+
107+
Tips
108+
----
109+
110+
To run a subset of tests::
111+
112+
$ python -m unittest tests.test_djangocms_multisite

HISTORY.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.. :changelog:
2+
3+
History
4+
-------
5+
6+
0.1.0 (unreleased)
7+
++++++++++++++++++
8+
9+
* First experimental release

LICENSE

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

MANIFEST.in

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
include AUTHORS.rst
2+
include CONTRIBUTING.rst
3+
include HISTORY.rst
4+
include LICENSE
5+
include README.rst
6+
recursive-include djangocms_multisite *.html *.png *.gif *js *jpg *jpeg *svg *py *css *po *mo

Makefile

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
.PHONY: clean-pyc clean-build docs
2+
3+
help:
4+
@echo "clean-build - remove build artifacts"
5+
@echo "clean-pyc - remove Python file artifacts"
6+
@echo "lint - check style with flake8"
7+
@echo "test - run tests quickly with the default Python"
8+
@echo "testall - run tests on every Python version with tox"
9+
@echo "coverage - check code coverage quickly with the default Python"
10+
@echo "release - package and upload a release"
11+
@echo "sdist - package"
12+
13+
clean: clean-build clean-pyc
14+
15+
clean-build:
16+
python setup.py clean --all
17+
rm -fr build/
18+
rm -fr dist/
19+
rm -fr *.egg-info
20+
21+
clean-pyc:
22+
find . -name '*.pyc' -exec rm -f {} +
23+
find . -name '*.pyo' -exec rm -f {} +
24+
find . -name '*~' -exec rm -f {} +
25+
26+
lint:
27+
flake8 djangocms_multisite tests
28+
djangocms-helper djangocms_multisite pyflakes --cms
29+
30+
test:
31+
djangocms-helper djangocms_multisite test --cms --nose
32+
33+
test-all:
34+
tox
35+
36+
coverage:
37+
coverage erase
38+
coverage run `which djangocms-helper` djangocms_multisite test --cms --nose
39+
coverage report -m
40+
41+
release: clean
42+
python setup.py clean --all sdist bdist_wheel
43+
twine upload dist/*
44+
45+
sdist: clean
46+
python setup.py sdist
47+
ls -l dist

0 commit comments

Comments
 (0)