-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
92ff435
commit 3a4a0fe
Showing
10 changed files
with
173 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
- repo: https://github.com/pre-commit/pre-commit-hooks.git | ||
sha: 616c1ebd1898c91de9a0548866a59cbd9f4547f6 | ||
hooks: | ||
- id: autopep8-wrapper | ||
language_version: python3 | ||
- id: check-added-large-files | ||
- id: check-docstring-first | ||
language_version: python3 | ||
- id: check-json | ||
- id: check-merge-conflict | ||
- id: check-xml | ||
- id: check-yaml | ||
- id: debug-statements | ||
language_version: python3 | ||
- id: detect-private-key | ||
- id: double-quote-string-fixer | ||
language_version: python3 | ||
- id: end-of-file-fixer | ||
- id: flake8 | ||
language_version: python3 | ||
- id: name-tests-test | ||
- id: requirements-txt-fixer | ||
- id: trailing-whitespace | ||
- repo: https://github.com/asottile/reorder_python_imports.git | ||
sha: 3d86483455ab5bd06cc1069fdd5ac57be5463f10 | ||
hooks: | ||
- id: reorder-python-imports | ||
language_version: python3 | ||
- repo: https://github.com/Lucas-C/pre-commit-hooks.git | ||
sha: 2f63005157f76e34303fc891ec9e9bc97d267d4a | ||
hooks: | ||
- id: remove-tabs | ||
- repo: https://github.com/pre-commit/mirrors-scss-lint | ||
sha: 3eb13b9647543ad4d6a62c8be8a9131e3b99b96a | ||
hooks: | ||
- id: scss-lint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
SRC = website | ||
|
||
check: | ||
pre-commit run --all-files | ||
|
||
dev: | ||
./manage.py runserver 0.0.0.0:8000 | ||
|
||
scss: | ||
python setup.py build_sass | ||
|
||
update-requirements: | ||
$(eval TMP := $(shell mktemp -d)) | ||
virtualenv -p python3 $(TMP) | ||
. $(TMP)/bin/activate && \ | ||
pip install --upgrade pip && \ | ||
pip install . && \ | ||
pip freeze | grep -v '^ocf-website==' | sed 's/^ocflib==.*/ocflib/' > requirements.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/usr/bin/env python | ||
import os | ||
import sys | ||
|
||
if __name__ == '__main__': | ||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'ocfweb.settings') | ||
|
||
from django.core.management import execute_from_command_line | ||
|
||
execute_from_command_line(sys.argv) |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import os | ||
|
||
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) | ||
|
||
SECRET_KEY = 'not_a_secret-a(y))f7-_^ji^ezc5k7l%thr-m@(pk^rf)rz+)p#v82mmc_1dh' | ||
DEBUG = True | ||
|
||
ALLOWED_HOSTS = [] | ||
|
||
|
||
INSTALLED_APPS = ( | ||
'django.contrib.sessions', | ||
'django.contrib.messages', | ||
'django.contrib.staticfiles', | ||
) | ||
|
||
MIDDLEWARE_CLASSES = ( | ||
'django.contrib.sessions.middleware.SessionMiddleware', | ||
'django.middleware.common.CommonMiddleware', | ||
'django.middleware.csrf.CsrfViewMiddleware', | ||
'django.contrib.messages.middleware.MessageMiddleware', | ||
'django.middleware.clickjacking.XFrameOptionsMiddleware', | ||
) | ||
|
||
ROOT_URLCONF = 'ocfweb.urls' | ||
|
||
TEMPLATES = [{ | ||
'BACKEND': 'django.template.backends.django.DjangoTemplates', | ||
'DIRS': [], | ||
'APP_DIRS': True, | ||
'OPTIONS': { | ||
'context_processors': [ | ||
'django.template.context_processors.request', | ||
'django.contrib.messages.context_processors.messages', | ||
], | ||
}, | ||
}] | ||
|
||
WSGI_APPLICATION = 'ocfweb.wsgi.application' | ||
|
||
DATABASES = {} | ||
|
||
LANGUAGE_CODE = 'en-us' | ||
TIME_ZONE = 'UTC' | ||
USE_I18N = False | ||
USE_L10N = False | ||
USE_TZ = True | ||
|
||
STATIC_URL = '/static/' | ||
X_FRAME_OPTIONS = 'DENY' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
urlpatterns = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
""" | ||
WSGI config for ocfweb project. | ||
It exposes the WSGI callable as a module-level variable named ``application``. | ||
For more information on this file, see | ||
https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/ | ||
""" | ||
import os | ||
|
||
from django.core.wsgi import get_wsgi_application | ||
|
||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'ocfweb.settings') | ||
application = get_wsgi_application() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
colorama==0.3.3 | ||
cracklib==2.9.3 | ||
Django==1.8.4 | ||
dnspython3==1.12.0 | ||
ecdsa==0.13 | ||
ldap3==0.9.8.8 | ||
libsass==0.8.3 | ||
ocflib | ||
ocfweb==1.0.0 | ||
paramiko==1.15.2 | ||
pexpect==3.2 | ||
pyasn1==0.1.8 | ||
pycrypto==2.6.1 | ||
PyMySQL==0.6.6 | ||
pysnmp==4.2.5 | ||
redis==2.10.3 | ||
requests==2.7.0 | ||
six==1.9.0 | ||
SQLAlchemy==1.0.8 | ||
wheel==0.24.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
from setuptools import find_packages | ||
from setuptools import setup | ||
|
||
setup( | ||
name='ocfweb', | ||
version='1.0.0', | ||
packages=find_packages(), | ||
include_package_data=True, | ||
url='https://www.ocf.berkeley.edu/', | ||
author='Open Computing Facility', | ||
author_email='help@ocf.berkeley.edu', | ||
install_requires=[ | ||
'django>=1.8,<1.8.999', | ||
'libsass', | ||
'ocflib', | ||
], | ||
sass_manifests={ | ||
'ocfweb': ('static/scss'), | ||
}, | ||
) |