Ejemplo n.º 1
0
def enabled_features(request):
    """Adds a USE_FEATURENAME flags for each enabled feature (see features.py)"""
    # TODO(mikey): this might make it harder to diagnose why features aren't
    # visible/being used.
    ret = {}
    ret['USE_FACEBOOK'] = features.use_facebook()
    return ret
Ejemplo n.º 2
0
def enabled_features(request):
    """Adds a USE_FEATURENAME flags for each enabled feature (see features.py)"""
    # TODO(mikey): this might make it harder to diagnose why features aren't
    # visible/being used.
    ret = {}
    ret['USE_FACEBOOK'] = features.use_facebook()
    return ret
Ejemplo n.º 3
0
def enabled_features(request):
  """Adds a USE_FEATURENAME flags for each enabled feature (see features.py)"""
  # TODO(mikey): this might make it harder to diagnose why features aren't
  # visible/being used.
  ret = {}
  ret['USE_FACEBOOK'] = features.use_facebook()
  ret['USE_FOURSQUARE'] = features.use_foursquare()
  ret['USE_TWITTER'] = features.use_twitter()
  ret['USE_UNTAPPD'] = features.use_untappd()
  return ret
Ejemplo n.º 4
0
def enabled_features(request):
  """Adds a USE_FEATURENAME flags for each enabled feature.

  Currently defined:
    USE_FACEBOOK - Allow registration and fbconnect login via django-socialauth
    USE_TWITTER - pykeg.contrib.twitter is installed.
  """
  # TODO(mikey): this might make it harder to diagnose why features aren't
  # visible/being used.
  ret = {}
  ret['USE_FACEBOOK'] = features.use_facebook()
  ret['USE_TWITTER'] = features.use_twitter()
  return ret
def enabled_features(request):
    """Adds a USE_FEATURENAME flags for each enabled feature.

  Currently defined:
    USE_FACEBOOK - Allow registration and fbconnect login via django-socialauth
    USE_TWITTER - pykeg.contrib.twitter is installed.
  """
    # TODO(mikey): this might make it harder to diagnose why features aren't
    # visible/being used.
    ret = {}
    ret['USE_FACEBOOK'] = features.use_facebook()
    ret['USE_TWITTER'] = features.use_twitter()
    return ret
Ejemplo n.º 6
0
      {'form_class': KegbotRegistrationForm},
      name='registration_register',
    ),
    (r'^accounts/', include('pykeg.web.registration.urls')),

    ### socialregistration
    (r'^sr/', include('socialregistration.urls', namespace='socialregistration')),

    ### setup
    (r'^setup/', include('pykeg.web.setup_wizard.urls')),

    ### kegadmin
    (r'^kegadmin/', include('pykeg.web.kegadmin.urls')),
)

if features.use_facebook():
  urlpatterns += patterns('',
      ### facebook kegweb stuff
      (r'^fb/', include('pykeg.web.contrib.facebook.urls')),
  )

if features.use_untappd():
  urlpatterns += patterns('',
      url(r'^untappd/', include('pykeg.connections.untappd.urls', namespace='untappd')),
  )

if settings.DEBUG:
  urlpatterns += staticfiles_urlpatterns()
  urlpatterns += patterns('',
    url(r'^media/(?P<path>.*)$', 'django.views.static.serve', { 'document_root': settings.MEDIA_ROOT, }),
  )
Ejemplo n.º 7
0
    ### socialregistration
    (r'^sr/', include('socialregistration.urls',
                      namespace='socialregistration')),

    ### setup
    (r'^(?P<kbsite_name>)setup/', include('pykeg.web.setup_wizard.urls')),

    ### charts
    (r'^(?P<kbsite_name>)charts/', include('pykeg.web.charts.urls')),

    ### kegadmin
    (r'^(?P<kbsite_name>)kegadmin/', include('pykeg.web.kegadmin.urls')),
)

if features.use_facebook():
    urlpatterns += patterns(
        '',
        ### facebook kegweb stuff
        (r'^(?P<kbsite_name>)fb/', include('pykeg.web.contrib.facebook.urls')),
    )

if settings.DEBUG:
    urlpatterns += staticfiles_urlpatterns()
    urlpatterns += patterns(
        '',
        url(r'^media/(?P<path>.*)$', 'django.views.static.serve', {
            'document_root': settings.MEDIA_ROOT,
        }),
        url(r'^favicon.ico$', 'django.views.generic.simple.redirect_to',
            {'url': '/site_media/images/favicon.ico'}),