# HG changeset patch # User ymh # Date 1437062722 -7200 # Node ID 16303a95fdb8ec46ce298149af4dc474c5ce29bc # Parent 3066ebed03cea4db288fef44fca4c2359702198a add a simple url shortener diff -r 3066ebed03ce -r 16303a95fdb8 server/src/remieplt/settings/__init__.py --- a/server/src/remieplt/settings/__init__.py Thu Jul 16 16:17:54 2015 +0200 +++ b/server/src/remieplt/settings/__init__.py Thu Jul 16 18:05:22 2015 +0200 @@ -58,6 +58,7 @@ 'ldt.management', 'ldt.indexation', 'chunked_uploads', + 'shortener', 'remie' ) diff -r 3066ebed03ce -r 16303a95fdb8 server/src/remieplt/urls.py --- a/server/src/remieplt/urls.py Thu Jul 16 16:17:54 2015 +0200 +++ b/server/src/remieplt/urls.py Thu Jul 16 18:05:22 2015 +0200 @@ -45,18 +45,20 @@ url(r'^accounts/cas/login/$', 'django_cas_ng.views.login'), url(r'^accounts/cas/logout/$', 'django_cas_ng.views.logout'), url(r'^oauth/', include('oauth_provider.urls')), - + url(r'^remie/iframetester$', RemieIframeTesterView.as_view(), name="remie_iframe_tester"), - + url(r'^remie/workunit/segments$', RemieSegmentsView.as_view(), name="remie_segment"), url(r'^remie/workunit/groupsegment$', RemieSegmentsView.as_view(), name="remie_groupsegment"), url(r'^remie/workunit/marker', RemieSegmentsView.as_view(), name="remie_marker"), url(r'^remie/workunit/teacher', RemieSegmentsView.as_view(), name="remie_teacher"), - + url(r'^/?$', RedirectView.as_view(url='ldt'), name="remie_iframe_container"), url(r'^jsi18n/$', 'django.views.i18n.javascript_catalog', js_info_dict), + url(r'^short/(?P[A-Za-z0-9]+)$', 'shortener.views.follow', name="shortener_follow") + ] urlpatterns += staticfiles_urlpatterns() diff -r 3066ebed03ce -r 16303a95fdb8 server/virtualenv/res/lib/lib_create_env.py --- a/server/virtualenv/res/lib/lib_create_env.py Thu Jul 16 16:17:54 2015 +0200 +++ b/server/virtualenv/res/lib/lib_create_env.py Thu Jul 16 18:05:22 2015 +0200 @@ -55,6 +55,7 @@ 'PYTHON-MIMEPARSE': { 'setup': 'python-mimeparse', 'url': 'https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-0.1.4.tar.gz', 'local' : 'python-mimeparse-0.1.4.tar.gz', 'install': {'method': 'pip', 'option_str': None, 'dict_extra_env': None}}, 'REQUESTS-OAUTHLIB': { 'setup': 'requests-oauthlib', 'url': 'https://github.com/requests/requests-oauthlib/archive/v0.5.0.tar.gz', 'local' : 'requests-oauthlib-0.5.0.tar.gz', 'install': {'method': 'pip', 'option_str': None, 'dict_extra_env': None}}, 'DJANGO_CAS_NG': {'setup': 'django-cas-ng', 'url': 'https://github.com/mingchen/django-cas-ng/archive/v3.4.2.tar.gz', 'local':'django-cas-ng-3.4.2.tar.gz', 'install': {'method': 'pip', 'option_str': None, 'dict_extra_env': None}}, + 'DJANGO_URL_SHORTENER': {'setup': 'django-url-shortener', 'url': 'https://github.com/IRI-Research/django-url-shortener/archive/0.1.tar.gz', 'local': 'django-url-shortener-0.1.tar.gz', 'install': {'method': 'pip', 'option_str': None, 'dict_extra_env': None}}, } if system_str == 'Windows': diff -r 3066ebed03ce -r 16303a95fdb8 server/virtualenv/res/src/django-url-shortener-0.1.tar.gz Binary file server/virtualenv/res/src/django-url-shortener-0.1.tar.gz has changed diff -r 3066ebed03ce -r 16303a95fdb8 server/virtualenv/web/res/requirements.txt --- a/server/virtualenv/web/res/requirements.txt Thu Jul 16 16:17:54 2015 +0200 +++ b/server/virtualenv/web/res/requirements.txt Thu Jul 16 18:05:22 2015 +0200 @@ -13,6 +13,7 @@ django-taggit-templatetags===0.4.5dev-r0 django-tastypie==0.12.2 django-templatetag-sugar==1.0 +django-url-shortener==0.1 elasticsearch==1.4.0 httplib2==0.9.1 lxml==3.2.1