.. toctree:: :maxdepth: 2 <>
This file contains hidden or 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
| app: | |
| ifeq ("$(APP_NAME)", "") | |
| @echo "A APP_NAME parameter is mandatory. Usage:" | |
| @echo " make app APP_NAME=mainApp" | |
| else | |
| @cd $(PROJECT_ROOT) && echo "from cookiecutter.main import cookiecutter; cookiecutter('$(HERE)/ns-eggs/django-app', no_input=True, extra_context={'project_name': '{{cookiecutter.projectname|replace("-", "_")}}', 'app_name': '$(APP_NAME)',})" | $(PYTHON2) | |
| ln -f -snv $(HERE)/parts/node/lib/node_modules $(HERE)/src_py/{{cookiecutter.projectname|replace("-", "_")}}/$(APP_NAME)/static/$(APP_NAME)/node_modules | |
| endif |
This file contains hidden or 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
| class AppView(View): | |
| template_name = "conference/page.html" | |
| def common(self, request): | |
| # Rendue de la vue | |
| return render(request, self.template_name, self._context) | |
| def get_default_context(self): | |
| default_context = {} | |
| default_context.setdefault('version_package', conference.__version__) |
This file contains hidden or 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
| <style type="text/css"> | |
| @media all and (-ms-high-contrast: none), (-ms-high-contrast: active) { | |
| /* If IE10+ */ | |
| #typeahead-quicksearch{ | |
| line-height: 0.5em; | |
| } | |
| } | |
| </style> |
This file contains hidden or 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
| """ | |
| Do not forget to add the following in setup.py : | |
| entry_points={ | |
| 'console_scripts': [ | |
| 'platform-ott = deploy_platform_ott.main:main.start', | |
| ], | |
| }, | |
| """ |
This file contains hidden or 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
| # -*- coding: utf-8 -*- | |
| from __future__ import unicode_literals, absolute_import, print_function |
This file contains hidden or 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
| # -*- coding: utf-8 -*- | |
| from __future__ import unicode_literals, absolute_import, print_function | |
| import unittest | |
| class TestSuite(unittest.TestCase): | |
| def setUp(self): | |
| pass | |
| def tearDown(self): |
This file contains hidden or 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
| find . -regex '\./NAME' -type f -print0 | xargs -0 -n1 -P3 bzip2 --fast |
This file contains hidden or 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
| import pymysql | |
| pymysql.install_as_MySQLdb() |
This file contains hidden or 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
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| import argparse | |
| import logging | |
| def set_log_level(log_level): | |
| logging.basicConfig(format='%(levelname)s:%(message)s', level=log_level) | |
| logging.info("Log level set to:%s" % log_level) |