<commit_before>from django.contrib import messages
from django.core.urlresolvers import reverse, resolve
from django.http import HttpResponseRedirect

from tower import ugettext as _


class ProfileMiddleware(object):
    def process_request(self, request):
        try:
            path = u'/%s' % ('/'.join(request.path.split('/')[2:]),)
            match = resolve(path)
            if match.url_name in ('users_edit', 'django.views.static.serve'):
                return
        except:
            return
        if request.user.is_authenticated():
            profile = request.user.get_profile()
            if profile.display_name == profile.masked_email:
                msg = _('''<strong>Almost done!</strong>
                Just fill in a bit of profile information and
                you\'ll be all set. At a minimum you\'ll need
                to enter a display name so we know what to call<commit_msg>Include users_signout in list of views not filtered by profilemiddleware.<commit_after>from django.contrib import messages
from django.core.urlresolvers import reverse, resolve
from django.http import HttpResponseRedirect

from tower import ugettext as _


class ProfileMiddleware(object):
    def process_request(self, request):
        try:
            path = u'/%s' % ('/'.join(request.path.split('/')[2:]),)
            match = resolve(path)
            if match.url_name in ('users_edit', 'django.views.static.serve',
                                  'users_signout'):
                return
        except:
            return
        if request.user.is_authenticated():
            profile = request.user.get_profile()
            if profile.display_name == profile.masked_email:
                msg = _('''<strong>Almost done!</strong>
                Just fill in a bit of profile information and
                you\'ll be all set. At a minimum you\'ll need
                to enter a display name so we know what to call
{'fraction_non_alphanumeric': 0.09226037929267042, 'fraction_numerical': 0.0010251153254741158, 'mean_word_length': 2.128205128205128, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7028918', 'n_tokens_mistral': 509, 'n_tokens_neox': 493, 'n_words': 161}