<commit_before>from django.conf.urls import patterns, include, url
from django.conf import settings
from django.conf.urls.static import static
from django.core.urlresolvers import reverse_lazy
from django.views.generic import RedirectView

from django.contrib import admin
admin.autodiscover()


urlpatterns = patterns('',

    url(r'', include('social.apps.django_app.urls', namespace='social')),
    
    # API
    url(r'^usernames/(?P<username>\w+)/$','api.views.username_availability',name='username_availability'),
    url(r'^users/social-data/(?P<backend>\w+)/$','api.views.fetch_social_data',name='fetch_social_data'),
    url(r'^users/refresh-social-data/(?P<backend>\w+)/$','api.views.refresh_social_data',name='refresh_social_data'),
    url(r'^users/save-data$','api.views.save_data'),
    url(r'^users/get-data$','api.views.get_resume_data'),

    # test api
    url(r'^fb-graph-test/$','api.views.fb_graph_test'),
    url(r'^github-api-test/$','api.views.github_api_test'),
    url(r'^linkedin-api-test/$','api.views.linkedin_api_test'),

    # forget password implementation
    url(r'^forgot-password/$','api.views.password_reset_middleware', name='forgot_password'),

    url(r'^users/password/reset/$', 'django.contrib.auth.views.password_reset', 
        {'post_reset_redirect' : '/users/password/reset/done/'}),
    url(r'^users/password/reset/done/$', 'django.contrib.auth.views.password_reset_done'),
    url(r'^users/password/reset/(?P<uidb64>[0-9A-Za-z]+)-(?P<token>.+)/$', 'django.contrib.auth.views.password_reset_confirm', 
        {'post_reset_redirect' : '/users/password/done/'}),
    url(r'^users/password/done/$', 'django.contrib.auth.views.password_reset_complete'),


    url(r'^$', 'api.views.home',name='home'),
    url(r'^signup/(?P<backend>[^/]+)/$', 'api.views.signup', name='signup'),
    url(r'^signup/$' , RedirectView.as_view(url='/signup/username/')),
    url(r'^email-sent/', 'api.views.validation_sent'),

    url(r'^resumizr-login/(?P<backend>[^/]+)/$', 'api.views.username_login', name='username_login'),
    
    url(r'^login/$','api.views.login', name='login'),
    url(r'^logout/$','api.views.logout', name='logout'),
    url(r'^app/$','api.views.app',name='app'),
    url(r'^admin/', include(admin.site.urls)),
    url(r'^generate/cvform/$','api.views.generateForm', name='generateform'),
    url(r'^preview/cv/$','api.views.previewCv', name='preview'),
    url(r'^landing_page/','api.views.landing_page', name='landing_page'),

)

#development media server
if settings.DEBUG:
    urlpatterns += patterns(
        'django.views.static',
        (r'media/(?P<path>.*)',
        'serve',
        {'document_root': settings.MEDIA_ROOT}), )<commit_msg>added url for pdf generation from user-resume-data<commit_after>from django.conf.urls import patterns, include, url
from django.conf import settings
from django.conf.urls.static import static
from django.core.urlresolvers import reverse_lazy
from django.views.generic import RedirectView

from django.contrib import admin
admin.autodiscover()


urlpatterns = patterns('',

    url(r'', include('social.apps.django_app.urls', namespace='social')),
    
    # API
    url(r'^usernames/(?P<username>\w+)/$','api.views.username_availability',name='username_availability'),
    url(r'^users/social-data/(?P<backend>\w+)/$','api.views.fetch_social_data',name='fetch_social_data'),
    url(r'^users/refresh-social-data/(?P<backend>\w+)/$','api.views.refresh_social_data',name='refresh_social_data'),
    url(r'^users/save-data$','api.views.save_data'),
    url(r'^users/get-data$','api.views.get_resume_data'),

    # test api
    url(r'^fb-graph-test/$','api.views.fb_graph_test'),
    url(r'^github-api-test/$','api.views.github_api_test'),
    url(r'^linkedin-api-test/$','api.views.linkedin_api_test'),

    # forget password implementation
    url(r'^forgot-password/$','api.views.password_reset_middleware', name='forgot_password'),

    url(r'^users/password/reset/$', 'django.contrib.auth.views.password_reset', 
        {'post_reset_redirect' : '/users/password/reset/done/'}),
    url(r'^users/password/reset/done/$', 'django.contrib.auth.views.password_reset_done'),
    url(r'^users/password/reset/(?P<uidb64>[0-9A-Za-z]+)-(?P<token>.+)/$', 'django.contrib.auth.views.password_reset_confirm', 
        {'post_reset_redirect' : '/users/password/done/'}),
    url(r'^users/password/done/$', 'django.contrib.auth.views.password_reset_complete'),


    url(r'^$', 'api.views.home',name='home'),
    url(r'^signup/(?P<backend>[^/]+)/$', 'api.views.signup', name='signup'),
    url(r'^signup/$' , RedirectView.as_view(url='/signup/username/')),
    url(r'^email-sent/', 'api.views.validation_sent'),

    url(r'^resumizr-login/(?P<backend>[^/]+)/$', 'api.views.username_login', name='username_login'),
    
    url(r'^login/$','api.views.login', name='login'),
    url(r'^logout/$','api.views.logout', name='logout'),
    url(r'^app/$','api.views.app',name='app'),
    url(r'^admin/', include(admin.site.urls)),
    url(r'^generate/cvform/$','api.views.generateForm', name='generateform'),
    url(r'^write/cv_to_pdf/$','pdfconvertor.views.writepdf', name='writepdf'),
    url(r'^preview/cv/$','api.views.previewCv', name='preview'),
    url(r'^landing_page/','api.views.landing_page', name='landing_page'),

)

#development media server
if settings.DEBUG:
    urlpatterns += patterns(
        'django.views.static',
        (r'media/(?P<path>.*)',
        'serve',
        {'document_root': settings.MEDIA_ROOT}), )
{'fraction_non_alphanumeric': 0.21545157780195864, 'fraction_numerical': 0.0014508523757707653, 'mean_word_length': 4.9364908503767495, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5476258', 'n_tokens_mistral': 1981, 'n_tokens_neox': 1906, 'n_words': 202}