add a simple url shortener 00.00.01
authorymh <ymh.work@gmail.com>
Thu, 16 Jul 2015 18:05:22 +0200
changeset 23 16303a95fdb8
parent 22 3066ebed03ce
child 24 2fa5a51cb7c0
add a simple url shortener
server/src/remieplt/settings/__init__.py
server/src/remieplt/urls.py
server/virtualenv/res/lib/lib_create_env.py
server/virtualenv/res/src/django-url-shortener-0.1.tar.gz
server/virtualenv/web/res/requirements.txt
--- 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'
 )
 
--- 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<base62_id>[A-Za-z0-9]+)$', 'shortener.views.follow', name="shortener_follow")
+
 ]
 
 urlpatterns += staticfiles_urlpatterns()
--- 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':
Binary file server/virtualenv/res/src/django-url-shortener-0.1.tar.gz has changed
--- 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