Commits

Viorel Stirbu committed cb7914b

Revert "Merge branch 'settings'"

This reverts commit 36b24c409df31ef19f009c7a41d11122d79d1061, reversing
changes made to 072d1b0f825966edb43dff34aadb050d9676cd45.

  • Participants
  • Parent commits 36b24c4

Comments (0)

Files changed (8)

File atexpc/atex_web/models.py

 from django.template.defaultfilters import slugify
 from sorl.thumbnail import ImageField
 from dropbox import rest, session, client
-import dbsettings
 
 from atexpc.ancora_api.api import Ancora, AncoraAdapter
 
 logger = logging.getLogger(__name__)
 
 
-class SiteOptions(dbsettings.Group):
-    ancora_server = dbsettings.StringValue('Ancora server address (or IP)',
-                                           default='ancora.atexpc.ro')
-options = SiteOptions()
-
-
 class AncoraMixin(object):
     def __init__(self, *args, **kwargs):
         super(AncoraMixin, self).__init__(*args, **kwargs)
-        ancora_server = options.ancora_server
-        ancora_url = "http://%s:8765/ancoraerp/jis.serv?database=atex" % ancora_server
-        self._ancora = Ancora(adapter=AncoraAdapter(ancora_url))
-
+        self._ancora = Ancora(adapter=AncoraAdapter(settings.ANCORA_URI))
 
 class Categories(AncoraMixin):
     def get_all(self):

File atexpc/config/dev.py

 #    'storages',
     'sorl.thumbnail',
     'debug_toolbar',
-    'dbsettings',
     'atexpc.atex_web',
 )
 

File atexpc/config/production.py

     'south',
     'storages',
     'sorl.thumbnail',
-    'dbsettings',
     'atexpc.atex_web',
 )
 

File atexpc/config/staging.py

     'storages',
     'sorl.thumbnail',
     'debug_toolbar',
-    'dbsettings',
     'atexpc.atex_web',
 )
 

File atexpc/settings.py

 
 PROJECT_ROOT = os.path.dirname(os.path.realpath(__file__))
 
+ANCORA_URI = os.environ.get('ANCORA_URI')
+
 DROPBOX_APP_KEY = os.environ.get('DROPBOX_APP_KEY')
 DROPBOX_APP_SECRET = os.environ.get('DROPBOX_APP_SECRET')
 DROPBOX_ACCESS_TYPE = os.environ.get('DROPBOX_ACCESS_TYPE', 'dropbox')

File atexpc/templates/admin/base_site.html

 {% block title %}{{ title }} | ATEX{% endblock %}
 
 {% block branding %}
-<h1 id="site-name"><a href="/">ATEX</a> <a href="/admin">{% trans 'administration' %}</a> & <a href="/settings">settings</a></h1>
+<h1 id="site-name"><a href="/">ATEX</a> <a href="/admin">{% trans 'administration' %}</a></h1>
 {% endblock %}

File atexpc/urls.py

 
     # Uncomment the next line to enable the admin:
     url(r'^admin/', include(admin.site.urls)),
-
-    # dbsettings
-    url(r'^settings/', include('dbsettings.urls')),
 )
 
 handler404 = ErrorView.as_view(error_code=404)

File requirements/common.txt

 PIL==1.1.7
 dropbox==1.4.0
 django-compressor==1.2
-git+git://github.com/zlorf/django-dbsettings.git@2dae0fe7f7