FAQ
$cd
  ./hue-2.3.0.tar/hue/build/env/lib/python2.6/site-packages/Django-1.2.3-py2.6.egg/django
$ll
total 72
drwxr-xr-x. 3 omm wheel 4096 Jul 27 14:21 bin
drwxr-xr-x. 6 omm wheel 4096 Jul 27 14:21 conf
drwxr-xr-x. 22 omm wheel 4096 Jul 27 14:21 contrib
drwxr-xr-x. 9 omm wheel 4096 Jul 27 14:21 core
drwxr-xr-x. 4 omm wheel 4096 Jul 27 14:21 db
drwxr-xr-x. 2 omm wheel 4096 Jul 27 14:21 dispatch
*drwxr-xr-x. 5 omm wheel 4096 Jul 30 10:31 django_cas*
*$cd **django_cas*
drwxr-xr-x. 3 omm wheel 4096 Jul 30 10:31 build
*drwxr-xr-x. 2 omm wheel 4096 Dec 4 2009 django_cas*
drwxr-xr-x. 2 omm wheel 4096 Dec 4 2009 django_cas.egg-info
-rw-r--r--. 1 omm wheel 265 Apr 28 2009 Makefile
-rw-r--r--. 1 omm wheel 23 Apr 28 2009 MANIFEST.in
-rw-r--r--. 1 omm wheel 473 Nov 25 2009 NEWS.txt
-rw-r--r--. 1 omm wheel 1297 Dec 4 2009 PKG-INFO
-rw-r--r--. 1 omm wheel 6785 Nov 25 2009 README.txt
-rw-r--r--. 1 omm wheel 59 Dec 4 2009 setup.cfg
-rwxr-xr-x. 1 omm wheel 1410 Dec 4 2009 setup.py

$cd django_cas
-rw-r--r--. 1 omm wheel 2392 Oct 6 2009 backends.py
-rw-r--r--. 1 omm wheel 1688 Nov 25 2009 decorators.py
-rw-r--r--. 1 omm wheel 606 Nov 25 2009 __init__.py
-rw-r--r--. 1 omm wheel 2062 Nov 25 2009 *middleware*.py
-rw-r--r--. 1 omm wheel 72 Apr 28 2009 models.py
-rw-r--r--. 1 omm wheel 3442 Nov 25 2009 views.py



*settings.py*
#############################################################
USE_CAS = True

## Check for Production server - the real code is much better than this
#if SERVER_ENVIRONMENT == 'Prod':
# USE_CAS = True
## django_cas settings

if USE_CAS:
     CAS_SERVER_URL = 'https://167.52.1.42:8443/cas/'
     CAS_VERSION = '2'

     AUTHENTICATION_BACKENDS = (
         'django.contrib.auth.backends.ModelBackend',
         'django.django_cas.django_cas.backends.CASBackend',
     )

     MIDDLEWARE_CLASSES += (
         'django.django_cas.django_cas.middleware.CASMiddleware',
     )

## end django_cas settings


*urls.py *
######################################3
if settings.USE_CAS:
   dynamic_patterns = patterns('',
   (r'^accounts/login/$', 'django.django_cas.django_cas.views.login'),
   (r'^accounts/logout/$', 'django.django_cas.django_cas.views.logout',
{'next_page': '/'})
   (r'^logs$','desktop.views.log_view'),
   (r'^home$','desktop.views.home'),
   (r'^dump_config$','desktop.views.dump_config'),
   (r'^download_logs$','desktop.views.download_log_view'),
   (r'^bootstrap.js$', 'desktop.views.bootstrap'),
   (r'^profile$', 'desktop.auth.views.profile'),
   (r'^prefs/(?P<key>\w+)?$', 'desktop.views.prefs'),
   (r'^status_bar/?$', 'desktop.views.status_bar'),
   (r'^admin/', include(admin.site.urls)),
   (r'^debug/threads$', 'desktop.views.threads'),
   (r'^debug/who_am_i$', 'desktop.views.who_am_i'),
   (r'^debug/check_config$', 'desktop.views.check_config'),
   (r'^debug/check_config_ajax$', 'desktop.views.check_config_ajax'),
   (r'^log_frontend_event$', 'desktop.views.log_frontend_event'),

   # Oauth
   (r'^login/oauth/?$', 'desktop.auth.views.oauth_login'),
   (r'^login/oauth_authenticated/?$',
'desktop.auth.views.oauth_authenticated'),

   # Jasmine
   (r'^jasmine', 'desktop.views.jasmine'),

   # Top level web page!
   (r'^$', 'desktop.views.index'),
)

and when I setup hue.ERROR:

ImproperlyConfigured: Error importing middleware django.django_cas.django_cas.middleware: "No module named django_cas.django_cas.middleware"




Could you help me please?


thank.

Search Discussions

  • Abraham Elmahrek at Jul 30, 2013 at 3:48 am
    Hello User,

    You'll want to cd into the django_cas directory and type '<hue
    root>/build/env/bin/python setup.py install'. Let us know if django_cas
    works for you!

    -Abe

    On Mon, Jul 29, 2013 at 8:36 PM, wrote:

    $cd
    ./hue-2.3.0.tar/hue/build/env/lib/python2.6/site-packages/Django-1.2.3-py2.6.egg/django
    $ll
    total 72
    drwxr-xr-x. 3 omm wheel 4096 Jul 27 14:21 bin
    drwxr-xr-x. 6 omm wheel 4096 Jul 27 14:21 conf
    drwxr-xr-x. 22 omm wheel 4096 Jul 27 14:21 contrib
    drwxr-xr-x. 9 omm wheel 4096 Jul 27 14:21 core
    drwxr-xr-x. 4 omm wheel 4096 Jul 27 14:21 db
    drwxr-xr-x. 2 omm wheel 4096 Jul 27 14:21 dispatch
    *drwxr-xr-x. 5 omm wheel 4096 Jul 30 10:31 django_cas*
    *$cd **django_cas*
    drwxr-xr-x. 3 omm wheel 4096 Jul 30 10:31 build
    *drwxr-xr-x. 2 omm wheel 4096 Dec 4 2009 django_cas*
    drwxr-xr-x. 2 omm wheel 4096 Dec 4 2009 django_cas.egg-info
    -rw-r--r--. 1 omm wheel 265 Apr 28 2009 Makefile
    -rw-r--r--. 1 omm wheel 23 Apr 28 2009 MANIFEST.in
    -rw-r--r--. 1 omm wheel 473 Nov 25 2009 NEWS.txt
    -rw-r--r--. 1 omm wheel 1297 Dec 4 2009 PKG-INFO
    -rw-r--r--. 1 omm wheel 6785 Nov 25 2009 README.txt
    -rw-r--r--. 1 omm wheel 59 Dec 4 2009 setup.cfg
    -rwxr-xr-x. 1 omm wheel 1410 Dec 4 2009 setup.py

    $cd django_cas
    -rw-r--r--. 1 omm wheel 2392 Oct 6 2009 backends.py
    -rw-r--r--. 1 omm wheel 1688 Nov 25 2009 decorators.py
    -rw-r--r--. 1 omm wheel 606 Nov 25 2009 __init__.py
    -rw-r--r--. 1 omm wheel 2062 Nov 25 2009 *middleware*.py
    -rw-r--r--. 1 omm wheel 72 Apr 28 2009 models.py
    -rw-r--r--. 1 omm wheel 3442 Nov 25 2009 views.py



    *settings.py*
    #############################################################
    USE_CAS = True

    ## Check for Production server - the real code is much better than this
    #if SERVER_ENVIRONMENT == 'Prod':
    # USE_CAS = True
    ## django_cas settings

    if USE_CAS:
    CAS_SERVER_URL = 'https://167.52.1.42:8443/cas/'
    CAS_VERSION = '2'

    AUTHENTICATION_BACKENDS = (
    'django.contrib.auth.backends.ModelBackend',
    'django.django_cas.django_cas.backends.CASBackend',
    )

    MIDDLEWARE_CLASSES += (
    'django.django_cas.django_cas.middleware.CASMiddleware',
    )

    ## end django_cas settings


    *urls.py *
    ######################################3
    if settings.USE_CAS:
    dynamic_patterns = patterns('',
    (r'^accounts/login/$', 'django.django_cas.django_cas.views.login'),
    (r'^accounts/logout/$', 'django.django_cas.django_cas.views.logout',
    {'next_page': '/'})
    (r'^logs$','desktop.views.log_view'),
    (r'^home$','desktop.views.home'),
    (r'^dump_config$','desktop.views.dump_config'),
    (r'^download_logs$','desktop.views.download_log_view'),
    (r'^bootstrap.js$', 'desktop.views.bootstrap'),
    (r'^profile$', 'desktop.auth.views.profile'),
    (r'^prefs/(?P<key>\w+)?$', 'desktop.views.prefs'),
    (r'^status_bar/?$', 'desktop.views.status_bar'),
    (r'^admin/', include(admin.site.urls)),
    (r'^debug/threads$', 'desktop.views.threads'),
    (r'^debug/who_am_i$', 'desktop.views.who_am_i'),
    (r'^debug/check_config$', 'desktop.views.check_config'),
    (r'^debug/check_config_ajax$', 'desktop.views.check_config_ajax'),
    (r'^log_frontend_event$', 'desktop.views.log_frontend_event'),

    # Oauth
    (r'^login/oauth/?$', 'desktop.auth.views.oauth_login'),
    (r'^login/oauth_authenticated/?$',
    'desktop.auth.views.oauth_authenticated'),

    # Jasmine
    (r'^jasmine', 'desktop.views.jasmine'),

    # Top level web page!
    (r'^$', 'desktop.views.index'),
    )

    and when I setup hue.ERROR:

    ImproperlyConfigured: Error importing middleware django.django_cas.django_cas.middleware: "No module named django_cas.django_cas.middleware"




    Could you help me please?


    thank.
  • Kongzhenzhen at Aug 7, 2013 at 1:52 am
    I installed django_cas,and import djang_cas success.

    /opt/hue/hue/build/env/lib/python2.6/site-packages/Django-1.2.3-py2.6.egg/django/conf/global_settings.py
    USE_CAS = True

    ## Check for Production server - the real code is much better than this
    #if SERVER_ENVIRONMENT == 'Prod':
    # USE_CAS = True
    ## django_cas settings
    if USE_CAS:
         CAS_SERVER_URL = 'https://167.52.1.42:8443/cas/'
         CAS_VERSION = '2'

         AUTHENTICATION_BACKENDS = (
             'django.contrib.auth.backends.ModelBackend',
             'django_cas.backends.CASBackend',
         )

         MIDDLEWARE_CLASSES += (
             'django_cas.middleware.CASMiddleware',
             'django.middleware.doc.XViewMiddleware',
         )

    ## end django_cas settings


    /opt/hue/hue/desktop/core/src/desktop/urls.py
    if settings.USE_CAS:
       dynamic_patterns = patterns('',
       (r'^accounts/login/$', 'django_cas.views.login'),
       (r'^accounts/logout/$', 'django_cas.views.logout'),
       (r'^logs$','desktop.views.log_view'),
       (r'^home$','desktop.views.home'),
       (r'^dump_config$','desktop.views.dump_config'),
       (r'^download_logs$','desktop.views.download_log_view'),
       (r'^bootstrap.js$', 'desktop.views.bootstrap'),
       (r'^profile$', 'desktop.auth.views.profile'),
       (r'^prefs/(?P<key>\w+)?$', 'desktop.views.prefs'),
       (r'^status_bar/?$', 'desktop.views.status_bar'),
       (r'^admin/', include(admin.site.urls)),
       (r'^debug/threads$', 'desktop.views.threads'),
       (r'^debug/who_am_i$', 'desktop.views.who_am_i'),
       (r'^debug/check_config$', 'desktop.views.check_config'),
       (r'^debug/check_config_ajax$', 'desktop.views.check_config_ajax'),
       (r'^log_frontend_event$', 'desktop.views.log_frontend_event'),

       # Oauth
       (r'^login/oauth/?$', 'desktop.auth.views.oauth_login'),
       (r'^login/oauth_authenticated/?$',
    'desktop.auth.views.oauth_authenticated'),

       # Jasmine
       (r'^jasmine', 'desktop.views.jasmine'),

       # Top level web page!
       (r'^$', 'desktop.views.index'),
    )


    error.log:
    [07/Aug/2013 09:35:35 +0000] access INFO 172.0.0.201 hue - "GET
    /accounts/logout/ HTTP/1.0"
    [07/Aug/2013 09:36:16 +0000] middleware INFO Redirecting to login
    page: /useradmin/users
    [07/Aug/2013 09:36:16 +0000] access INFO 172.0.0.201 -anon- -
    "GET /useradmin/users HTTP/1.0" -- login redirection
    [07/Aug/2013 09:36:16 +0000] middleware DEBUG No desktop_app known for
    request.
    [07/Aug/2013 09:36:16 +0000] middleware INFO Redirecting to login
    page: /accounts/login/?next=/useradmin/users
    [07/Aug/2013 09:36:16 +0000] access INFO 172.0.0.201 -anon- -
    "GET /accounts/login/ HTTP/1.0" -- login redirection
    [07/Aug/2013 09:36:16 +0000] middleware DEBUG No desktop_app known for
    request.
    [07/Aug/2013 09:36:16 +0000] middleware INFO Redirecting to login
    page: /accounts/login/?next=/accounts/login/%3Fnext%3D/useradmin/users
    [07/Aug/2013 09:36:16 +0000] access INFO 172.0.0.201 -anon- -
    "GET /accounts/login/ HTTP/1.0" -- login redirection
    [07/Aug/2013 09:36:16 +0000] middleware DEBUG No desktop_app known for
    request.
    [07/Aug/2013 09:36:16 +0000] middleware INFO Redirecting to login
    page:
    /accounts/login/?next=/accounts/login/%3Fnext%3D/accounts/login/%253Fnext%253D/useradmin/users
    [07/Aug/2013 09:36:16 +0000] access INFO 172.0.0.201 -anon- -
    "GET /accounts/login/ HTTP/1.0" -- login redirection
    [07/Aug/2013 09:36:16 +0000] middleware DEBUG No desktop_app known for
    request.
    [07/Aug/2013 09:36:16 +0000] middleware INFO Redirecting to login
    page:
    /accounts/login/?next=/accounts/login/%3Fnext%3D/accounts/login/%253Fnext%253D/accounts/login/%25253Fnext%25253D/useradmin/users
    [07/Aug/2013 09:36:16 +0000] access INFO 172.0.0.201 -anon- -
    "GET /accounts/login/ HTTP/1.0" -- login redirection
    [07/Aug/2013 09:36:16 +0000] middleware DEBUG No desktop_app known for
    request.
    [07/Aug/2013 09:36:16 +0000] middleware INFO Redirecting to login
    page:
    /accounts/login/?next=/accounts/login/%3Fnext%3D/accounts/login/%253Fnext%253D/accounts/login/%25253Fnext%25253D/accounts/login/%2525253Fnext%2525253D/useradmin/users
    [07/Aug/2013 09:36:16 +0000] access INFO 172.0.0.201 -anon- -
    "GET /accounts/login/ HTTP/1.0" -- login redirection
    [07/Aug/2013 09:36:16 +0000] middleware DEBUG No desktop_app known for
    request.
    [07/Aug/2013 09:36:16 +0000] middleware INFO Redirecting to login
    page:
    /accounts/login/?next=/accounts/login/%3Fnext%3D/accounts/login/%253Fnext%253D/accounts/login/%25253Fnext%25253D/accounts/login/%2525253Fnext%2525253D/accounts/login/%252525253Fnext%252525253D/useradmin/users
    [07/Aug/2013 09:36:16 +0000] access INFO 172.0.0.201 -anon- -
    "GET /accounts/login/ HTTP/1.0" -- login redirection
    [07/Aug/2013 09:36:16 +0000] middleware DEBUG No desktop_app known for
    request.
    [07/Aug/2013 09:36:16 +0000] middleware INFO Redirecting to login
    page:
    /accounts/login/?next=/accounts/login/%3Fnext%3D/accounts/login/%253Fnext%253D/accounts/login/%25253Fnext%25253D/accounts/login/%2525253Fnext%2525253D/accounts/login/%252525253Fnext%252525253D/accounts/login/%25252525253Fnext%25252525253D/useradmin/users
    [07/Aug/2013 09:36:16 +0000] access INFO 172.0.0.201 -anon- -
    "GET /accounts/login/ HTTP/1.0" -- login redirection
    On Tuesday, July 30, 2013 11:48:54 AM UTC+8, abe wrote:

    Hello User,

    You'll want to cd into the django_cas directory and type '<hue
    root>/build/env/bin/python setup.py install'. Let us know if django_cas
    works for you!

    -Abe


    On Mon, Jul 29, 2013 at 8:36 PM, <kongzh...@huawei.com <javascript:>>wrote:
    $cd
    ./hue-2.3.0.tar/hue/build/env/lib/python2.6/site-packages/Django-1.2.3-py2.6.egg/django
    $ll
    total 72
    drwxr-xr-x. 3 omm wheel 4096 Jul 27 14:21 bin
    drwxr-xr-x. 6 omm wheel 4096 Jul 27 14:21 conf
    drwxr-xr-x. 22 omm wheel 4096 Jul 27 14:21 contrib
    drwxr-xr-x. 9 omm wheel 4096 Jul 27 14:21 core
    drwxr-xr-x. 4 omm wheel 4096 Jul 27 14:21 db
    drwxr-xr-x. 2 omm wheel 4096 Jul 27 14:21 dispatch
    *drwxr-xr-x. 5 omm wheel 4096 Jul 30 10:31 django_cas*
    *$cd **django_cas*
    drwxr-xr-x. 3 omm wheel 4096 Jul 30 10:31 build
    *drwxr-xr-x. 2 omm wheel 4096 Dec 4 2009 django_cas*
    drwxr-xr-x. 2 omm wheel 4096 Dec 4 2009 django_cas.egg-info
    -rw-r--r--. 1 omm wheel 265 Apr 28 2009 Makefile
    -rw-r--r--. 1 omm wheel 23 Apr 28 2009 MANIFEST.in
    -rw-r--r--. 1 omm wheel 473 Nov 25 2009 NEWS.txt
    -rw-r--r--. 1 omm wheel 1297 Dec 4 2009 PKG-INFO
    -rw-r--r--. 1 omm wheel 6785 Nov 25 2009 README.txt
    -rw-r--r--. 1 omm wheel 59 Dec 4 2009 setup.cfg
    -rwxr-xr-x. 1 omm wheel 1410 Dec 4 2009 setup.py

    $cd django_cas
    -rw-r--r--. 1 omm wheel 2392 Oct 6 2009 backends.py
    -rw-r--r--. 1 omm wheel 1688 Nov 25 2009 decorators.py
    -rw-r--r--. 1 omm wheel 606 Nov 25 2009 __init__.py
    -rw-r--r--. 1 omm wheel 2062 Nov 25 2009 *middleware*.py
    -rw-r--r--. 1 omm wheel 72 Apr 28 2009 models.py
    -rw-r--r--. 1 omm wheel 3442 Nov 25 2009 views.py



    *settings.py*
    #############################################################
    USE_CAS = True

    ## Check for Production server - the real code is much better than this
    #if SERVER_ENVIRONMENT == 'Prod':
    # USE_CAS = True
    ## django_cas settings

    if USE_CAS:
    CAS_SERVER_URL = 'https://167.52.1.42:8443/cas/'
    CAS_VERSION = '2'

    AUTHENTICATION_BACKENDS = (
    'django.contrib.auth.backends.ModelBackend',
    'django.django_cas.django_cas.backends.CASBackend',
    )

    MIDDLEWARE_CLASSES += (
    'django.django_cas.django_cas.middleware.CASMiddleware',
    )

    ## end django_cas settings


    *urls.py *
    ######################################3
    if settings.USE_CAS:
    dynamic_patterns = patterns('',
    (r'^accounts/login/$', 'django.django_cas.django_cas.views.login'),
    (r'^accounts/logout/$', 'django.django_cas.django_cas.views.logout',
    {'next_page': '/'})
    (r'^logs$','desktop.views.log_view'),
    (r'^home$','desktop.views.home'),
    (r'^dump_config$','desktop.views.dump_config'),
    (r'^download_logs$','desktop.views.download_log_view'),
    (r'^bootstrap.js$', 'desktop.views.bootstrap'),
    (r'^profile$', 'desktop.auth.views.profile'),
    (r'^prefs/(?P<key>\w+)?$', 'desktop.views.prefs'),
    (r'^status_bar/?$', 'desktop.views.status_bar'),
    (r'^admin/', include(admin.site.urls)),
    (r'^debug/threads$', 'desktop.views.threads'),
    (r'^debug/who_am_i$', 'desktop.views.who_am_i'),
    (r'^debug/check_config$', 'desktop.views.check_config'),
    (r'^debug/check_config_ajax$', 'desktop.views.check_config_ajax'),
    (r'^log_frontend_event$', 'desktop.views.log_frontend_event'),

    # Oauth
    (r'^login/oauth/?$', 'desktop.auth.views.oauth_login'),
    (r'^login/oauth_authenticated/?$',
    'desktop.auth.views.oauth_authenticated'),

    # Jasmine
    (r'^jasmine', 'desktop.views.jasmine'),

    # Top level web page!
    (r'^$', 'desktop.views.index'),
    )

    and when I setup hue.ERROR:

    ImproperlyConfigured: Error importing middleware django.django_cas.django_cas.middleware: "No module named django_cas.django_cas.middleware"




    Could you help me please?


    thank.
  • Abraham Elmahrek at Aug 7, 2013 at 2:09 am
    Awesome! Thank you for reporting back!

    On Tue, Aug 6, 2013 at 6:52 PM, wrote:

    I installed django_cas,and import djang_cas success.


    /opt/hue/hue/build/env/lib/python2.6/site-packages/Django-1.2.3-py2.6.egg/django/conf/global_settings.py
    USE_CAS = True

    ## Check for Production server - the real code is much better than this
    #if SERVER_ENVIRONMENT == 'Prod':
    # USE_CAS = True
    ## django_cas settings
    if USE_CAS:
    CAS_SERVER_URL = 'https://167.52.1.42:8443/cas/'
    CAS_VERSION = '2'

    AUTHENTICATION_BACKENDS = (
    'django.contrib.auth.backends.ModelBackend',
    'django_cas.backends.CASBackend',
    )

    MIDDLEWARE_CLASSES += (
    'django_cas.middleware.CASMiddleware',
    'django.middleware.doc.XViewMiddleware',
    )

    ## end django_cas settings


    /opt/hue/hue/desktop/core/src/desktop/urls.py
    if settings.USE_CAS:
    dynamic_patterns = patterns('',
    (r'^accounts/login/$', 'django_cas.views.login'),
    (r'^accounts/logout/$', 'django_cas.views.logout'),
    (r'^logs$','desktop.views.log_view'),
    (r'^home$','desktop.views.home'),
    (r'^dump_config$','desktop.views.dump_config'),
    (r'^download_logs$','desktop.views.download_log_view'),
    (r'^bootstrap.js$', 'desktop.views.bootstrap'),
    (r'^profile$', 'desktop.auth.views.profile'),
    (r'^prefs/(?P<key>\w+)?$', 'desktop.views.prefs'),
    (r'^status_bar/?$', 'desktop.views.status_bar'),
    (r'^admin/', include(admin.site.urls)),
    (r'^debug/threads$', 'desktop.views.threads'),
    (r'^debug/who_am_i$', 'desktop.views.who_am_i'),
    (r'^debug/check_config$', 'desktop.views.check_config'),
    (r'^debug/check_config_ajax$', 'desktop.views.check_config_ajax'),
    (r'^log_frontend_event$', 'desktop.views.log_frontend_event'),

    # Oauth
    (r'^login/oauth/?$', 'desktop.auth.views.oauth_login'),
    (r'^login/oauth_authenticated/?$',
    'desktop.auth.views.oauth_authenticated'),

    # Jasmine
    (r'^jasmine', 'desktop.views.jasmine'),

    # Top level web page!
    (r'^$', 'desktop.views.index'),
    )


    error.log:
    [07/Aug/2013 09:35:35 +0000] access INFO 172.0.0.201 hue - "GET
    /accounts/logout/ HTTP/1.0"
    [07/Aug/2013 09:36:16 +0000] middleware INFO Redirecting to login
    page: /useradmin/users
    [07/Aug/2013 09:36:16 +0000] access INFO 172.0.0.201 -anon- -
    "GET /useradmin/users HTTP/1.0" -- login redirection
    [07/Aug/2013 09:36:16 +0000] middleware DEBUG No desktop_app known
    for request.
    [07/Aug/2013 09:36:16 +0000] middleware INFO Redirecting to login
    page: /accounts/login/?next=/useradmin/users
    [07/Aug/2013 09:36:16 +0000] access INFO 172.0.0.201 -anon- -
    "GET /accounts/login/ HTTP/1.0" -- login redirection
    [07/Aug/2013 09:36:16 +0000] middleware DEBUG No desktop_app known
    for request.
    [07/Aug/2013 09:36:16 +0000] middleware INFO Redirecting to login
    page: /accounts/login/?next=/accounts/login/%3Fnext%3D/useradmin/users
    [07/Aug/2013 09:36:16 +0000] access INFO 172.0.0.201 -anon- -
    "GET /accounts/login/ HTTP/1.0" -- login redirection
    [07/Aug/2013 09:36:16 +0000] middleware DEBUG No desktop_app known
    for request.
    [07/Aug/2013 09:36:16 +0000] middleware INFO Redirecting to login
    page:
    /accounts/login/?next=/accounts/login/%3Fnext%3D/accounts/login/%253Fnext%253D/useradmin/users
    [07/Aug/2013 09:36:16 +0000] access INFO 172.0.0.201 -anon- -
    "GET /accounts/login/ HTTP/1.0" -- login redirection
    [07/Aug/2013 09:36:16 +0000] middleware DEBUG No desktop_app known
    for request.
    [07/Aug/2013 09:36:16 +0000] middleware INFO Redirecting to login
    page:
    /accounts/login/?next=/accounts/login/%3Fnext%3D/accounts/login/%253Fnext%253D/accounts/login/%25253Fnext%25253D/useradmin/users
    [07/Aug/2013 09:36:16 +0000] access INFO 172.0.0.201 -anon- -
    "GET /accounts/login/ HTTP/1.0" -- login redirection
    [07/Aug/2013 09:36:16 +0000] middleware DEBUG No desktop_app known
    for request.
    [07/Aug/2013 09:36:16 +0000] middleware INFO Redirecting to login
    page:
    /accounts/login/?next=/accounts/login/%3Fnext%3D/accounts/login/%253Fnext%253D/accounts/login/%25253Fnext%25253D/accounts/login/%2525253Fnext%2525253D/useradmin/users
    [07/Aug/2013 09:36:16 +0000] access INFO 172.0.0.201 -anon- -
    "GET /accounts/login/ HTTP/1.0" -- login redirection
    [07/Aug/2013 09:36:16 +0000] middleware DEBUG No desktop_app known
    for request.
    [07/Aug/2013 09:36:16 +0000] middleware INFO Redirecting to login
    page:
    /accounts/login/?next=/accounts/login/%3Fnext%3D/accounts/login/%253Fnext%253D/accounts/login/%25253Fnext%25253D/accounts/login/%2525253Fnext%2525253D/accounts/login/%252525253Fnext%252525253D/useradmin/users
    [07/Aug/2013 09:36:16 +0000] access INFO 172.0.0.201 -anon- -
    "GET /accounts/login/ HTTP/1.0" -- login redirection
    [07/Aug/2013 09:36:16 +0000] middleware DEBUG No desktop_app known
    for request.
    [07/Aug/2013 09:36:16 +0000] middleware INFO Redirecting to login
    page:
    /accounts/login/?next=/accounts/login/%3Fnext%3D/accounts/login/%253Fnext%253D/accounts/login/%25253Fnext%25253D/accounts/login/%2525253Fnext%2525253D/accounts/login/%252525253Fnext%252525253D/accounts/login/%25252525253Fnext%25252525253D/useradmin/users
    [07/Aug/2013 09:36:16 +0000] access INFO 172.0.0.201 -anon- -
    "GET /accounts/login/ HTTP/1.0" -- login redirection
    On Tuesday, July 30, 2013 11:48:54 AM UTC+8, abe wrote:

    Hello User,

    You'll want to cd into the django_cas directory and type '<hue
    root>/build/env/bin/python setup.py install'. Let us know if django_cas
    works for you!

    -Abe

    On Mon, Jul 29, 2013 at 8:36 PM, wrote:

    $cd ./hue-2.3.0.tar/hue/build/**env/lib/python2.6/site-**
    packages/Django-1.2.3-py2.6.**egg/django
    $ll
    total 72
    drwxr-xr-x. 3 omm wheel 4096 Jul 27 14:21 bin
    drwxr-xr-x. 6 omm wheel 4096 Jul 27 14:21 conf
    drwxr-xr-x. 22 omm wheel 4096 Jul 27 14:21 contrib
    drwxr-xr-x. 9 omm wheel 4096 Jul 27 14:21 core
    drwxr-xr-x. 4 omm wheel 4096 Jul 27 14:21 db
    drwxr-xr-x. 2 omm wheel 4096 Jul 27 14:21 dispatch
    *drwxr-xr-x. 5 omm wheel 4096 Jul 30 10:31 django_cas*
    *$cd **django_cas*
    drwxr-xr-x. 3 omm wheel 4096 Jul 30 10:31 build
    *drwxr-xr-x. 2 omm wheel 4096 Dec 4 2009 django_cas*
    drwxr-xr-x. 2 omm wheel 4096 Dec 4 2009 django_cas.egg-info
    -rw-r--r--. 1 omm wheel 265 Apr 28 2009 Makefile
    -rw-r--r--. 1 omm wheel 23 Apr 28 2009 MANIFEST.in
    -rw-r--r--. 1 omm wheel 473 Nov 25 2009 NEWS.txt
    -rw-r--r--. 1 omm wheel 1297 Dec 4 2009 PKG-INFO
    -rw-r--r--. 1 omm wheel 6785 Nov 25 2009 README.txt
    -rw-r--r--. 1 omm wheel 59 Dec 4 2009 setup.cfg
    -rwxr-xr-x. 1 omm wheel 1410 Dec 4 2009 setup.py

    $cd django_cas
    -rw-r--r--. 1 omm wheel 2392 Oct 6 2009 backends.py
    -rw-r--r--. 1 omm wheel 1688 Nov 25 2009 decorators.py
    -rw-r--r--. 1 omm wheel 606 Nov 25 2009 __init__.py
    -rw-r--r--. 1 omm wheel 2062 Nov 25 2009 *middleware*.py
    -rw-r--r--. 1 omm wheel 72 Apr 28 2009 models.py
    -rw-r--r--. 1 omm wheel 3442 Nov 25 2009 views.py



    *settings.py*
    ##############################**##############################**#
    USE_CAS = True

    ## Check for Production server - the real code is much better than this
    #if SERVER_ENVIRONMENT == 'Prod':
    # USE_CAS = True
    ## django_cas settings

    if USE_CAS:
    CAS_SERVER_URL = 'https://167.52.1.42:8443/cas/**'
    CAS_VERSION = '2'

    AUTHENTICATION_BACKENDS = (
    'django.contrib.auth.backends.**ModelBackend',
    'django.django_cas.django_cas.**backends.CASBackend',
    )

    MIDDLEWARE_CLASSES += (
    'django.django_cas.django_cas.**middleware.CASMiddleware',
    )

    ## end django_cas settings


    *urls.py *
    ##############################**########3
    if settings.USE_CAS:
    dynamic_patterns = patterns('',
    (r'^accounts/login/$', 'django.django_cas.django_cas.**views.login'),
    (r'^accounts/logout/$', 'django.django_cas.django_cas.**views.logout',
    {'next_page': '/'})
    (r'^logs$','desktop.views.log_**view'),
    (r'^home$','desktop.views.**home'),
    (r'^dump_config$','desktop.**views.dump_config'),
    (r'^download_logs$','desktop.**views.download_log_view'),
    (r'^bootstrap.js$', 'desktop.views.bootstrap'),
    (r'^profile$', 'desktop.auth.views.profile'),
    (r'^prefs/(?P<key>\w+)?$', 'desktop.views.prefs'),
    (r'^status_bar/?$', 'desktop.views.status_bar'),
    (r'^admin/', include(admin.site.urls)),
    (r'^debug/threads$', 'desktop.views.threads'),
    (r'^debug/who_am_i$', 'desktop.views.who_am_i'),
    (r'^debug/check_config$', 'desktop.views.check_config'),
    (r'^debug/check_config_ajax$', 'desktop.views.check_config_**ajax'),
    (r'^log_frontend_event$', 'desktop.views.log_frontend_**event'),

    # Oauth
    (r'^login/oauth/?$', 'desktop.auth.views.oauth_**login'),
    (r'^login/oauth_authenticated/**?$', 'desktop.auth.views.oauth_**
    authenticated'),

    # Jasmine
    (r'^jasmine', 'desktop.views.jasmine'),

    # Top level web page!
    (r'^$', 'desktop.views.index'),
    )

    and when I setup hue.ERROR:

    ImproperlyConfigured: Error importing middleware django.django_cas.django_cas.**middleware: "No module named django_cas.django_cas.**middleware"




    Could you help me please?


    thank.
  • Kongzhenzhen at Aug 7, 2013 at 2:47 am
    Sorry, I did not respond to you for a long time
    I was interrupted by something else

    I installed djang_cas ,but it not worked well.
    and I still needed your help.

    thanks.
    On Wednesday, August 7, 2013 10:09:46 AM UTC+8, abe wrote:

    Awesome! Thank you for reporting back!


    On Tue, Aug 6, 2013 at 6:52 PM, <kongzh...@huawei.com <javascript:>>wrote:
    I installed django_cas,and import djang_cas success.


    /opt/hue/hue/build/env/lib/python2.6/site-packages/Django-1.2.3-py2.6.egg/django/conf/global_settings.py
    USE_CAS = True

    ## Check for Production server - the real code is much better than this
    #if SERVER_ENVIRONMENT == 'Prod':
    # USE_CAS = True
    ## django_cas settings
    if USE_CAS:
    CAS_SERVER_URL = 'https://167.52.1.42:8443/cas/'
    CAS_VERSION = '2'

    AUTHENTICATION_BACKENDS = (
    'django.contrib.auth.backends.ModelBackend',
    'django_cas.backends.CASBackend',
    )

    MIDDLEWARE_CLASSES += (
    'django_cas.middleware.CASMiddleware',
    'django.middleware.doc.XViewMiddleware',
    )

    ## end django_cas settings


    /opt/hue/hue/desktop/core/src/desktop/urls.py
    if settings.USE_CAS:
    dynamic_patterns = patterns('',
    (r'^accounts/login/$', 'django_cas.views.login'),
    (r'^accounts/logout/$', 'django_cas.views.logout'),
    (r'^logs$','desktop.views.log_view'),
    (r'^home$','desktop.views.home'),
    (r'^dump_config$','desktop.views.dump_config'),
    (r'^download_logs$','desktop.views.download_log_view'),
    (r'^bootstrap.js$', 'desktop.views.bootstrap'),
    (r'^profile$', 'desktop.auth.views.profile'),
    (r'^prefs/(?P<key>\w+)?$', 'desktop.views.prefs'),
    (r'^status_bar/?$', 'desktop.views.status_bar'),
    (r'^admin/', include(admin.site.urls)),
    (r'^debug/threads$', 'desktop.views.threads'),
    (r'^debug/who_am_i$', 'desktop.views.who_am_i'),
    (r'^debug/check_config$', 'desktop.views.check_config'),
    (r'^debug/check_config_ajax$', 'desktop.views.check_config_ajax'),
    (r'^log_frontend_event$', 'desktop.views.log_frontend_event'),

    # Oauth
    (r'^login/oauth/?$', 'desktop.auth.views.oauth_login'),
    (r'^login/oauth_authenticated/?$',
    'desktop.auth.views.oauth_authenticated'),

    # Jasmine
    (r'^jasmine', 'desktop.views.jasmine'),

    # Top level web page!
    (r'^$', 'desktop.views.index'),
    )


    error.log:
    [07/Aug/2013 09:35:35 +0000] access INFO 172.0.0.201 hue - "GET
    /accounts/logout/ HTTP/1.0"
    [07/Aug/2013 09:36:16 +0000] middleware INFO Redirecting to login
    page: /useradmin/users
    [07/Aug/2013 09:36:16 +0000] access INFO 172.0.0.201 -anon- -
    "GET /useradmin/users HTTP/1.0" -- login redirection
    [07/Aug/2013 09:36:16 +0000] middleware DEBUG No desktop_app known
    for request.
    [07/Aug/2013 09:36:16 +0000] middleware INFO Redirecting to login
    page: /accounts/login/?next=/useradmin/users
    [07/Aug/2013 09:36:16 +0000] access INFO 172.0.0.201 -anon- -
    "GET /accounts/login/ HTTP/1.0" -- login redirection
    [07/Aug/2013 09:36:16 +0000] middleware DEBUG No desktop_app known
    for request.
    [07/Aug/2013 09:36:16 +0000] middleware INFO Redirecting to login
    page: /accounts/login/?next=/accounts/login/%3Fnext%3D/useradmin/users
    [07/Aug/2013 09:36:16 +0000] access INFO 172.0.0.201 -anon- -
    "GET /accounts/login/ HTTP/1.0" -- login redirection
    [07/Aug/2013 09:36:16 +0000] middleware DEBUG No desktop_app known
    for request.
    [07/Aug/2013 09:36:16 +0000] middleware INFO Redirecting to login
    page:
    /accounts/login/?next=/accounts/login/%3Fnext%3D/accounts/login/%253Fnext%253D/useradmin/users
    [07/Aug/2013 09:36:16 +0000] access INFO 172.0.0.201 -anon- -
    "GET /accounts/login/ HTTP/1.0" -- login redirection
    [07/Aug/2013 09:36:16 +0000] middleware DEBUG No desktop_app known
    for request.
    [07/Aug/2013 09:36:16 +0000] middleware INFO Redirecting to login
    page:
    /accounts/login/?next=/accounts/login/%3Fnext%3D/accounts/login/%253Fnext%253D/accounts/login/%25253Fnext%25253D/useradmin/users
    [07/Aug/2013 09:36:16 +0000] access INFO 172.0.0.201 -anon- -
    "GET /accounts/login/ HTTP/1.0" -- login redirection
    [07/Aug/2013 09:36:16 +0000] middleware DEBUG No desktop_app known
    for request.
    [07/Aug/2013 09:36:16 +0000] middleware INFO Redirecting to login
    page:
    /accounts/login/?next=/accounts/login/%3Fnext%3D/accounts/login/%253Fnext%253D/accounts/login/%25253Fnext%25253D/accounts/login/%2525253Fnext%2525253D/useradmin/users
    [07/Aug/2013 09:36:16 +0000] access INFO 172.0.0.201 -anon- -
    "GET /accounts/login/ HTTP/1.0" -- login redirection
    [07/Aug/2013 09:36:16 +0000] middleware DEBUG No desktop_app known
    for request.
    [07/Aug/2013 09:36:16 +0000] middleware INFO Redirecting to login
    page:
    /accounts/login/?next=/accounts/login/%3Fnext%3D/accounts/login/%253Fnext%253D/accounts/login/%25253Fnext%25253D/accounts/login/%2525253Fnext%2525253D/accounts/login/%252525253Fnext%252525253D/useradmin/users
    [07/Aug/2013 09:36:16 +0000] access INFO 172.0.0.201 -anon- -
    "GET /accounts/login/ HTTP/1.0" -- login redirection
    [07/Aug/2013 09:36:16 +0000] middleware DEBUG No desktop_app known
    for request.
    [07/Aug/2013 09:36:16 +0000] middleware INFO Redirecting to login
    page:
    /accounts/login/?next=/accounts/login/%3Fnext%3D/accounts/login/%253Fnext%253D/accounts/login/%25253Fnext%25253D/accounts/login/%2525253Fnext%2525253D/accounts/login/%252525253Fnext%252525253D/accounts/login/%25252525253Fnext%25252525253D/useradmin/users
    [07/Aug/2013 09:36:16 +0000] access INFO 172.0.0.201 -anon- -
    "GET /accounts/login/ HTTP/1.0" -- login redirection
    On Tuesday, July 30, 2013 11:48:54 AM UTC+8, abe wrote:

    Hello User,

    You'll want to cd into the django_cas directory and type '<hue
    root>/build/env/bin/python setup.py install'. Let us know if django_cas
    works for you!

    -Abe

    On Mon, Jul 29, 2013 at 8:36 PM, wrote:

    $cd ./hue-2.3.0.tar/hue/build/**env/lib/python2.6/site-**
    packages/Django-1.2.3-py2.6.**egg/django
    $ll
    total 72
    drwxr-xr-x. 3 omm wheel 4096 Jul 27 14:21 bin
    drwxr-xr-x. 6 omm wheel 4096 Jul 27 14:21 conf
    drwxr-xr-x. 22 omm wheel 4096 Jul 27 14:21 contrib
    drwxr-xr-x. 9 omm wheel 4096 Jul 27 14:21 core
    drwxr-xr-x. 4 omm wheel 4096 Jul 27 14:21 db
    drwxr-xr-x. 2 omm wheel 4096 Jul 27 14:21 dispatch
    *drwxr-xr-x. 5 omm wheel 4096 Jul 30 10:31 django_cas*
    *$cd **django_cas*
    drwxr-xr-x. 3 omm wheel 4096 Jul 30 10:31 build
    *drwxr-xr-x. 2 omm wheel 4096 Dec 4 2009 django_cas*
    drwxr-xr-x. 2 omm wheel 4096 Dec 4 2009 django_cas.egg-info
    -rw-r--r--. 1 omm wheel 265 Apr 28 2009 Makefile
    -rw-r--r--. 1 omm wheel 23 Apr 28 2009 MANIFEST.in
    -rw-r--r--. 1 omm wheel 473 Nov 25 2009 NEWS.txt
    -rw-r--r--. 1 omm wheel 1297 Dec 4 2009 PKG-INFO
    -rw-r--r--. 1 omm wheel 6785 Nov 25 2009 README.txt
    -rw-r--r--. 1 omm wheel 59 Dec 4 2009 setup.cfg
    -rwxr-xr-x. 1 omm wheel 1410 Dec 4 2009 setup.py

    $cd django_cas
    -rw-r--r--. 1 omm wheel 2392 Oct 6 2009 backends.py
    -rw-r--r--. 1 omm wheel 1688 Nov 25 2009 decorators.py
    -rw-r--r--. 1 omm wheel 606 Nov 25 2009 __init__.py
    -rw-r--r--. 1 omm wheel 2062 Nov 25 2009 *middleware*.py
    -rw-r--r--. 1 omm wheel 72 Apr 28 2009 models.py
    -rw-r--r--. 1 omm wheel 3442 Nov 25 2009 views.py



    *settings.py*
    ##############################**##############################**#
    USE_CAS = True

    ## Check for Production server - the real code is much better than this
    #if SERVER_ENVIRONMENT == 'Prod':
    # USE_CAS = True
    ## django_cas settings

    if USE_CAS:
    CAS_SERVER_URL = 'https://167.52.1.42:8443/cas/**'
    CAS_VERSION = '2'

    AUTHENTICATION_BACKENDS = (
    'django.contrib.auth.backends.**ModelBackend',
    'django.django_cas.django_cas.**backends.CASBackend',
    )

    MIDDLEWARE_CLASSES += (
    'django.django_cas.django_cas.**middleware.CASMiddleware',
    )

    ## end django_cas settings


    *urls.py *
    ##############################**########3
    if settings.USE_CAS:
    dynamic_patterns = patterns('',
    (r'^accounts/login/$', 'django.django_cas.django_cas.**views.login'),
    (r'^accounts/logout/$', 'django.django_cas.django_cas.**views.logout',
    {'next_page': '/'})
    (r'^logs$','desktop.views.log_**view'),
    (r'^home$','desktop.views.**home'),
    (r'^dump_config$','desktop.**views.dump_config'),
    (r'^download_logs$','desktop.**views.download_log_view'),
    (r'^bootstrap.js$', 'desktop.views.bootstrap'),
    (r'^profile$', 'desktop.auth.views.profile'),
    (r'^prefs/(?P<key>\w+)?$', 'desktop.views.prefs'),
    (r'^status_bar/?$', 'desktop.views.status_bar'),
    (r'^admin/', include(admin.site.urls)),
    (r'^debug/threads$', 'desktop.views.threads'),
    (r'^debug/who_am_i$', 'desktop.views.who_am_i'),
    (r'^debug/check_config$', 'desktop.views.check_config'),
    (r'^debug/check_config_ajax$', 'desktop.views.check_config_**ajax'),
    (r'^log_frontend_event$', 'desktop.views.log_frontend_**event'),

    # Oauth
    (r'^login/oauth/?$', 'desktop.auth.views.oauth_**login'),
    (r'^login/oauth_authenticated/**?$', 'desktop.auth.views.oauth_**
    authenticated'),

    # Jasmine
    (r'^jasmine', 'desktop.views.jasmine'),

    # Top level web page!
    (r'^$', 'desktop.views.index'),
    )

    and when I setup hue.ERROR:

    ImproperlyConfigured: Error importing middleware django.django_cas.django_cas.**middleware: "No module named django_cas.django_cas.**middleware"




    Could you help me please?


    thank.
  • Abraham Elmahrek at Aug 7, 2013 at 4:37 am
    Ah, I misunderstood.

    It looks like you've modified "global_settings.py". You'll want to edit
    "desktop/core/src/desktop/settings.py" instead. Also, it looks like
    django-cas requires a custom authentication backend in Django. You'll want
    to extend "DesktopBackendBase" to make it compliant with Hue.

    -Abe

    On Tue, Aug 6, 2013 at 7:47 PM, wrote:


    Sorry, I did not respond to you for a long time
    I was interrupted by something else

    I installed djang_cas ,but it not worked well.
    and I still needed your help.

    thanks.
    On Wednesday, August 7, 2013 10:09:46 AM UTC+8, abe wrote:

    Awesome! Thank you for reporting back!

    On Tue, Aug 6, 2013 at 6:52 PM, wrote:

    I installed django_cas,and import djang_cas success.

    /opt/hue/hue/build/env/lib/**python2.6/site-packages/**
    Django-1.2.3-py2.6.egg/django/**conf/global_settings.py
    USE_CAS = True

    ## Check for Production server - the real code is much better than this
    #if SERVER_ENVIRONMENT == 'Prod':
    # USE_CAS = True
    ## django_cas settings
    if USE_CAS:
    CAS_SERVER_URL = 'https://167.52.1.42:8443/cas/**'
    CAS_VERSION = '2'

    AUTHENTICATION_BACKENDS = (
    'django.contrib.auth.backends.**ModelBackend',
    'django_cas.backends.**CASBackend',
    )

    MIDDLEWARE_CLASSES += (
    'django_cas.middleware.**CASMiddleware',
    'django.middleware.doc.**XViewMiddleware',
    )

    ## end django_cas settings


    /opt/hue/hue/desktop/core/src/**desktop/urls.py
    if settings.USE_CAS:
    dynamic_patterns = patterns('',
    (r'^accounts/login/$', 'django_cas.views.login'),
    (r'^accounts/logout/$', 'django_cas.views.logout'),
    (r'^logs$','desktop.views.log_**view'),
    (r'^home$','desktop.views.**home'),
    (r'^dump_config$','desktop.**views.dump_config'),
    (r'^download_logs$','desktop.**views.download_log_view'),
    (r'^bootstrap.js$', 'desktop.views.bootstrap'),
    (r'^profile$', 'desktop.auth.views.profile'),
    (r'^prefs/(?P<key>\w+)?$', 'desktop.views.prefs'),
    (r'^status_bar/?$', 'desktop.views.status_bar'),
    (r'^admin/', include(admin.site.urls)),
    (r'^debug/threads$', 'desktop.views.threads'),
    (r'^debug/who_am_i$', 'desktop.views.who_am_i'),
    (r'^debug/check_config$', 'desktop.views.check_config'),
    (r'^debug/check_config_ajax$', 'desktop.views.check_config_**ajax'),
    (r'^log_frontend_event$', 'desktop.views.log_frontend_**event'),

    # Oauth
    (r'^login/oauth/?$', 'desktop.auth.views.oauth_**login'),
    (r'^login/oauth_authenticated/**?$', 'desktop.auth.views.oauth_**
    authenticated'),

    # Jasmine
    (r'^jasmine', 'desktop.views.jasmine'),

    # Top level web page!
    (r'^$', 'desktop.views.index'),
    )


    error.log:
    [07/Aug/2013 09:35:35 +0000] access INFO 172.0.0.201 hue -
    "GET /accounts/logout/ HTTP/1.0"
    [07/Aug/2013 09:36:16 +0000] middleware INFO Redirecting to login
    page: /useradmin/users
    [07/Aug/2013 09:36:16 +0000] access INFO 172.0.0.201 -anon- -
    "GET /useradmin/users HTTP/1.0" -- login redirection
    [07/Aug/2013 09:36:16 +0000] middleware DEBUG No desktop_app known
    for request.
    [07/Aug/2013 09:36:16 +0000] middleware INFO Redirecting to login
    page: /accounts/login/?next=/**useradmin/users
    [07/Aug/2013 09:36:16 +0000] access INFO 172.0.0.201 -anon- -
    "GET /accounts/login/ HTTP/1.0" -- login redirection
    [07/Aug/2013 09:36:16 +0000] middleware DEBUG No desktop_app known
    for request.
    [07/Aug/2013 09:36:16 +0000] middleware INFO Redirecting to login
    page: /accounts/login/?next=/**accounts/login/%3Fnext%3D/**
    useradmin/users
    [07/Aug/2013 09:36:16 +0000] access INFO 172.0.0.201 -anon- -
    "GET /accounts/login/ HTTP/1.0" -- login redirection
    [07/Aug/2013 09:36:16 +0000] middleware DEBUG No desktop_app known
    for request.
    [07/Aug/2013 09:36:16 +0000] middleware INFO Redirecting to login
    page: /accounts/login/?next=/**accounts/login/%3Fnext%3D/**
    accounts/login/%253Fnext%253D/**useradmin/users
    [07/Aug/2013 09:36:16 +0000] access INFO 172.0.0.201 -anon- -
    "GET /accounts/login/ HTTP/1.0" -- login redirection
    [07/Aug/2013 09:36:16 +0000] middleware DEBUG No desktop_app known
    for request.
    [07/Aug/2013 09:36:16 +0000] middleware INFO Redirecting to login
    page: /accounts/login/?next=/**accounts/login/%3Fnext%3D/**
    accounts/login/%253Fnext%253D/**accounts/login/%25253Fnext%**
    25253D/useradmin/users
    [07/Aug/2013 09:36:16 +0000] access INFO 172.0.0.201 -anon- -
    "GET /accounts/login/ HTTP/1.0" -- login redirection
    [07/Aug/2013 09:36:16 +0000] middleware DEBUG No desktop_app known
    for request.
    [07/Aug/2013 09:36:16 +0000] middleware INFO Redirecting to login
    page: /accounts/login/?next=/**accounts/login/%3Fnext%3D/**
    accounts/login/%253Fnext%253D/**accounts/login/%25253Fnext%**
    25253D/accounts/login/%**2525253Fnext%2525253D/**useradmin/users
    [07/Aug/2013 09:36:16 +0000] access INFO 172.0.0.201 -anon- -
    "GET /accounts/login/ HTTP/1.0" -- login redirection
    [07/Aug/2013 09:36:16 +0000] middleware DEBUG No desktop_app known
    for request.
    [07/Aug/2013 09:36:16 +0000] middleware INFO Redirecting to login
    page: /accounts/login/?next=/**accounts/login/%3Fnext%3D/**
    accounts/login/%253Fnext%253D/**accounts/login/%25253Fnext%**
    25253D/accounts/login/%**2525253Fnext%2525253D/**accounts/login/%**
    252525253Fnext%252525253D/**useradmin/users
    [07/Aug/2013 09:36:16 +0000] access INFO 172.0.0.201 -anon- -
    "GET /accounts/login/ HTTP/1.0" -- login redirection
    [07/Aug/2013 09:36:16 +0000] middleware DEBUG No desktop_app known
    for request.
    [07/Aug/2013 09:36:16 +0000] middleware INFO Redirecting to login
    page: /accounts/login/?next=/**accounts/login/%3Fnext%3D/**
    accounts/login/%253Fnext%253D/**accounts/login/%25253Fnext%**
    25253D/accounts/login/%**2525253Fnext%2525253D/**accounts/login/%**
    252525253Fnext%252525253D/**accounts/login/%**
    25252525253Fnext%25252525253D/**useradmin/users
    [07/Aug/2013 09:36:16 +0000] access INFO 172.0.0.201 -anon- -
    "GET /accounts/login/ HTTP/1.0" -- login redirection
    On Tuesday, July 30, 2013 11:48:54 AM UTC+8, abe wrote:

    Hello User,

    You'll want to cd into the django_cas directory and type '<hue
    root>/build/env/bin/python setup.py install'. Let us know if django_cas
    works for you!

    -Abe

    On Mon, Jul 29, 2013 at 8:36 PM, wrote:

    $cd ./hue-2.3.0.tar/hue/build/**env**/lib/python2.6/site-**packages/*
    *Django-1.2.3-py2.6.**egg/django
    $ll
    total 72
    drwxr-xr-x. 3 omm wheel 4096 Jul 27 14:21 bin
    drwxr-xr-x. 6 omm wheel 4096 Jul 27 14:21 conf
    drwxr-xr-x. 22 omm wheel 4096 Jul 27 14:21 contrib
    drwxr-xr-x. 9 omm wheel 4096 Jul 27 14:21 core
    drwxr-xr-x. 4 omm wheel 4096 Jul 27 14:21 db
    drwxr-xr-x. 2 omm wheel 4096 Jul 27 14:21 dispatch
    *drwxr-xr-x. 5 omm wheel 4096 Jul 30 10:31 django_cas*
    *$cd **django_cas*
    drwxr-xr-x. 3 omm wheel 4096 Jul 30 10:31 build
    *drwxr-xr-x. 2 omm wheel 4096 Dec 4 2009 django_cas*
    drwxr-xr-x. 2 omm wheel 4096 Dec 4 2009 django_cas.egg-info
    -rw-r--r--. 1 omm wheel 265 Apr 28 2009 Makefile
    -rw-r--r--. 1 omm wheel 23 Apr 28 2009 MANIFEST.in
    -rw-r--r--. 1 omm wheel 473 Nov 25 2009 NEWS.txt
    -rw-r--r--. 1 omm wheel 1297 Dec 4 2009 PKG-INFO
    -rw-r--r--. 1 omm wheel 6785 Nov 25 2009 README.txt
    -rw-r--r--. 1 omm wheel 59 Dec 4 2009 setup.cfg
    -rwxr-xr-x. 1 omm wheel 1410 Dec 4 2009 setup.py

    $cd django_cas
    -rw-r--r--. 1 omm wheel 2392 Oct 6 2009 backends.py
    -rw-r--r--. 1 omm wheel 1688 Nov 25 2009 decorators.py
    -rw-r--r--. 1 omm wheel 606 Nov 25 2009 __init__.py
    -rw-r--r--. 1 omm wheel 2062 Nov 25 2009 *middleware*.py
    -rw-r--r--. 1 omm wheel 72 Apr 28 2009 models.py
    -rw-r--r--. 1 omm wheel 3442 Nov 25 2009 views.py



    *settings.py*
    ##############################****##############################****#
    USE_CAS = True

    ## Check for Production server - the real code is much better than this
    #if SERVER_ENVIRONMENT == 'Prod':
    # USE_CAS = True
    ## django_cas settings

    if USE_CAS:
    CAS_SERVER_URL = 'https://167.52.1.42:8443/cas/****'
    CAS_VERSION = '2'

    AUTHENTICATION_BACKENDS = (
    'django.contrib.auth.backends.****ModelBackend',
    'django.django_cas.django_cas.****backends.CASBackend',
    )

    MIDDLEWARE_CLASSES += (
    'django.django_cas.django_cas.****middleware.CASMiddleware',
    )

    ## end django_cas settings


    *urls.py *
    ##############################****########3
    if settings.USE_CAS:
    dynamic_patterns = patterns('',
    (r'^accounts/login/$', 'django.django_cas.django_cas.****
    views.login'),
    (r'^accounts/logout/$', 'django.django_cas.django_cas.****views.logout',
    {'next_page': '/'})
    (r'^logs$','desktop.views.log_****view'),
    (r'^home$','desktop.views.**home**'),
    (r'^dump_config$','desktop.**vie**ws.dump_config'),
    (r'^download_logs$','desktop.**v**iews.download_log_view'),
    (r'^bootstrap.js$', 'desktop.views.bootstrap'),
    (r'^profile$', 'desktop.auth.views.profile'),
    (r'^prefs/(?P<key>\w+)?$', 'desktop.views.prefs'),
    (r'^status_bar/?$', 'desktop.views.status_bar'),
    (r'^admin/', include(admin.site.urls)),
    (r'^debug/threads$', 'desktop.views.threads'),
    (r'^debug/who_am_i$', 'desktop.views.who_am_i'),
    (r'^debug/check_config$', 'desktop.views.check_config'),
    (r'^debug/check_config_ajax$', 'desktop.views.check_config_**aj**
    ax'),
    (r'^log_frontend_event$', 'desktop.views.log_frontend_**ev**ent'),

    # Oauth
    (r'^login/oauth/?$', 'desktop.auth.views.oauth_**logi**n'),
    (r'^login/oauth_authenticated/****?$', 'desktop.auth.views.oauth_**
    auth**enticated'),

    # Jasmine
    (r'^jasmine', 'desktop.views.jasmine'),

    # Top level web page!
    (r'^$', 'desktop.views.index'),
    )

    and when I setup hue.ERROR:

    ImproperlyConfigured: Error importing middleware django.django_cas.django_cas.**m**iddleware: "No module named django_cas.django_cas.**middlewa**re"




    Could you help me please?


    thank.
  • Kongzhenzhen at Aug 8, 2013 at 1:13 am
    A more detailed description, please.
    On Wednesday, August 7, 2013 12:37:31 PM UTC+8, abe wrote:

    Ah, I misunderstood.

    It looks like you've modified "global_settings.py". You'll want to edit
    "desktop/core/src/desktop/settings.py" instead. Also, it looks like
    django-cas requires a custom authentication backend in Django. You'll want
    to extend "DesktopBackendBase" to make it compliant with Hue.

    -Abe


    On Tue, Aug 6, 2013 at 7:47 PM, <kongzh...@huawei.com <javascript:>>wrote:
    Sorry, I did not respond to you for a long time
    I was interrupted by something else

    I installed djang_cas ,but it not worked well.
    and I still needed your help.

    thanks.
    On Wednesday, August 7, 2013 10:09:46 AM UTC+8, abe wrote:

    Awesome! Thank you for reporting back!

    On Tue, Aug 6, 2013 at 6:52 PM, wrote:

    I installed django_cas,and import djang_cas success.

    /opt/hue/hue/build/env/lib/**python2.6/site-packages/**
    Django-1.2.3-py2.6.egg/django/**conf/global_settings.py
    USE_CAS = True

    ## Check for Production server - the real code is much better than this
    #if SERVER_ENVIRONMENT == 'Prod':
    # USE_CAS = True
    ## django_cas settings
    if USE_CAS:
    CAS_SERVER_URL = 'https://167.52.1.42:8443/cas/**'
    CAS_VERSION = '2'

    AUTHENTICATION_BACKENDS = (
    'django.contrib.auth.backends.**ModelBackend',
    'django_cas.backends.**CASBackend',
    )

    MIDDLEWARE_CLASSES += (
    'django_cas.middleware.**CASMiddleware',
    'django.middleware.doc.**XViewMiddleware',
    )

    ## end django_cas settings


    /opt/hue/hue/desktop/core/src/**desktop/urls.py
    if settings.USE_CAS:
    dynamic_patterns = patterns('',
    (r'^accounts/login/$', 'django_cas.views.login'),
    (r'^accounts/logout/$', 'django_cas.views.logout'),
    (r'^logs$','desktop.views.log_**view'),
    (r'^home$','desktop.views.**home'),
    (r'^dump_config$','desktop.**views.dump_config'),
    (r'^download_logs$','desktop.**views.download_log_view'),
    (r'^bootstrap.js$', 'desktop.views.bootstrap'),
    (r'^profile$', 'desktop.auth.views.profile'),
    (r'^prefs/(?P<key>\w+)?$', 'desktop.views.prefs'),
    (r'^status_bar/?$', 'desktop.views.status_bar'),
    (r'^admin/', include(admin.site.urls)),
    (r'^debug/threads$', 'desktop.views.threads'),
    (r'^debug/who_am_i$', 'desktop.views.who_am_i'),
    (r'^debug/check_config$', 'desktop.views.check_config'),
    (r'^debug/check_config_ajax$', 'desktop.views.check_config_**ajax'),
    (r'^log_frontend_event$', 'desktop.views.log_frontend_**event'),

    # Oauth
    (r'^login/oauth/?$', 'desktop.auth.views.oauth_**login'),
    (r'^login/oauth_authenticated/**?$', 'desktop.auth.views.oauth_**
    authenticated'),

    # Jasmine
    (r'^jasmine', 'desktop.views.jasmine'),

    # Top level web page!
    (r'^$', 'desktop.views.index'),
    )


    error.log:
    [07/Aug/2013 09:35:35 +0000] access INFO 172.0.0.201 hue -
    "GET /accounts/logout/ HTTP/1.0"
    [07/Aug/2013 09:36:16 +0000] middleware INFO Redirecting to login
    page: /useradmin/users
    [07/Aug/2013 09:36:16 +0000] access INFO 172.0.0.201 -anon- -
    "GET /useradmin/users HTTP/1.0" -- login redirection
    [07/Aug/2013 09:36:16 +0000] middleware DEBUG No desktop_app known
    for request.
    [07/Aug/2013 09:36:16 +0000] middleware INFO Redirecting to login
    page: /accounts/login/?next=/**useradmin/users
    [07/Aug/2013 09:36:16 +0000] access INFO 172.0.0.201 -anon- -
    "GET /accounts/login/ HTTP/1.0" -- login redirection
    [07/Aug/2013 09:36:16 +0000] middleware DEBUG No desktop_app known
    for request.
    [07/Aug/2013 09:36:16 +0000] middleware INFO Redirecting to login
    page: /accounts/login/?next=/**accounts/login/%3Fnext%3D/**
    useradmin/users
    [07/Aug/2013 09:36:16 +0000] access INFO 172.0.0.201 -anon- -
    "GET /accounts/login/ HTTP/1.0" -- login redirection
    [07/Aug/2013 09:36:16 +0000] middleware DEBUG No desktop_app known
    for request.
    [07/Aug/2013 09:36:16 +0000] middleware INFO Redirecting to login
    page: /accounts/login/?next=/**accounts/login/%3Fnext%3D/**
    accounts/login/%253Fnext%253D/**useradmin/users
    [07/Aug/2013 09:36:16 +0000] access INFO 172.0.0.201 -anon- -
    "GET /accounts/login/ HTTP/1.0" -- login redirection
    [07/Aug/2013 09:36:16 +0000] middleware DEBUG No desktop_app known
    for request.
    [07/Aug/2013 09:36:16 +0000] middleware INFO Redirecting to login
    page: /accounts/login/?next=/**accounts/login/%3Fnext%3D/**
    accounts/login/%253Fnext%253D/**accounts/login/%25253Fnext%**
    25253D/useradmin/users
    [07/Aug/2013 09:36:16 +0000] access INFO 172.0.0.201 -anon- -
    "GET /accounts/login/ HTTP/1.0" -- login redirection
    [07/Aug/2013 09:36:16 +0000] middleware DEBUG No desktop_app known
    for request.
    [07/Aug/2013 09:36:16 +0000] middleware INFO Redirecting to login
    page: /accounts/login/?next=/**accounts/login/%3Fnext%3D/**
    accounts/login/%253Fnext%253D/**accounts/login/%25253Fnext%**
    25253D/accounts/login/%**2525253Fnext%2525253D/**useradmin/users
    [07/Aug/2013 09:36:16 +0000] access INFO 172.0.0.201 -anon- -
    "GET /accounts/login/ HTTP/1.0" -- login redirection
    [07/Aug/2013 09:36:16 +0000] middleware DEBUG No desktop_app known
    for request.
    [07/Aug/2013 09:36:16 +0000] middleware INFO Redirecting to login
    page: /accounts/login/?next=/**accounts/login/%3Fnext%3D/**
    accounts/login/%253Fnext%253D/**accounts/login/%25253Fnext%**
    25253D/accounts/login/%**2525253Fnext%2525253D/**accounts/login/%**
    252525253Fnext%252525253D/**useradmin/users
    [07/Aug/2013 09:36:16 +0000] access INFO 172.0.0.201 -anon- -
    "GET /accounts/login/ HTTP/1.0" -- login redirection
    [07/Aug/2013 09:36:16 +0000] middleware DEBUG No desktop_app known
    for request.
    [07/Aug/2013 09:36:16 +0000] middleware INFO Redirecting to login
    page: /accounts/login/?next=/**accounts/login/%3Fnext%3D/**
    accounts/login/%253Fnext%253D/**accounts/login/%25253Fnext%**
    25253D/accounts/login/%**2525253Fnext%2525253D/**accounts/login/%**
    252525253Fnext%252525253D/**accounts/login/%**
    25252525253Fnext%25252525253D/**useradmin/users
    [07/Aug/2013 09:36:16 +0000] access INFO 172.0.0.201 -anon- -
    "GET /accounts/login/ HTTP/1.0" -- login redirection
    On Tuesday, July 30, 2013 11:48:54 AM UTC+8, abe wrote:

    Hello User,

    You'll want to cd into the django_cas directory and type '<hue
    root>/build/env/bin/python setup.py install'. Let us know if django_cas
    works for you!

    -Abe

    On Mon, Jul 29, 2013 at 8:36 PM, wrote:

    $cd ./hue-2.3.0.tar/hue/build/**env**/lib/python2.6/site-**packages/
    **Django-1.2.3-py2.6.**egg/django
    $ll
    total 72
    drwxr-xr-x. 3 omm wheel 4096 Jul 27 14:21 bin
    drwxr-xr-x. 6 omm wheel 4096 Jul 27 14:21 conf
    drwxr-xr-x. 22 omm wheel 4096 Jul 27 14:21 contrib
    drwxr-xr-x. 9 omm wheel 4096 Jul 27 14:21 core
    drwxr-xr-x. 4 omm wheel 4096 Jul 27 14:21 db
    drwxr-xr-x. 2 omm wheel 4096 Jul 27 14:21 dispatch
    *drwxr-xr-x. 5 omm wheel 4096 Jul 30 10:31 django_cas*
    *$cd **django_cas*
    drwxr-xr-x. 3 omm wheel 4096 Jul 30 10:31 build
    *drwxr-xr-x. 2 omm wheel 4096 Dec 4 2009 django_cas*
    drwxr-xr-x. 2 omm wheel 4096 Dec 4 2009 django_cas.egg-info
    -rw-r--r--. 1 omm wheel 265 Apr 28 2009 Makefile
    -rw-r--r--. 1 omm wheel 23 Apr 28 2009 MANIFEST.in
    -rw-r--r--. 1 omm wheel 473 Nov 25 2009 NEWS.txt
    -rw-r--r--. 1 omm wheel 1297 Dec 4 2009 PKG-INFO
    -rw-r--r--. 1 omm wheel 6785 Nov 25 2009 README.txt
    -rw-r--r--. 1 omm wheel 59 Dec 4 2009 setup.cfg
    -rwxr-xr-x. 1 omm wheel 1410 Dec 4 2009 setup.py

    $cd django_cas
    -rw-r--r--. 1 omm wheel 2392 Oct 6 2009 backends.py
    -rw-r--r--. 1 omm wheel 1688 Nov 25 2009 decorators.py
    -rw-r--r--. 1 omm wheel 606 Nov 25 2009 __init__.py
    -rw-r--r--. 1 omm wheel 2062 Nov 25 2009 *middleware*.py
    -rw-r--r--. 1 omm wheel 72 Apr 28 2009 models.py
    -rw-r--r--. 1 omm wheel 3442 Nov 25 2009 views.py



    *settings.py*
    ##############################****##############################****#
    USE_CAS = True

    ## Check for Production server - the real code is much better than
    this
    #if SERVER_ENVIRONMENT == 'Prod':
    # USE_CAS = True
    ## django_cas settings

    if USE_CAS:
    CAS_SERVER_URL = 'https://167.52.1.42:8443/cas/****'
    CAS_VERSION = '2'

    AUTHENTICATION_BACKENDS = (
    'django.contrib.auth.backends.****ModelBackend',
    'django.django_cas.django_cas.****backends.CASBackend',
    )

    MIDDLEWARE_CLASSES += (
    'django.django_cas.django_cas.****middleware.CASMiddleware',
    )

    ## end django_cas settings


    *urls.py *
    ##############################****########3
    if settings.USE_CAS:
    dynamic_patterns = patterns('',
    (r'^accounts/login/$', 'django.django_cas.django_cas.****
    views.login'),
    (r'^accounts/logout/$', 'django.django_cas.django_cas.****views.logout',
    {'next_page': '/'})
    (r'^logs$','desktop.views.log_****view'),
    (r'^home$','desktop.views.**home**'),
    (r'^dump_config$','desktop.**vie**ws.dump_config'),
    (r'^download_logs$','desktop.**v**iews.download_log_view'),
    (r'^bootstrap.js$', 'desktop.views.bootstrap'),
    (r'^profile$', 'desktop.auth.views.profile'),
    (r'^prefs/(?P<key>\w+)?$', 'desktop.views.prefs'),
    (r'^status_bar/?$', 'desktop.views.status_bar'),
    (r'^admin/', include(admin.site.urls)),
    (r'^debug/threads$', 'desktop.views.threads'),
    (r'^debug/who_am_i$', 'desktop.views.who_am_i'),
    (r'^debug/check_config$', 'desktop.views.check_config'),
    (r'^debug/check_config_ajax$', 'desktop.views.check_config_**aj**
    ax'),
    (r'^log_frontend_event$', 'desktop.views.log_frontend_**ev**ent'),

    # Oauth
    (r'^login/oauth/?$', 'desktop.auth.views.oauth_**logi**n'),
    (r'^login/oauth_authenticated/****?$', 'desktop.auth.views.oauth_**
    auth**enticated'),

    # Jasmine
    (r'^jasmine', 'desktop.views.jasmine'),

    # Top level web page!
    (r'^$', 'desktop.views.index'),
    )

    and when I setup hue.ERROR:

    ImproperlyConfigured: Error importing middleware django.django_cas.django_cas.**m**iddleware: "No module named django_cas.django_cas.**middlewa**re"




    Could you help me please?


    thank.
  • Abraham Elmahrek at Aug 8, 2013 at 2:03 am
    In the previous post, you've shown the "global_settings.py" file. That is a
    django specific file and should not be modified. Instead, you should edit
    "desktop/core/src/desktop/settings.py" or create your own app and edit its
    "settings.py" file.

    Are you following https://bitbucket.org/cpcc/django-cas/overview ?. It
    looks like there is a middleware and an authentication backend associated
    with this app. In order to get it working properly, you need to create a
    custom authentication backend that extends both the "CASBackend" and
    "DesktopBackendBase". You may also have to write your own middleware, but
    I'm unsure about that.

    Also, it seems like infinite redirect problems occur frequently using
    django-cas. Take a look at https://code.djangoproject.com/ticket/4617.

    Make sure to follow the instructions for installing django-cas carefully.
    Hue provides its own Django middlewares and authentication backends to
    route to the desktop app and modify the user object. The errors you were
    seeing "No desktop_app known for request" imply that the
    "AppSpecificMiddleware" did not execute. This is likely because you've
    modified the "global_settings.py" file instead of the
    "desktop/core/src/desktop/settings.py" file.

    -abe


    On Wed, Aug 7, 2013 at 6:13 PM, wrote:

    A more detailed description, please.

    On Wednesday, August 7, 2013 12:37:31 PM UTC+8, abe wrote:

    Ah, I misunderstood.

    It looks like you've modified "global_settings.py". You'll want to edit
    "desktop/core/src/desktop/**settings.py" instead. Also, it looks like
    django-cas requires a custom authentication backend in Django. You'll want
    to extend "DesktopBackendBase" to make it compliant with Hue.

    -Abe

    On Tue, Aug 6, 2013 at 7:47 PM, wrote:


    Sorry, I did not respond to you for a long time
    I was interrupted by something else

    I installed djang_cas ,but it not worked well.
    and I still needed your help.

    thanks.
    On Wednesday, August 7, 2013 10:09:46 AM UTC+8, abe wrote:

    Awesome! Thank you for reporting back!

    On Tue, Aug 6, 2013 at 6:52 PM, wrote:

    I installed django_cas,and import djang_cas success.

    /opt/hue/hue/build/env/lib/**pyt**hon2.6/site-packages/**Django-1.**
    2.3-py2.6.egg/django/**conf/**global_settings.py
    USE_CAS = True

    ## Check for Production server - the real code is much better than this
    #if SERVER_ENVIRONMENT == 'Prod':
    # USE_CAS = True
    ## django_cas settings
    if USE_CAS:
    CAS_SERVER_URL = 'https://167.52.1.42:8443/cas/****'
    CAS_VERSION = '2'

    AUTHENTICATION_BACKENDS = (
    'django.contrib.auth.backends.****ModelBackend',
    'django_cas.backends.**CASBacken**d',
    )

    MIDDLEWARE_CLASSES += (
    'django_cas.middleware.**CASMidd**leware',
    'django.middleware.doc.**XViewMi**ddleware',
    )

    ## end django_cas settings


    /opt/hue/hue/desktop/core/src/****desktop/urls.py
    if settings.USE_CAS:
    dynamic_patterns = patterns('',
    (r'^accounts/login/$', 'django_cas.views.login'),
    (r'^accounts/logout/$', 'django_cas.views.logout'),
    (r'^logs$','desktop.views.log_****view'),
    (r'^home$','desktop.views.**home**'),
    (r'^dump_config$','desktop.**vie**ws.dump_config'),
    (r'^download_logs$','desktop.**v**iews.download_log_view'),
    (r'^bootstrap.js$', 'desktop.views.bootstrap'),
    (r'^profile$', 'desktop.auth.views.profile'),
    (r'^prefs/(?P<key>\w+)?$', 'desktop.views.prefs'),
    (r'^status_bar/?$', 'desktop.views.status_bar'),
    (r'^admin/', include(admin.site.urls)),
    (r'^debug/threads$', 'desktop.views.threads'),
    (r'^debug/who_am_i$', 'desktop.views.who_am_i'),
    (r'^debug/check_config$', 'desktop.views.check_config'),
    (r'^debug/check_config_ajax$', 'desktop.views.check_config_**aj**
    ax'),
    (r'^log_frontend_event$', 'desktop.views.log_frontend_**ev**ent'),

    # Oauth
    (r'^login/oauth/?$', 'desktop.auth.views.oauth_**logi**n'),
    (r'^login/oauth_authenticated/****?$', 'desktop.auth.views.oauth_**
    auth**enticated'),

    # Jasmine
    (r'^jasmine', 'desktop.views.jasmine'),

    # Top level web page!
    (r'^$', 'desktop.views.index'),
    )


    error.log:
    [07/Aug/2013 09:35:35 +0000] access INFO 172.0.0.201 hue -
    "GET /accounts/logout/ HTTP/1.0"
    [07/Aug/2013 09:36:16 +0000] middleware INFO Redirecting to
    login page: /useradmin/users
    [07/Aug/2013 09:36:16 +0000] access INFO 172.0.0.201 -anon-
    - "GET /useradmin/users HTTP/1.0" -- login redirection
    [07/Aug/2013 09:36:16 +0000] middleware DEBUG No desktop_app
    known for request.
    [07/Aug/2013 09:36:16 +0000] middleware INFO Redirecting to
    login page: /accounts/login/?next=/**useradm**in/users
    [07/Aug/2013 09:36:16 +0000] access INFO 172.0.0.201 -anon-
    - "GET /accounts/login/ HTTP/1.0" -- login redirection
    [07/Aug/2013 09:36:16 +0000] middleware DEBUG No desktop_app
    known for request.
    [07/Aug/2013 09:36:16 +0000] middleware INFO Redirecting to
    login page: /accounts/login/?next=/**account**s/login/%3Fnext%3D/**
    useradmin/**users
    [07/Aug/2013 09:36:16 +0000] access INFO 172.0.0.201 -anon-
    - "GET /accounts/login/ HTTP/1.0" -- login redirection
    [07/Aug/2013 09:36:16 +0000] middleware DEBUG No desktop_app
    known for request.
    [07/Aug/2013 09:36:16 +0000] middleware INFO Redirecting to
    login page: /accounts/login/?next=/**account**s/login/%3Fnext%3D/**
    accounts/**login/%253Fnext%253D/**useradmin**/users
    [07/Aug/2013 09:36:16 +0000] access INFO 172.0.0.201 -anon-
    - "GET /accounts/login/ HTTP/1.0" -- login redirection
    [07/Aug/2013 09:36:16 +0000] middleware DEBUG No desktop_app
    known for request.
    [07/Aug/2013 09:36:16 +0000] middleware INFO Redirecting to
    login page: /accounts/login/?next=/**account**s/login/%3Fnext%3D/**
    accounts/**login/%253Fnext%253D/**accounts/**login/%25253Fnext%**
    25253D/**useradmin/users
    [07/Aug/2013 09:36:16 +0000] access INFO 172.0.0.201 -anon-
    - "GET /accounts/login/ HTTP/1.0" -- login redirection
    [07/Aug/2013 09:36:16 +0000] middleware DEBUG No desktop_app
    known for request.
    [07/Aug/2013 09:36:16 +0000] middleware INFO Redirecting to
    login page: /accounts/login/?next=/**account**s/login/%3Fnext%3D/**
    accounts/**login/%253Fnext%253D/**accounts/**login/%25253Fnext%**
    25253D/**accounts/login/%**2525253Fnext%**2525253D/**useradmin/users
    [07/Aug/2013 09:36:16 +0000] access INFO 172.0.0.201 -anon-
    - "GET /accounts/login/ HTTP/1.0" -- login redirection
    [07/Aug/2013 09:36:16 +0000] middleware DEBUG No desktop_app
    known for request.
    [07/Aug/2013 09:36:16 +0000] middleware INFO Redirecting to
    login page: /accounts/login/?next=/**account**s/login/%3Fnext%3D/**
    accounts/**login/%253Fnext%253D/**accounts/**login/%25253Fnext%**
    25253D/**accounts/login/%**2525253Fnext%**2525253D/**accounts/login/%*
    *25252**5253Fnext%252525253D/**useradmin**/users
    [07/Aug/2013 09:36:16 +0000] access INFO 172.0.0.201 -anon-
    - "GET /accounts/login/ HTTP/1.0" -- login redirection
    [07/Aug/2013 09:36:16 +0000] middleware DEBUG No desktop_app
    known for request.
    [07/Aug/2013 09:36:16 +0000] middleware INFO Redirecting to
    login page: /accounts/login/?next=/**account**s/login/%3Fnext%3D/**
    accounts/**login/%253Fnext%253D/**accounts/**login/%25253Fnext%**
    25253D/**accounts/login/%**2525253Fnext%**2525253D/**accounts/login/%*
    *25252**5253Fnext%252525253D/**accounts/**login/%**25252525253Fnext%**
    25252525253D/**useradmin/users
    [07/Aug/2013 09:36:16 +0000] access INFO 172.0.0.201 -anon-
    - "GET /accounts/login/ HTTP/1.0" -- login redirection
    On Tuesday, July 30, 2013 11:48:54 AM UTC+8, abe wrote:

    Hello User,

    You'll want to cd into the django_cas directory and type '<hue
    root>/build/env/bin/python setup.py install'. Let us know if django_cas
    works for you!

    -Abe

    On Mon, Jul 29, 2013 at 8:36 PM, wrote:

    $cd ./hue-2.3.0.tar/hue/build/**env****/lib/python2.6/site-**
    packages/**D**jango-1.2.3-py2.6.**egg/django
    $ll
    total 72
    drwxr-xr-x. 3 omm wheel 4096 Jul 27 14:21 bin
    drwxr-xr-x. 6 omm wheel 4096 Jul 27 14:21 conf
    drwxr-xr-x. 22 omm wheel 4096 Jul 27 14:21 contrib
    drwxr-xr-x. 9 omm wheel 4096 Jul 27 14:21 core
    drwxr-xr-x. 4 omm wheel 4096 Jul 27 14:21 db
    drwxr-xr-x. 2 omm wheel 4096 Jul 27 14:21 dispatch
    *drwxr-xr-x. 5 omm wheel 4096 Jul 30 10:31 django_cas*
    *$cd **django_cas*
    drwxr-xr-x. 3 omm wheel 4096 Jul 30 10:31 build
    *drwxr-xr-x. 2 omm wheel 4096 Dec 4 2009 django_cas*
    drwxr-xr-x. 2 omm wheel 4096 Dec 4 2009 django_cas.egg-info
    -rw-r--r--. 1 omm wheel 265 Apr 28 2009 Makefile
    -rw-r--r--. 1 omm wheel 23 Apr 28 2009 MANIFEST.in
    -rw-r--r--. 1 omm wheel 473 Nov 25 2009 NEWS.txt
    -rw-r--r--. 1 omm wheel 1297 Dec 4 2009 PKG-INFO
    -rw-r--r--. 1 omm wheel 6785 Nov 25 2009 README.txt
    -rw-r--r--. 1 omm wheel 59 Dec 4 2009 setup.cfg
    -rwxr-xr-x. 1 omm wheel 1410 Dec 4 2009 setup.py

    $cd django_cas
    -rw-r--r--. 1 omm wheel 2392 Oct 6 2009 backends.py
    -rw-r--r--. 1 omm wheel 1688 Nov 25 2009 decorators.py
    -rw-r--r--. 1 omm wheel 606 Nov 25 2009 __init__.py
    -rw-r--r--. 1 omm wheel 2062 Nov 25 2009 *middleware*.py
    -rw-r--r--. 1 omm wheel 72 Apr 28 2009 models.py
    -rw-r--r--. 1 omm wheel 3442 Nov 25 2009 views.py



    *settings.py*
    ##############################******##############################**
    ****#
    USE_CAS = True

    ## Check for Production server - the real code is much better than
    this
    #if SERVER_ENVIRONMENT == 'Prod':
    # USE_CAS = True
    ## django_cas settings

    if USE_CAS:
    CAS_SERVER_URL = 'https://167.52.1.42:8443/cas/******'
    CAS_VERSION = '2'

    AUTHENTICATION_BACKENDS = (
    'django.contrib.auth.backends.******ModelBackend',
    'django.django_cas.django_cas.******backends.CASBackend',
    )

    MIDDLEWARE_CLASSES += (
    'django.django_cas.django_cas.******
    middleware.CASMiddleware',
    )

    ## end django_cas settings


    *urls.py *
    ##############################******########3
    if settings.USE_CAS:
    dynamic_patterns = patterns('',
    (r'^accounts/login/$', 'django.django_cas.django_cas.******
    views.login'),
    (r'^accounts/logout/$', 'django.django_cas.django_cas.******views.logout',
    {'next_page': '/'})
    (r'^logs$','desktop.views.log_******view'),
    (r'^home$','desktop.views.**home****'),
    (r'^dump_config$','desktop.**vie****ws.dump_config'),
    (r'^download_logs$','desktop.**v****iews.download_log_view'),
    (r'^bootstrap.js$', 'desktop.views.bootstrap'),
    (r'^profile$', 'desktop.auth.views.profile'),
    (r'^prefs/(?P<key>\w+)?$', 'desktop.views.prefs'),
    (r'^status_bar/?$', 'desktop.views.status_bar'),
    (r'^admin/', include(admin.site.urls)),
    (r'^debug/threads$', 'desktop.views.threads'),
    (r'^debug/who_am_i$', 'desktop.views.who_am_i'),
    (r'^debug/check_config$', 'desktop.views.check_config'),
    (r'^debug/check_config_ajax$', 'desktop.views.check_config_**aj***
    *ax'),
    (r'^log_frontend_event$', 'desktop.views.log_frontend_**ev****
    ent'),

    # Oauth
    (r'^login/oauth/?$', 'desktop.auth.views.oauth_**logi****n'),
    (r'^login/oauth_authenticated/******?$',
    'desktop.auth.views.oauth_**auth****enticated'),

    # Jasmine
    (r'^jasmine', 'desktop.views.jasmine'),

    # Top level web page!
    (r'^$', 'desktop.views.index'),
    )

    and when I setup hue.ERROR:

    ImproperlyConfigured: Error importing middleware django.django_cas.django_cas.**m****iddleware: "No module named django_cas.django_cas.**middlewa****re"




    Could you help me please?


    thank.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouphue-user @
categorieshadoop
postedJul 30, '13 at 3:36a
activeAug 8, '13 at 2:03a
posts8
users2
websitecloudera.com
irc#hadoop

2 users in discussion

Abraham Elmahrek: 4 posts Kongzhenzhen: 4 posts

People

Translate

site design / logo © 2022 Grokbase