Initial commit

This commit is contained in:
Andrey Golovizin 2020-01-19 15:58:54 +01:00
commit 02ad5fed3d
17 changed files with 1232 additions and 0 deletions

18
.envrc Normal file
View file

@ -0,0 +1,18 @@
VIRTUAL_ENV="$PWD/venv"
if type lorri &>/dev/null; then
# https://github.com/target/lorri
eval "$(lorri direnv)"
else
# fall back to using direnv's builtin nix support
use nix
fi
if [ ! -e venv ]
then
python -m venv "${VIRTUAL_ENV}"
fi
export VIRTUAL_ENV
PATH_add "$VIRTUAL_ENV/bin"
unset SSL_CERT_FILE
unset NIX_SSL_CERT_FILE

3
.gitignore vendored Normal file
View file

@ -0,0 +1,3 @@
/media
/project.db
__pycache__

21
manage.py Executable file
View file

@ -0,0 +1,21 @@
#!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'mysite.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ImportError(
"Couldn't import Django. Are you sure it's installed and "
"available on your PYTHONPATH environment variable? Did you "
"forget to activate a virtual environment?"
) from exc
execute_from_command_line(sys.argv)
if __name__ == '__main__':
main()

0
mysite/__init__.py Normal file
View file

239
mysite/settings.py Normal file
View file

@ -0,0 +1,239 @@
import os # isort:skip
gettext = lambda s: s
DATA_DIR = os.path.dirname(os.path.dirname(__file__))
"""
Django settings for mysite project.
Generated by 'django-admin startproject' using Django 2.2.9.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/ref/settings/
"""
import os
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/2.2/howto/deployment/checklist/
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = '15-d*6bl(@+jfo92@=67vi1ohx%3e&^l98*bo*v$$+ms%!l(!!'
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
ALLOWED_HOSTS = []
# Application definition
ROOT_URLCONF = 'mysite.urls'
WSGI_APPLICATION = 'mysite.wsgi.application'
# Database
# https://docs.djangoproject.com/en/2.2/ref/settings/#databases
# Password validation
# https://docs.djangoproject.com/en/2.2/ref/settings/#auth-password-validators
AUTH_PASSWORD_VALIDATORS = [
{
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
},
]
# Internationalization
# https://docs.djangoproject.com/en/2.2/topics/i18n/
LANGUAGE_CODE = 'ru'
TIME_ZONE = 'Europe/Prague'
USE_I18N = True
USE_L10N = True
USE_TZ = True
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/2.2/howto/static-files/
STATIC_URL = '/static/'
MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(DATA_DIR, 'media')
STATIC_ROOT = os.path.join(DATA_DIR, 'static')
STATICFILES_DIRS = (
os.path.join(BASE_DIR, 'mysite', 'static'),
)
SITE_ID = 1
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [os.path.join(BASE_DIR, 'mysite', 'templates'),],
'OPTIONS': {
'context_processors': [
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
'django.template.context_processors.i18n',
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.template.context_processors.media',
'django.template.context_processors.csrf',
'django.template.context_processors.tz',
'sekizai.context_processors.sekizai',
'django.template.context_processors.static',
'cms.context_processors.cms_settings'
],
'loaders': [
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader'
],
},
},
]
MIDDLEWARE = [
'cms.middleware.utils.ApphookReloadMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.locale.LocaleMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'cms.middleware.user.CurrentUserMiddleware',
'cms.middleware.page.CurrentPageMiddleware',
'cms.middleware.toolbar.ToolbarMiddleware',
'cms.middleware.language.LanguageCookieMiddleware'
]
INSTALLED_APPS = [
'djangocms_admin_style',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.admin',
'django.contrib.sites',
'django.contrib.sitemaps',
'django.contrib.staticfiles',
'django.contrib.messages',
'cms',
'menus',
'sekizai',
'treebeard',
'djangocms_text_ckeditor',
'filer',
'easy_thumbnails',
# 'djangocms_bootstrap4',
# 'djangocms_bootstrap4.contrib.bootstrap4_alerts',
# 'djangocms_bootstrap4.contrib.bootstrap4_badge',
# 'djangocms_bootstrap4.contrib.bootstrap4_card',
# 'djangocms_bootstrap4.contrib.bootstrap4_carousel',
# 'djangocms_bootstrap4.contrib.bootstrap4_collapse',
# 'djangocms_bootstrap4.contrib.bootstrap4_content',
# 'djangocms_bootstrap4.contrib.bootstrap4_grid',
# 'djangocms_bootstrap4.contrib.bootstrap4_jumbotron',
# 'djangocms_bootstrap4.contrib.bootstrap4_link',
# 'djangocms_bootstrap4.contrib.bootstrap4_listgroup',
# 'djangocms_bootstrap4.contrib.bootstrap4_media',
# 'djangocms_bootstrap4.contrib.bootstrap4_picture',
# 'djangocms_bootstrap4.contrib.bootstrap4_tabs',
# 'djangocms_bootstrap4.contrib.bootstrap4_utilities',
'djangocms_file',
'djangocms_icon',
'djangocms_link',
'djangocms_picture',
'djangocms_style',
'djangocms_snippet',
'djangocms_googlemap',
'djangocms_video',
'mysite'
]
LANGUAGES = (
## Customize this
('ru', gettext('ru')),
)
CMS_LANGUAGES = {
## Customize this
1: [
{
'code': 'ru',
'name': gettext('ru'),
'redirect_on_fallback': True,
'public': True,
'hide_untranslated': False,
},
],
'default': {
'redirect_on_fallback': True,
'public': True,
'hide_untranslated': False,
},
}
CMS_TEMPLATES = (
## Customize this
('fullwidth.html', 'Fullwidth'),
('sidebar_left.html', 'Sidebar Left'),
('sidebar_right.html', 'Sidebar Right')
)
CMS_PERMISSION = True
CMS_PLACEHOLDER_CONF = {}
DATABASES = {
'default': {
'CONN_MAX_AGE': 0,
'ENGINE': 'django.db.backends.sqlite3',
'HOST': 'localhost',
'NAME': 'project.db',
'PASSWORD': '',
'PORT': '',
'USER': ''
}
}
THUMBNAIL_PROCESSORS = (
'easy_thumbnails.processors.colorspace',
'easy_thumbnails.processors.autocrop',
'filer.thumbnail_processors.scale_and_crop_with_subject_location',
'easy_thumbnails.processors.filters'
)
DJANGOCMS_PICTURE_RESPONSIVE_IMAGES = True
DJANGOCMS_PICTURE_RESPONSIVE_IMAGES_VIEWPORT_BREAKPOINTS = [300, 400, 576, 768]

71
mysite/static/style.css Normal file
View file

@ -0,0 +1,71 @@
/* [ON BIG SCREEN] */
/* Wrapper */
#page-nav {
/* width: 100%; */
background: #ff0;
padding: 3px;
border-radius: 10px;
border: 1px solid #ee0;
display: block;
/* If you want the navigation bar to stick on top
position: sticky;
top: 0;
*/
}
/* Hide Hamburger */
#page-nav label, #hamburger {
display: none;
}
/* Menu Items */
#page-nav ul {
list-style-type: none;
margin: 0;
padding: 0;
}
#page-nav ul li {
display: inline-block;
padding: 10px;
box-sizing: border-box;
}
#page-nav ul li a {
/* color: #fff; */
text-decoration: none;
}
/* [ON SMALL SCREENS] */
@media screen and (max-width: 768px){
/* Show Hamburger */
#page-nav label {
display: inline-block;
/* color: #fff; */
/* background: #a02620; */
font-style: normal;
font-size: 1.2em;
padding: 10px;
}
/* Break down menu items into vertical */
#page-nav ul li {
display: block;
}
#page-nav ul li {
border-top: 1px solid #333;
}
/* Toggle show/hide menu on checkbox click */
#page-nav ul {
display: none;
}
#page-nav input:checked ~ ul {
display: block;
}
}
/* [DOES NOT MATTER] */
html, body {
padding: 0;
margin: 0;
font-family: arial, sans-serif;
}

View file

@ -0,0 +1,48 @@
{% load cms_tags menu_tags sekizai_tags %}
<!doctype html>
<html>
<head>
<title>{% block title %}This is my new project home page{% endblock title %}</title>
<meta name="viewport" content="width=device-width,initial-scale=1">
<link href="/static/style.css" rel="stylesheet">
<style type="text/css">
.nav {
padding-left: 0;
}
.nav li {
display: inline;
list-style-type: none;
padding-right: 20px;
}
.container {
max-width: 940px;
margin: 0 auto
}
.content {
float: left;
width: 80%;
}
.sidebar {
float: left;
width: 20%;
}
</style>
{% render_block "css" %}
</head>
<body>
{% cms_toolbar %}
<div class="container">
<h1>{% page_attribute "page_title" %}</h1>
<nav id="page-nav">
<label for="hamburger">&#9776;</label>
<input type="checkbox" id="hamburger"/>
<ul class="nav">
{% show_menu 0 100 100 100 %}
</ul>
</nav>
{% block content %}{% endblock content %}
</div>
{% render_block "js" %}
</body>
</html>

View file

@ -0,0 +1,8 @@
{% extends "base.html" %}
{% load cms_tags %}
{% block title %}{% page_attribute "page_title" %}{% endblock title %}
{% block content %}
{% placeholder "content" %}
{% endblock content %}

View file

@ -0,0 +1,13 @@
{% extends "base.html" %}
{% load cms_tags %}
{% block title %}{% page_attribute "page_title" %}{% endblock title %}
{% block content %}
<div class="sidebar">
{% placeholder "sidebar" %}
</div>
<div class="content">
{% placeholder "content" %}
</div>
{% endblock content %}

View file

@ -0,0 +1,13 @@
{% extends "base.html" %}
{% load cms_tags %}
{% block title %}{% page_attribute "page_title" %}{% endblock title %}
{% block content %}
<div class="content">
{% placeholder "content" %}
</div>
<div class="sidebar">
{% placeholder "sidebar" %}
</div>
{% endblock content %}

29
mysite/urls.py Normal file
View file

@ -0,0 +1,29 @@
# -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function, unicode_literals
from cms.sitemaps import CMSSitemap
from django.conf import settings
from django.conf.urls import include, url
from django.contrib import admin
from django.contrib.sitemaps.views import sitemap
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.views.static import serve
admin.autodiscover()
urlpatterns = [
url(r'^sitemap\.xml$', sitemap,
{'sitemaps': {'cmspages': CMSSitemap}}),
]
urlpatterns += [
url(r'^admin/', admin.site.urls), # NOQA
url(r'^', include('cms.urls')),
]
# This is only needed when using runserver.
if settings.DEBUG:
urlpatterns = [
url(r'^media/(?P<path>.*)$', serve,
{'document_root': settings.MEDIA_ROOT, 'show_indexes': True}),
] + staticfiles_urlpatterns() + urlpatterns

16
mysite/wsgi.py Normal file
View file

@ -0,0 +1,16 @@
"""
WSGI config for mysite 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/2.2/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'mysite.settings')
application = get_wsgi_application()

685
requirements.nix Normal file
View file

@ -0,0 +1,685 @@
# generated using pypi2nix tool (version: 2.0.3)
# See more at: https://github.com/nix-community/pypi2nix
#
# COMMAND:
# pypi2nix -v -E pkg-config -E freetype -E libjpeg -E zlib -r requirements.txt
#
{ pkgs ? import <nixpkgs> {},
overrides ? ({ pkgs, python }: self: super: {})
}:
let
inherit (pkgs) makeWrapper;
inherit (pkgs.stdenv.lib) fix' extends inNixShell;
pythonPackages =
import "${toString pkgs.path}/pkgs/top-level/python-packages.nix" {
inherit pkgs;
inherit (pkgs) stdenv;
python = pkgs.python3;
};
commonBuildInputs = with pkgs; [ pkg-config freetype libjpeg zlib ];
commonDoCheck = false;
withPackages = pkgs':
let
pkgs = builtins.removeAttrs pkgs' ["__unfix__"];
interpreterWithPackages = selectPkgsFn: pythonPackages.buildPythonPackage {
name = "python3-interpreter";
buildInputs = [ makeWrapper ] ++ (selectPkgsFn pkgs);
buildCommand = ''
mkdir -p $out/bin
ln -s ${pythonPackages.python.interpreter} \
$out/bin/${pythonPackages.python.executable}
for dep in ${builtins.concatStringsSep " "
(selectPkgsFn pkgs)}; do
if [ -d "$dep/bin" ]; then
for prog in "$dep/bin/"*; do
if [ -x "$prog" ] && [ -f "$prog" ]; then
ln -s $prog $out/bin/`basename $prog`
fi
done
fi
done
for prog in "$out/bin/"*; do
wrapProgram "$prog" --prefix PYTHONPATH : "$PYTHONPATH"
done
pushd $out/bin
ln -s ${pythonPackages.python.executable} python
ln -s ${pythonPackages.python.executable} \
python3
popd
'';
passthru.interpreter = pythonPackages.python;
};
interpreter = interpreterWithPackages builtins.attrValues;
in {
__old = pythonPackages;
inherit interpreter;
inherit interpreterWithPackages;
mkDerivation = args: pythonPackages.buildPythonPackage (args // {
nativeBuildInputs = (args.nativeBuildInputs or []) ++ args.buildInputs;
});
packages = pkgs;
overrideDerivation = drv: f:
pythonPackages.buildPythonPackage (
drv.drvAttrs // f drv.drvAttrs // { meta = drv.meta; }
);
withPackages = pkgs'':
withPackages (pkgs // pkgs'');
};
python = withPackages {};
generated = self: {
"django" = python.mkDerivation {
name = "django-2.2.9";
src = pkgs.fetchurl {
url = "https://files.pythonhosted.org/packages/2c/0d/2aa8e58c791d2aa65658fa26f2b035a9da13a6a34d1b2d991912c8a33729/Django-2.2.9.tar.gz";
sha256 = "662a1ff78792e3fd77f16f71b1f31149489434de4b62a74895bd5d6534e635a5";
};
doCheck = commonDoCheck;
format = "setuptools";
buildInputs = commonBuildInputs ++ [ ];
propagatedBuildInputs = [
self."pytz"
self."sqlparse"
];
meta = with pkgs.stdenv.lib; {
homepage = "https://www.djangoproject.com/";
license = licenses.bsdOriginal;
description = "A high-level Python Web framework that encourages rapid development and clean, pragmatic design.";
};
};
"django-classy-tags" = python.mkDerivation {
name = "django-classy-tags-0.9.0";
src = pkgs.fetchurl {
url = "https://files.pythonhosted.org/packages/8b/21/a209e260f863bf6fafa97fa38ec709d552abfcf6edb0b73be6d680b43eb0/django-classy-tags-0.9.0.tar.gz";
sha256 = "38b4546a8053499e2fef7af679a58d7c868298717d645b8b8227acba5fd4bf2b";
};
doCheck = commonDoCheck;
format = "setuptools";
buildInputs = commonBuildInputs ++ [ ];
propagatedBuildInputs = [
self."django"
];
meta = with pkgs.stdenv.lib; {
homepage = "http://github.com/ojii/django-classy-tags";
license = licenses.bsdOriginal;
description = "Class based template tags for Django";
};
};
"django-cms" = python.mkDerivation {
name = "django-cms-3.7.1";
src = pkgs.fetchurl {
url = "https://files.pythonhosted.org/packages/c3/55/bab3217850a3dbed17caf0fac4f9351fc13f25c572534080b7ede78edf5c/django-cms-3.7.1.tar.gz";
sha256 = "05ea915d490562413428e04acb9ecae604c63b8dc5ed9250d0e9437b1314c996";
};
doCheck = commonDoCheck;
format = "setuptools";
buildInputs = commonBuildInputs ++ [ ];
propagatedBuildInputs = [
self."django"
self."django-classy-tags"
self."django-formtools"
self."django-sekizai"
self."django-treebeard"
self."djangocms-admin-style"
];
meta = with pkgs.stdenv.lib; {
homepage = "https://www.django-cms.org/";
license = licenses.bsdOriginal;
description = "An Advanced Django CMS";
};
};
"django-filer" = python.mkDerivation {
name = "django-filer-1.6.0";
src = pkgs.fetchurl {
url = "https://files.pythonhosted.org/packages/b2/3b/544c7de7ae9b2e28f1387974aba3b4385fc06b083c8e6c25c2203afe9255/django-filer-1.6.0.tar.gz";
sha256 = "3f2045cfd9e53c1a29cd8a71747e984faead630ee72baab29d6b3b45584d52e0";
};
doCheck = commonDoCheck;
format = "setuptools";
buildInputs = commonBuildInputs ++ [ ];
propagatedBuildInputs = [
self."django"
self."django-mptt"
self."django-polymorphic"
self."easy-thumbnails"
self."unidecode"
];
meta = with pkgs.stdenv.lib; {
homepage = "http://github.com/divio/django-filer";
license = licenses.bsdOriginal;
description = "A file management application for django that makes handling of files and images a breeze.";
};
};
"django-formtools" = python.mkDerivation {
name = "django-formtools-2.2";
src = pkgs.fetchurl {
url = "https://files.pythonhosted.org/packages/ca/bb/7d8a1bff28bcb9031264dfc0e5cb288d369a6da5d7827e2f799025f41eb7/django-formtools-2.2.tar.gz";
sha256 = "c5272c03c1cd51b2375abf7397a199a3148a9fbbf2f100e186467a84025d13b2";
};
doCheck = commonDoCheck;
format = "setuptools";
buildInputs = commonBuildInputs ++ [ ];
propagatedBuildInputs = [
self."django"
];
meta = with pkgs.stdenv.lib; {
homepage = "https://django-formtools.readthedocs.io/en/latest/";
license = licenses.bsdOriginal;
description = "A set of high-level abstractions for Django forms";
};
};
"django-js-asset" = python.mkDerivation {
name = "django-js-asset-1.2.2";
src = pkgs.fetchurl {
url = "https://files.pythonhosted.org/packages/81/d9/bbb15cf960142220a7a5ca38f2cbddd3ef6ad19f9efc6024670d44b43968/django-js-asset-1.2.2.tar.gz";
sha256 = "c163ae80d2e0b22d8fb598047cd0dcef31f81830e127cfecae278ad574167260";
};
doCheck = commonDoCheck;
format = "setuptools";
buildInputs = commonBuildInputs ++ [ ];
propagatedBuildInputs = [ ];
meta = with pkgs.stdenv.lib; {
homepage = "https://github.com/matthiask/django-js-asset/";
license = licenses.bsdOriginal;
description = "script tag with additional attributes for django.forms.Media";
};
};
"django-mptt" = python.mkDerivation {
name = "django-mptt-0.11.0";
src = pkgs.fetchurl {
url = "https://files.pythonhosted.org/packages/82/da/cab516755870d0fbe7b67fc879636f392cf413b594f815f06a538e89c50e/django-mptt-0.11.0.tar.gz";
sha256 = "dfdb3af75ad27cdd4458b0544ec8574174f2b90f99bc2cafab6a15b4bc1895a8";
};
doCheck = commonDoCheck;
format = "setuptools";
buildInputs = commonBuildInputs ++ [ ];
propagatedBuildInputs = [
self."django"
self."django-js-asset"
];
meta = with pkgs.stdenv.lib; {
homepage = "https://github.com/django-mptt/django-mptt";
license = licenses.mit;
description = "Utilities for implementing Modified Preorder Tree Traversal with your Django Models and working with trees of Model instances.";
};
};
"django-polymorphic" = python.mkDerivation {
name = "django-polymorphic-2.0.3";
src = pkgs.fetchurl {
url = "https://files.pythonhosted.org/packages/ae/d6/bebbc990b5856c36603cd0d635e93137fdf67ec04386ac1bdc87707f9613/django-polymorphic-2.0.3.tar.gz";
sha256 = "1fb5505537bcaf71cfc951ff94c4e3ba83c761eaca04b7b2ce9cb63937634ea5";
};
doCheck = commonDoCheck;
format = "setuptools";
buildInputs = commonBuildInputs ++ [ ];
propagatedBuildInputs = [
self."django"
];
meta = with pkgs.stdenv.lib; {
homepage = "https://github.com/django-polymorphic/django-polymorphic";
license = licenses.bsdOriginal;
description = "Seamless polymorphic inheritance for Django models";
};
};
"django-sekizai" = python.mkDerivation {
name = "django-sekizai-1.0.0";
src = pkgs.fetchurl {
url = "https://files.pythonhosted.org/packages/61/7c/a170ca36c4ea4c7c228b379df3da9a2dbec4c28ae3d7149c44990512cb0d/django-sekizai-1.0.0.tar.gz";
sha256 = "642a3356fe92fe9b5ccc97f320b64edd2cfcb3b2fbb113e8a26dad9a1f3b5e14";
};
doCheck = commonDoCheck;
format = "setuptools";
buildInputs = commonBuildInputs ++ [ ];
propagatedBuildInputs = [
self."django"
self."django-classy-tags"
];
meta = with pkgs.stdenv.lib; {
homepage = "http://github.com/ojii/django-sekizai";
license = licenses.bsdOriginal;
description = "Django Sekizai";
};
};
"django-treebeard" = python.mkDerivation {
name = "django-treebeard-4.3.1";
src = pkgs.fetchurl {
url = "https://files.pythonhosted.org/packages/d0/6a/8ddd748a364230a481512160286c1ea8e50c345ba2422af0a349ac8601d5/django-treebeard-4.3.1.tar.gz";
sha256 = "83aebc34a9f06de7daaec330d858d1c47887e81be3da77e3541fe7368196dd8a";
};
doCheck = commonDoCheck;
format = "setuptools";
buildInputs = commonBuildInputs ++ [ ];
propagatedBuildInputs = [
self."django"
];
meta = with pkgs.stdenv.lib; {
homepage = "https://github.com/django-treebeard/django-treebeard/";
license = licenses.asl20;
description = "Efficient tree implementations for Django";
};
};
"djangocms-admin-style" = python.mkDerivation {
name = "djangocms-admin-style-1.4.0";
src = pkgs.fetchurl {
url = "https://files.pythonhosted.org/packages/43/4a/85121924727ee789e9f0d4a434e0a8a45db4a9d47d411a4000f77154f73b/djangocms-admin-style-1.4.0.tar.gz";
sha256 = "0ff3f45ed56e98c92fcabf219377f4165ab20a4cb2d018c1da461b6b85179177";
};
doCheck = commonDoCheck;
format = "setuptools";
buildInputs = commonBuildInputs ++ [ ];
propagatedBuildInputs = [ ];
meta = with pkgs.stdenv.lib; {
homepage = "https://github.com/divio/djangocms-admin-style";
license = licenses.bsdOriginal;
description = "Adds pretty CSS styles for the django CMS admin interface.";
};
};
"djangocms-attributes-field" = python.mkDerivation {
name = "djangocms-attributes-field-1.1.0";
src = pkgs.fetchurl {
url = "https://files.pythonhosted.org/packages/71/b5/c148882ed9a1a6e8217363cbebab46c50a08e2a2d4b946ad60643d0ea3a9/djangocms-attributes-field-1.1.0.tar.gz";
sha256 = "824368e29a7a48a338e98e312fd45f2fe1917092919082f0a48215507bdcf3bd";
};
doCheck = commonDoCheck;
format = "setuptools";
buildInputs = commonBuildInputs ++ [ ];
propagatedBuildInputs = [
self."django-cms"
];
meta = with pkgs.stdenv.lib; {
homepage = "https://github.com/divio/djangocms-attributes-field/";
license = licenses.bsdOriginal;
description = "Adds attributes to Django models.";
};
};
"djangocms-bootstrap4" = python.mkDerivation {
name = "djangocms-bootstrap4-1.5.0";
src = pkgs.fetchurl {
url = "https://files.pythonhosted.org/packages/33/b6/a18f7b25ce993e5302a8b7326926071b06c4a7135e2e173a5a856d0303ad/djangocms-bootstrap4-1.5.0.tar.gz";
sha256 = "4db97893a4a69a4d5a4bf5623b0d1e489f4b42e704ab58537f7ff38f0856f209";
};
doCheck = commonDoCheck;
format = "setuptools";
buildInputs = commonBuildInputs ++ [ ];
propagatedBuildInputs = [
self."django-cms"
self."django-filer"
self."djangocms-attributes-field"
self."djangocms-icon"
self."djangocms-link"
self."djangocms-picture"
self."djangocms-text-ckeditor"
];
meta = with pkgs.stdenv.lib; {
homepage = "https://github.com/divio/djangocms-bootstrap4";
license = licenses.bsdOriginal;
description = "Adds Bootstrap 4 components as plugins.";
};
};
"djangocms-file" = python.mkDerivation {
name = "djangocms-file-2.3.0";
src = pkgs.fetchurl {
url = "https://files.pythonhosted.org/packages/52/26/990e49388449ee55e857bc7709fd4f51fbc30872a2bde2fd4d90a1a5c3da/djangocms-file-2.3.0.tar.gz";
sha256 = "6fd29e9b8355bb44b3c57bbed30218308a8da80695d5cf9d4c3a669e43e6360e";
};
doCheck = commonDoCheck;
format = "setuptools";
buildInputs = commonBuildInputs ++ [ ];
propagatedBuildInputs = [
self."django-cms"
self."django-filer"
self."djangocms-attributes-field"
];
meta = with pkgs.stdenv.lib; {
homepage = "https://github.com/divio/djangocms-file";
license = licenses.bsdOriginal;
description = "Adds file plugin to django CMS";
};
};
"djangocms-googlemap" = python.mkDerivation {
name = "djangocms-googlemap-1.3.0";
src = pkgs.fetchurl {
url = "https://files.pythonhosted.org/packages/3d/a1/60438b3e47a622b7685bd86c273ff2c7632508f9736b9da882297220db05/djangocms-googlemap-1.3.0.tar.gz";
sha256 = "430437dfeafe81bd2c11c7a66291cb1fb19a9e8a096e993c3350adbe4c725dc8";
};
doCheck = commonDoCheck;
format = "setuptools";
buildInputs = commonBuildInputs ++ [ ];
propagatedBuildInputs = [
self."django-cms"
self."django-filer"
];
meta = with pkgs.stdenv.lib; {
homepage = "https://github.com/divio/djangocms-googlemap";
license = licenses.bsdOriginal;
description = "Adds Google Maps plugins to django CMS.";
};
};
"djangocms-icon" = python.mkDerivation {
name = "djangocms-icon-1.4.2";
src = pkgs.fetchurl {
url = "https://files.pythonhosted.org/packages/f0/1f/5bb9ef17c3df4162766efd539e7e555809422ec5db8167b3bc7b96d8bd71/djangocms-icon-1.4.2.tar.gz";
sha256 = "3a2303ed9e275da23c744d9c812bd7124d163316113847e0b9608c4a352c3f85";
};
doCheck = commonDoCheck;
format = "setuptools";
buildInputs = commonBuildInputs ++ [ ];
propagatedBuildInputs = [
self."django-cms"
self."djangocms-attributes-field"
];
meta = with pkgs.stdenv.lib; {
homepage = "https://github.com/divio/djangocms-icon";
license = licenses.bsdOriginal;
description = "Adds icon plugin to django CMS.";
};
};
"djangocms-link" = python.mkDerivation {
name = "djangocms-link-2.5.0";
src = pkgs.fetchurl {
url = "https://files.pythonhosted.org/packages/df/7a/ec9cd6410f6a4435ad3d98d1bb7eba8b3249e34189d0c49ceae9ab0df9b9/djangocms-link-2.5.0.tar.gz";
sha256 = "b550bbcf572437e408e1a9b956c7c6e2fd498d868c402424395eea8d40d9cfa0";
};
doCheck = commonDoCheck;
format = "setuptools";
buildInputs = commonBuildInputs ++ [ ];
propagatedBuildInputs = [
self."django-cms"
self."django-filer"
self."djangocms-attributes-field"
];
meta = with pkgs.stdenv.lib; {
homepage = "https://github.com/divio/djangocms-link";
license = licenses.bsdOriginal;
description = "Adds a link plugin to django CMS";
};
};
"djangocms-picture" = python.mkDerivation {
name = "djangocms-picture-2.3.0";
src = pkgs.fetchurl {
url = "https://files.pythonhosted.org/packages/be/e3/051570d630af8172675c699d1f438e7cb5da661fae883000586530a30b28/djangocms-picture-2.3.0.tar.gz";
sha256 = "0f38222cc9a122471b104604b265d359f01a17e30f89eeddb1e6ae70ba06cd78";
};
doCheck = commonDoCheck;
format = "setuptools";
buildInputs = commonBuildInputs ++ [ ];
propagatedBuildInputs = [
self."django-cms"
self."django-filer"
self."djangocms-attributes-field"
self."easy-thumbnails"
];
meta = with pkgs.stdenv.lib; {
homepage = "https://github.com/divio/djangocms-picture";
license = licenses.bsdOriginal;
description = "Adds an image plugin to django CMS";
};
};
"djangocms-snippet" = python.mkDerivation {
name = "djangocms-snippet-2.2.0";
src = pkgs.fetchurl {
url = "https://files.pythonhosted.org/packages/b2/d1/f1270cc183d1654e26d008525c9634227267d002ca449ca8b5d55466706a/djangocms-snippet-2.2.0.tar.gz";
sha256 = "599f06e069dacf9c9f11742a9233c3ccee58a55605124fa1485a62708bd2caea";
};
doCheck = commonDoCheck;
format = "setuptools";
buildInputs = commonBuildInputs ++ [ ];
propagatedBuildInputs = [
self."django-cms"
];
meta = with pkgs.stdenv.lib; {
homepage = "https://github.com/divio/djangocms-snippet";
license = licenses.bsdOriginal;
description = "Adds snippet plugin to django CMS.";
};
};
"djangocms-style" = python.mkDerivation {
name = "djangocms-style-2.2.0";
src = pkgs.fetchurl {
url = "https://files.pythonhosted.org/packages/5d/5c/12de39850b000ee71de489ae75dded6391192413484377bc9f3d0bc46941/djangocms-style-2.2.0.tar.gz";
sha256 = "4841f8e23cfe6a95d9a788f39f00d83f862a56f50cc445060bcf154bfdd471a0";
};
doCheck = commonDoCheck;
format = "setuptools";
buildInputs = commonBuildInputs ++ [ ];
propagatedBuildInputs = [
self."django-cms"
self."djangocms-attributes-field"
];
meta = with pkgs.stdenv.lib; {
homepage = "https://github.com/divio/djangocms-style";
license = licenses.bsdOriginal;
description = "Adds style plugin to django CMS";
};
};
"djangocms-text-ckeditor" = python.mkDerivation {
name = "djangocms-text-ckeditor-3.8.0";
src = pkgs.fetchurl {
url = "https://files.pythonhosted.org/packages/f6/23/7859d1a25c36fe24f2f407ae32c88039856cd4c0a354621c88b8a13d6890/djangocms-text-ckeditor-3.8.0.tar.gz";
sha256 = "0f0291cdf305c469741a639d89c71ee77f29dfc5aada4f7a453d6dc2926ceca9";
};
doCheck = commonDoCheck;
format = "setuptools";
buildInputs = commonBuildInputs ++ [ ];
propagatedBuildInputs = [
self."django-cms"
self."html5lib"
self."pillow"
];
meta = with pkgs.stdenv.lib; {
homepage = "https://github.com/divio/djangocms-text-ckeditor";
license = licenses.bsdOriginal;
description = "Text Plugin for django CMS with CKEditor support";
};
};
"djangocms-video" = python.mkDerivation {
name = "djangocms-video-2.2.0";
src = pkgs.fetchurl {
url = "https://files.pythonhosted.org/packages/4d/9a/31e40b75eae00c8000fa4f74845263af4b9bf02ad3a3b6becef1b60cea9a/djangocms-video-2.2.0.tar.gz";
sha256 = "cf5284fed71c9bfc076bb7dd7abf327e7ebb0cb5349557d1c7b41cc417532ac3";
};
doCheck = commonDoCheck;
format = "setuptools";
buildInputs = commonBuildInputs ++ [ ];
propagatedBuildInputs = [
self."django-cms"
self."django-filer"
self."djangocms-attributes-field"
];
meta = with pkgs.stdenv.lib; {
homepage = "https://github.com/divio/djangocms-video";
license = licenses.bsdOriginal;
description = "Adds video plugin to django CMS";
};
};
"easy-thumbnails" = python.mkDerivation {
name = "easy-thumbnails-2.7";
src = pkgs.fetchurl {
url = "https://files.pythonhosted.org/packages/11/c8/950c50cdf39702d64f5781e6735f539d76044e9461c63fc20a06de324316/easy-thumbnails-2.7.tar.gz";
sha256 = "e4e7a0dd4001f56bfd4058428f2c91eafe27d33ef3b8b33ac4e013b159b9ff91";
};
doCheck = commonDoCheck;
format = "setuptools";
buildInputs = commonBuildInputs ++ [ ];
propagatedBuildInputs = [
self."django"
self."pillow"
];
meta = with pkgs.stdenv.lib; {
homepage = "http://github.com/SmileyChris/easy-thumbnails";
license = licenses.bsdOriginal;
description = "Easy thumbnails for Django";
};
};
"html5lib" = python.mkDerivation {
name = "html5lib-1.0.1";
src = pkgs.fetchurl {
url = "https://files.pythonhosted.org/packages/85/3e/cf449cf1b5004e87510b9368e7a5f1acd8831c2d6691edd3c62a0823f98f/html5lib-1.0.1.tar.gz";
sha256 = "66cb0dcfdbbc4f9c3ba1a63fdb511ffdbd4f513b2b6d81b80cd26ce6b3fb3736";
};
doCheck = commonDoCheck;
format = "setuptools";
buildInputs = commonBuildInputs ++ [ ];
propagatedBuildInputs = [
self."six"
self."webencodings"
];
meta = with pkgs.stdenv.lib; {
homepage = "https://github.com/html5lib/html5lib-python";
license = licenses.mit;
description = "HTML parser based on the WHATWG HTML specification";
};
};
"pillow" = python.mkDerivation {
name = "pillow-7.0.0";
src = pkgs.fetchurl {
url = "https://files.pythonhosted.org/packages/39/47/f28067b187dd664d205f75b07dcc6e0e95703e134008a14814827eebcaab/Pillow-7.0.0.tar.gz";
sha256 = "4d9ed9a64095e031435af120d3c910148067087541131e82b3e8db302f4c8946";
};
doCheck = commonDoCheck;
format = "setuptools";
buildInputs = commonBuildInputs ++ [ ];
propagatedBuildInputs = [ ];
meta = with pkgs.stdenv.lib; {
homepage = "https://python-pillow.org";
license = "HPND";
description = "Python Imaging Library (Fork)";
};
};
"pytz" = python.mkDerivation {
name = "pytz-2019.3";
src = pkgs.fetchurl {
url = "https://files.pythonhosted.org/packages/82/c3/534ddba230bd4fbbd3b7a3d35f3341d014cca213f369a9940925e7e5f691/pytz-2019.3.tar.gz";
sha256 = "b02c06db6cf09c12dd25137e563b31700d3b80fcc4ad23abb7a315f2789819be";
};
doCheck = commonDoCheck;
format = "setuptools";
buildInputs = commonBuildInputs ++ [ ];
propagatedBuildInputs = [ ];
meta = with pkgs.stdenv.lib; {
homepage = "http://pythonhosted.org/pytz";
license = licenses.mit;
description = "World timezone definitions, modern and historical";
};
};
"six" = python.mkDerivation {
name = "six-1.14.0";
src = pkgs.fetchurl {
url = "https://files.pythonhosted.org/packages/21/9f/b251f7f8a76dec1d6651be194dfba8fb8d7781d10ab3987190de8391d08e/six-1.14.0.tar.gz";
sha256 = "236bdbdce46e6e6a3d61a337c0f8b763ca1e8717c03b369e87a7ec7ce1319c0a";
};
doCheck = commonDoCheck;
format = "setuptools";
buildInputs = commonBuildInputs ++ [ ];
propagatedBuildInputs = [ ];
meta = with pkgs.stdenv.lib; {
homepage = "https://github.com/benjaminp/six";
license = licenses.mit;
description = "Python 2 and 3 compatibility utilities";
};
};
"sqlparse" = python.mkDerivation {
name = "sqlparse-0.3.0";
src = pkgs.fetchurl {
url = "https://files.pythonhosted.org/packages/63/c8/229dfd2d18663b375975d953e2bdc06d0eed714f93dcb7732f39e349c438/sqlparse-0.3.0.tar.gz";
sha256 = "7c3dca29c022744e95b547e867cee89f4fce4373f3549ccd8797d8eb52cdb873";
};
doCheck = commonDoCheck;
format = "setuptools";
buildInputs = commonBuildInputs ++ [ ];
propagatedBuildInputs = [ ];
meta = with pkgs.stdenv.lib; {
homepage = "https://github.com/andialbrecht/sqlparse";
license = licenses.bsdOriginal;
description = "Non-validating SQL parser";
};
};
"unidecode" = python.mkDerivation {
name = "unidecode-1.0.23";
src = pkgs.fetchurl {
url = "https://files.pythonhosted.org/packages/9b/d8/c1b658ed7ff6e63a745eda483d7d917eb63a79c59fcb422469b85ff47e94/Unidecode-1.0.23.tar.gz";
sha256 = "8b85354be8fd0c0e10adbf0675f6dc2310e56fda43fa8fe049123b6c475e52fb";
};
doCheck = commonDoCheck;
format = "setuptools";
buildInputs = commonBuildInputs ++ [ ];
propagatedBuildInputs = [ ];
meta = with pkgs.stdenv.lib; {
homepage = "UNKNOWN";
license = licenses.gpl2Plus;
description = "ASCII transliterations of Unicode text";
};
};
"webencodings" = python.mkDerivation {
name = "webencodings-0.5.1";
src = pkgs.fetchurl {
url = "https://files.pythonhosted.org/packages/0b/02/ae6ceac1baeda530866a85075641cec12989bd8d31af6d5ab4a3e8c92f47/webencodings-0.5.1.tar.gz";
sha256 = "b36a1c245f2d304965eb4e0a82848379241dc04b865afcc4aab16748587e1923";
};
doCheck = commonDoCheck;
format = "setuptools";
buildInputs = commonBuildInputs ++ [ ];
propagatedBuildInputs = [ ];
meta = with pkgs.stdenv.lib; {
homepage = "https://github.com/SimonSapin/python-webencodings";
license = licenses.bsdOriginal;
description = "Character encoding aliases for legacy web content";
};
};
};
localOverridesFile = ./requirements_override.nix;
localOverrides = import localOverridesFile { inherit pkgs python; };
commonOverrides = [
(let src = pkgs.fetchFromGitHub { owner = "nix-community"; repo = "pypi2nix-overrides"; rev = "da5a27614ffc963478d8d5caf7c78491e2744750"; sha256 = "10p0l97jjwwi0ld5dpvyn2v2nfxww1sm766131i4363zazzidndm"; } ; in import "${src}/overrides.nix" { inherit pkgs python; })
];
paramOverrides = [
(overrides { inherit pkgs python; })
];
allOverrides =
(if (builtins.pathExists localOverridesFile)
then [localOverrides] else [] ) ++ commonOverrides ++ paramOverrides;
in python.withPackages
(fix' (pkgs.lib.fold
extends
generated
allOverrides
)
)

23
requirements.txt Normal file
View file

@ -0,0 +1,23 @@
django-cms>=3.7,<3.8
djangocms-admin-style>=1.4,<1.5
django-treebeard>=4.0,<5.0
djangocms-text-ckeditor>=3.7,<3.9
djangocms-link>=2.5,<2.6
djangocms-style>=2.2,<2.3
djangocms-googlemap>=1.3,<1.4
djangocms-snippet>=2.2,<2.3
djangocms-video>=2.1,<2.3
djangocms-file>=2.3,<3.0
djangocms-picture>=2.3,<2.4
djangocms-bootstrap4>=1.5,<1.6
easy_thumbnails
django-filer>=1.3
Django<2.3
django-classy-tags>=0.9
django-sekizai>=1.0
django-mptt>0.9
html5lib>=1.0.1
Pillow>=3.0
six
pytz

30
requirements_frozen.txt Normal file
View file

@ -0,0 +1,30 @@
Django==2.2.9
django-classy-tags==0.9.0
django-cms==3.7.1
django-filer==1.6.0
django-formtools==2.2
django-js-asset==1.2.2
django-mptt==0.11.0
django-polymorphic==2.0.3
django-sekizai==1.0.0
django-treebeard==4.3.1
djangocms-admin-style==1.4.0
djangocms-attributes-field==1.1.0
djangocms-bootstrap4==1.5.0
djangocms-file==2.3.0
djangocms-googlemap==1.3.0
djangocms-icon==1.4.2
djangocms-link==2.5.0
djangocms-picture==2.3.0
djangocms-snippet==2.2.0
djangocms-style==2.2.0
djangocms-text-ckeditor==3.8.0
djangocms-video==2.2.0
easy-thumbnails==2.7
html5lib==1.0.1
Pillow==7.0.0
pytz==2019.3
six==1.14.0
sqlparse==0.3.0
Unidecode==1.0.23
webencodings==0.5.1

View file

@ -0,0 +1,5 @@
{ pkgs, python }:
self: super: {
}

10
shell.nix Normal file
View file

@ -0,0 +1,10 @@
let
pkgs = import (builtins.fetchTarball {
# https://nixos.org/channels/nixos-unstable-small
url = https://releases.nixos.org/nixos/unstable-small/nixos-20.03pre209383.a892d9617d3/nixexprs.tar.xz;
# Hash obtained using `nix-prefetch-url --unpack <url>`
sha256 = "0gza1ilnv14jknig235iyd1z0apxhjwrsq93wygd9673fs7f4w5p";
}) {};
python = import ./requirements.nix { inherit pkgs; };
in
python.interpreter