Commit 0a4236ffbd335ae62a5b10a060624a75d58b4ff0

Authored by Alexandre Barbosa
1 parent a6ea3966
Exists in master and in 79 other branches add_sisp_to_chef, add_super_archives_plugin, api_for_colab, automates_core_packing, backup_not_prod, changes_in_buttons_on_content_panel, colab_automated_login, colab_spb_plugin_recipe, colab_widgets_settings, design_validation, dev_env_minimal, disable_email_dev, fix_breadcrumbs_position, fix_categories_software_link, fix_edit_institution, fix_edit_software_with_another_license, fix_get_license_info, fix_gitlab_assets_permission, fix_list_style_inside_article, fix_list_style_on_folder_elements, fix_members_pagination, fix_merge_request_url, fix_models_translations, fix_no_license, fix_software_api, fix_software_block_migration, fix_software_communities_translations, fix_software_communities_unit_test, fix_style_create_institution_admin_panel, fix_superarchives_imports, fix_sym_links_noosfero, focus_search_field_theme, gov-user-refactoring, gov-user-refactoring-rails4, header_fix, institution_modal_on_rating, kalibro-conf-refactoring, kalibro-processor-package, lxc_settings, margin_fix, mezuro_cookbook, prezento, refactor_download_block, refactor_software_communities, refactor_software_for_sisp, register_page, release-process, release-process-v2, remove-unused-images, remove_broken_theme, remove_secondary_email_from_user, remove_sisp_buttons, removing_super_archives_email, review_message, scope2method, signals_user_noosfero, sisp_catalog_header, sisp_colab_config, sisp_dev, sisp_dev_master, sisp_simple_version, software_as_organization, software_catalog_style_fix, software_communities_html_refactor, software_infos_api, spb_minimal_env, spb_to_rails4, spec_refactor, stable-4.1, stable-4.2, stable-4.x, temp_soft_comm_refactoring, theme_header, theme_javascript_refactory, thread_dropdown, thread_page, update_search_by_categories, update_software_api, update_softwares_boxes

Fix flake8

Signed-off-by: Alexandre Barbosa <alexandreab@live.com>
Signed-off-by: Macartur Sousa <macartur.sc@gmail.com>
@@ -61,15 +61,15 @@ To run Colab with development server you will have to: @@ -61,15 +61,15 @@ To run Colab with development server you will have to:
61 .. code-block:: 61 .. code-block::
62 62
63 colab-init-config > /etc/colab/settings.py 63 colab-init-config > /etc/colab/settings.py
64 - 64 +
65 2- Edit the configuration file. Make sure you set everything you need including **database** credentials. 65 2- Edit the configuration file. Make sure you set everything you need including **database** credentials.
66 -  
67 -3- Run the development server: 66 +
  67 +3- Run the development server:
68 68
69 .. code-block:: 69 .. code-block::
70 70
71 colab-admin runserver 0.0.0.0:8000 71 colab-admin runserver 0.0.0.0:8000
72 72
73 73
74 -**NOTE**: In case you want to keep the configuration file else where just set the 74 +**NOTE**: In case you want to keep the configuration file else where just set the
75 desired location in environment variable **COLAB_SETTINGS**. 75 desired location in environment variable **COLAB_SETTINGS**.
colab_spb/admin.py
1 -from django.contrib import admin 1 +# from django.contrib import admin
2 2
3 # Register your models here. 3 # Register your models here.
colab_spb/models.py
1 -from django.db import models 1 +# from django.db import models
2 2
3 # Create your models here. 3 # Create your models here.
colab_spb/views.py
1 -from django.shortcuts import render 1 +# from django.shortcuts import render
2 2
3 # Create your views here. 3 # Create your views here.
@@ -9,6 +9,7 @@ from setuptools import setup @@ -9,6 +9,7 @@ from setuptools import setup
9 if os.environ.get('USER', '') == 'vagrant': 9 if os.environ.get('USER', '') == 'vagrant':
10 del os.link 10 del os.link
11 11
  12 +
12 def read(*parts): 13 def read(*parts):
13 return codecs.open(os.path.join(os.path.dirname(__file__), *parts), 14 return codecs.open(os.path.join(os.path.dirname(__file__), *parts),
14 encoding='utf8').read() 15 encoding='utf8').read()
@@ -24,7 +25,7 @@ def find_version(*file_paths): @@ -24,7 +25,7 @@ def find_version(*file_paths):
24 25
25 26
26 setup( 27 setup(
27 - name='colab-spb', 28 + name='colab_spb',
28 url='https://github.com/colab/colab-spb', 29 url='https://github.com/colab/colab-spb',
29 description='Yet another Django reverse proxy application.', 30 description='Yet another Django reverse proxy application.',
30 version=find_version('colab_spb/__init__.py'), 31 version=find_version('colab_spb/__init__.py'),
@@ -35,9 +36,9 @@ setup( @@ -35,9 +36,9 @@ setup(
35 ], 36 ],
36 tests_require=['mock'], 37 tests_require=['mock'],
37 test_suite="tests.run.runtests", 38 test_suite="tests.run.runtests",
38 - author='Sergio Oliveira',  
39 - author_email='sergio@tracy.com.br',  
40 - license='GPL 2.0', 39 + author='Macartur Sousa',
  40 + author_email='macartur.sc@gmail.com',
  41 + license='GPL 3.0',
41 classifiers=[ 42 classifiers=[
42 'Development Status :: 3 - Alpha', 43 'Development Status :: 3 - Alpha',
43 'Environment :: Web Environment', 44 'Environment :: Web Environment',
tests/config_settings.py
1 SECRET_KEY = 'ddddddddddddddddddddddddddddddddddddddddddddddddddddddaddddddddd' 1 SECRET_KEY = 'ddddddddddddddddddddddddddddddddddddddddddddddddddddddaddddddddd'
2 2
3 -DATABASES = {  
4 - 'default': {  
5 - 'ENGINE': 'django.db.backends.sqlite3',  
6 - 'NAME': 'colab.sqlite',  
7 - } 3 +DATABASES = {
  4 + 'default': {
  5 + 'ENGINE': 'django.db.backends.sqlite3',
  6 + 'NAME': 'colab.sqlite',
  7 + }
8 } 8 }
9 -  
tests/plugins.d/gitlab.py
@@ -1,12 +0,0 @@ @@ -1,12 +0,0 @@
1 -from django.utils.translation import ugettext_lazy as _  
2 -from colab.plugins.utils.menu import colab_url_factory  
3 -  
4 -name = 'colab_spb'  
5 -verbose_name = 'Spb plugin'  
6 -  
7 -urls = {  
8 - 'include': 'colab_spb.urls',  
9 - 'namespace': 'spb',  
10 - 'prefix': 'spb',  
11 -}  
12 -  
tests/plugins.d/spb.py 0 → 100644
@@ -0,0 +1,12 @@ @@ -0,0 +1,12 @@
  1 +from colab.plugins.utils.menu import colab_url_factory
  2 +
  3 +name = 'colab_spb'
  4 +verbose_name = 'Spb plugin'
  5 +
  6 +urls = {
  7 + 'include': 'colab_spb.urls',
  8 + 'namespace': 'spb',
  9 + 'prefix': 'spb',
  10 +}
  11 +
  12 +url = colab_url_factory("spb")
tests/settings.py
@@ -29,11 +29,9 @@ LOGGING = { @@ -29,11 +29,9 @@ LOGGING = {
29 }, 29 },
30 } 30 }
31 31
32 -import os  
33 HAYSTACK_CONNECTIONS = { 32 HAYSTACK_CONNECTIONS = {
34 'default': { 33 'default': {
35 - 'ENGINE': 'haystack.backends.solr_backend.SolrEngine', 34 + 'ENGINE': 'haystack.backends.solr_backend.SolrEngine',
36 'URL': 'http://127.0.0.1:8983/solr' 35 'URL': 'http://127.0.0.1:8983/solr'
37 }, 36 },
38 } 37 }
39 -