PageRenderTime 14ms queryTime 43ms sortTime 4ms getByIdsTime 80ms findMatchingLines 25ms

100+ results results for 'email regex lang:python' (14 ms)

Not the results you expected?
completions.py https://gitlab.com/vectorci/gitsome | Python | 330 lines
                    
58    },
                    
59    'emails': {
                    
60        'desc': "Lists all the user's registered emails.",
                    
310    '10': 'limit: int (opt) limits the posts displayed',
                    
311    '"(?i)(Python|Django)"': ('regex_query: string (opt) applies a regular '
                    
312                              'expression comment filter'),
                    
                
http.py https://gitlab.com/briankiragu/django | Python | 376 lines
                    
9from binascii import Error as BinasciiError
                    
10from email.utils import formatdate
                    
11
                    
134    """
                    
135    # emails.Util.parsedate does the job for RFC1123 dates; unfortunately
                    
136    # RFC7231 makes it mandatory to support RFC850 dates too. So we roll
                    
137    # our own RFC-compliant parsing.
                    
138    for regex in RFC1123_DATE, RFC850_DATE, ASCTIME_DATE:
                    
139        m = regex.match(date)
                    
                
http.py https://gitlab.com/0072016/django-django | Python | 376 lines
                    
9from binascii import Error as BinasciiError
                    
10from email.utils import formatdate
                    
11
                    
134    """
                    
135    # emails.Util.parsedate does the job for RFC1123 dates; unfortunately
                    
136    # RFC7231 makes it mandatory to support RFC850 dates too. So we roll
                    
137    # our own RFC-compliant parsing.
                    
138    for regex in RFC1123_DATE, RFC850_DATE, ASCTIME_DATE:
                    
139        m = regex.match(date)
                    
                
0028_migrate_profile_picture_path.py https://github.com/lmorchard/mozillians.git | Python | 123 lines
                    
42            'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2013, 2, 13, 2, 22, 40, 378533)'}),
                    
43            'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
                    
44            'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
                    
95            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
                    
96            'is_regex': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
                    
97            'value': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
                    
                
diffcommit.py https://github.com/pombredanne/reviewboard.git | Python | 393 lines
                    
41    uri_object_key = 'commit_id'
                    
42    uri_object_key_regex = r'[A-Za-z0-9]{1,%s}' % COMMIT_ID_LENGTH
                    
43
                    
65        },
                    
66        'author_email': {
                    
67            'type': StringFieldType,
                    
83        },
                    
84        'committer_email': {
                    
85            'type': StringFieldType,
                    
                
forms.py https://github.com/chengwang/kitsune.git | Python | 195 lines
                    
49                        'max_length': USERNAME_LONG})
                    
50    email = forms.EmailField(label=_lazy(u'Email address:'),
                    
51                             error_messages={'required': EMAIL_REQUIRED,
                    
80        email = self.cleaned_data['email']
                    
81        if User.objects.filter(email=email).exists():
                    
82            raise forms.ValidationError(_('A user with that email address '
                    
178    """A simple form that requires an email address."""
                    
179    email = forms.EmailField(label=_lazy(u'Email address:'))
                    
180
                    
184    not the current user's email."""
                    
185    email = forms.EmailField(label=_lazy(u'Email address:'))
                    
186
                    
191    def clean_email(self):
                    
192        if self.user.email == self.cleaned_data['email']:
                    
193            raise forms.ValidationError(_('This is your current email.'))
                    
                
find_domain_arch.py https://github.com/ntamas/gfam.git | Python | 295 lines
                    
17__author__  = "Tamas Nepusz"
                    
18__email__   = "tamas@cs.rhul.ac.uk"
                    
19__copyright__ = "Copyright (c) 2010, Tamas Nepusz"
                    
70                default=None)
                    
71        parser.add_option("-r", "--seq-id-regexp", metavar="REGEXP",
                    
72                help="remap sequence IDs using REGEXP",
                    
72                help="remap sequence IDs using REGEXP",
                    
73                config_key="sequence_id_regexp",
                    
74                dest="sequence_id_regexp")
                    
205        unassigned_app = FindUnassignedApp()
                    
206        unassigned_app.set_sequence_id_regexp(self.options.sequence_id_regexp)
                    
207        unassigned_app.process_sequences_file(self.options.sequences_file)
                    
                
pages.py https://github.com/laurentb/weboob.git | Python | 207 lines
                    
27from weboob.browser.elements import ListElement, ItemElement, method
                    
28from weboob.browser.filters.standard import CleanText, Format, Regexp, Env, DateTime, Filter
                    
29from weboob.browser.filters.html import Link, Attr
                    
69            form = self.get_form(xpath='//form[@action="https://twitter.com/sessions"]')
                    
70            form['session[username_or_email]'] = login
                    
71            form['session[password]'] = passwd
                    
85    def get_me(self):
                    
86        return Regexp(Link('//a[@data-nav="view_profile"]'), '/(.+)')(self.doc)
                    
87
                    
100                                     replace=[('@ ', '@'), ('# ', '#'), ('http:// ', 'http://')]))
                    
101        obj_date = DateTime(Regexp(CleanText('//div[has-class("permalink-inner permalink-tweet-container")]/div/div/div[@class="client-and-actions"]/span/span'),
                    
102                                   '(\d+:\d+).+- (.+\d{4})',
                    
111
                    
112            obj_id = Regexp(Link('./div/div/small/a', default=''), '/.+/status/(.+)', default=None)
                    
113
                    
                
diffcommit.py https://github.com/reviewboard/reviewboard.git | Python | 393 lines
                    
41    uri_object_key = 'commit_id'
                    
42    uri_object_key_regex = r'[A-Za-z0-9]{1,%s}' % COMMIT_ID_LENGTH
                    
43
                    
65        },
                    
66        'author_email': {
                    
67            'type': StringFieldType,
                    
83        },
                    
84        'committer_email': {
                    
85            'type': StringFieldType,
                    
                
app.py https://github.com/dimagi/aremind.git | Python | 242 lines
                    
32
                    
33def daily_email_callback(router, *args, **kwargs):
                    
34    """
                    
34    """
                    
35    Send out daily email report of confirmed/unconfirmed appointments.
                    
36    """
                    
54        subject = subject_template.format(**context)
                    
55        body = render_to_string('reminders/emails/daily_report_message.html', context)
                    
56        group_name = settings.DEFAULT_DAILY_REPORT_GROUP_NAME
                    
58        if not created:
                    
59            emails = [c.email for c in group.contacts.all() if c.email]
                    
60            if emails:
                    
60            if emails:
                    
61                send_mail(subject, body, None, emails, fail_silently=True)
                    
62
                    
                
forms.py https://github.com/aruder77/applause.git | Python | 214 lines
                    
13    """
                    
14    username = forms.RegexField(label=_("Username"), max_length=30, regex=r'^[\w.@+-]+$',
                    
15        help_text = _("Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only."),
                    
47class UserChangeForm(forms.ModelForm):
                    
48    username = forms.RegexField(label=_("Username"), max_length=30, regex=r'^[\w.@+-]+$',
                    
49        help_text = _("Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only."),
                    
106class PasswordResetForm(forms.Form):
                    
107    email = forms.EmailField(label=_("E-mail"), max_length=75)
                    
108
                    
112        """
                    
113        email = self.cleaned_data["email"]
                    
114        self.users_cache = User.objects.filter(email__iexact=email)
                    
118
                    
119    def save(self, domain_override=None, email_template_name='registration/password_reset_email.html',
                    
120             use_https=False, token_generator=default_token_generator, from_email=None, request=None):
                    
                
deploy.py https://gitlab.com/gregtyka/server | Python | 283 lines
                    
71    else:
                    
72        email = raw_input("App Engine Email: ")
                    
73        password = getpass.getpass("Password for %s: " % email)
                    
73        password = getpass.getpass("Password for %s: " % email)
                    
74        return (email, password)
                    
75
                    
121    # to verify deploy is being sent from correct directory.
                    
122    regex = re.compile("^facebook_app_secret = '4362.+'$", re.MULTILINE)
                    
123    return regex.search(content)
                    
163
                    
164def deploy(version, email, password):
                    
165    print "Deploying version " + str(version)
                    
165    print "Deploying version " + str(version)
                    
166    return 0 == popen_return_code(['appcfg.py', '-V', str(version), "--no_oauth2", "-e", email, "--passin", "update", "."], "%s\n" % password)
                    
167
                    
                
__init__.py https://github.com/ceberhardt/surf.git | Python | 403 lines
                    
5# author: Cosmin Basca
                    
6# email: cosmin.basca@gmail.com
                    
7
                    
85    @classmethod
                    
86    def regex(cls, var, pattern, flag = None):
                    
87        if type(var) in [str, unicode] and var.startswith('?'): pass
                    
100
                    
101        return Filter('regex(%s,"%s"%s)' % (var, pattern, ',"%s"' % flag))
                    
102
                    
                
scrub.py https://gitlab.com/mailman/django-mailman3 | Python | 284 lines
                    
22from email.header import decode_header, make_header
                    
23from email.message import EmailMessage
                    
24from enum import Enum
                    
32SRE = re.compile(r'[^-\w.]')
                    
33# Regexp to strip out leading dots
                    
34DRE = re.compile(r'^\.*')
                    
58    """
                    
59    Given an EmailMessage, extract all the attachments including text/html
                    
60    parts and return the text.
                    
65    def __init__(self, msg):
                    
66        assert isinstance(msg, EmailMessage)
                    
67        self.msg = msg
                    
69    def scrub(self):
                    
70        """Given a EmailMessage, extracts the text from the body and all the
                    
71        attachments.
                    
                
0023_auto__del_field_userprofile_display_name.py https://github.com/pombredanne/mozillians.git | Python | 114 lines
                    
37            'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 10, 26, 3, 59, 45, 535301)'}),
                    
38            'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
                    
39            'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
                    
88            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
                    
89            'is_regex': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
                    
90            'value': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
                    
                
jsca2js.py https://github.com/navinpeiris/jsca2js.git | Python | 275 lines
                    
4__copyright__ = "Copyright 2011, Navin Peiris. All rights reserved."
                    
5__email__ = "navinpeiris@gmail.com"
                    
6__status__ = "Development"
                    
12
                    
13HTML_LINK_REGEX = '<a href=\"(.*?)\">(.*?)</a>'
                    
14HTML_TARGET_SUFFIX = '.html'
                    
31    result = jsDoc
                    
32    for linkMatcher in re.finditer(HTML_LINK_REGEX, jsDoc):
                    
33        htmlLink = linkMatcher.group(0)
                    
                
mail.py https://github.com/chandankumar2199/askbot-devel.git | Python | 137 lines
                    
22
                    
23def extract_first_email_address(text):
                    
24    """extract first matching email address
                    
27    """
                    
28    match = const.EMAIL_REGEX.search(text)
                    
29    if match:
                    
89
                    
90    if raise_on_failure is True, exceptions.EmailNotSent is raised
                    
91    """
                    
91    """
                    
92    prefix = askbot_settings.EMAIL_SUBJECT_PREFIX.strip() + ' '
                    
93    try:
                    
128    if hasattr(django_settings, 'DEFAULT_FROM_EMAIL'):
                    
129        from_email = django_settings.DEFAULT_FROM_EMAIL
                    
130
                    
                
test_membership.py https://gitlab.com/yamhill/mailman | Python | 274 lines
                    
101                          system_preferences.preferred_language))
                    
102        self.assertEqual(member.address.email, 'anne@example.com')
                    
103
                    
192        # mixed case address can't be subscribed.
                    
193        email = 'APerson@example.com'
                    
194        add_member(
                    
195            self._mlist,
                    
196            RequestRecord(email.lower(), 'Ann Person',
                    
197                          DeliveryMode.regular,
                    
204                              system_preferences.preferred_language))
                    
205        self.assertEqual(cm.exception.email, email)
                    
206
                    
222                              system_preferences.preferred_language))
                    
223        self.assertEqual(cm.exception.email, email.lower())
                    
224
                    
                
forms.py https://github.com/ron-panduwana/test_gae.git | Python | 131 lines
                    
20    domain = forms.RegexField(
                    
21        required=True, regex=regexps.RE_DOMAIN, label='www.',
                    
22        error_messages={'invalid': regexps.ERROR_DOMAIN})
                    
76    account = forms.RegexField(
                    
77        regex=regexps.RE_USERNAME, label=_('Administrator account'),
                    
78        error_messages={'invalid': regexps.ERROR_USERNAME})
                    
101            old_credentials = {
                    
102                'email': apps_domain.admin_email,
                    
103                'password': apps_domain.admin_password,
                    
107            if old_credentials:
                    
108                apps_domain.admin_email = old_credentials['email']
                    
109                apps_domain.admin_password = old_credentials['password']
                    
113            domain, self.service.service))
                    
114        apps_domain.admin_email = email
                    
115        apps_domain.admin_password = password
                    
                
http.py https://bitbucket.org/sanketsaurav/chqa.git | Python | 250 lines
                    
8from binascii import Error as BinasciiError
                    
9from email.utils import formatdate
                    
10
                    
116    """
                    
117    # emails.Util.parsedate does the job for RFC1123 dates; unfortunately
                    
118    # RFC2616 makes it mandatory to support RFC850 dates too. So we roll
                    
119    # our own RFC-compliant parsing.
                    
120    for regex in RFC1123_DATE, RFC850_DATE, ASCTIME_DATE:
                    
121        m = regex.match(date)
                    
                
0015_auto__del_repo__del_field_package_repo.py https://github.com/kennethlove/opencomparison.git | Python | 143 lines
                    
21        db.create_table('package_repo', (
                    
22            ('slug_regex', self.gf('django.db.models.fields.CharField')(max_length='100', blank=True)),
                    
23            ('description', self.gf('django.db.models.fields.TextField')(blank=True)),
                    
25            ('handler', self.gf('django.db.models.fields.CharField')(default='package.handlers.unsupported', max_length='200')),
                    
26            ('repo_regex', self.gf('django.db.models.fields.CharField')(max_length='100', blank=True)),
                    
27            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
                    
32            ('is_supported', self.gf('django.db.models.fields.BooleanField')(default=False)),
                    
33            ('user_regex', self.gf('django.db.models.fields.CharField')(max_length='100', blank=True)),
                    
34            ('is_other', self.gf('django.db.models.fields.BooleanField')(default=False)),
                    
58            'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
                    
59            'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
                    
60            'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
                    
                
__init__.py https://bitbucket.org/jspatrick/emacs.git | Python | 451 lines
                    
135In order to hone the accuracy of the translation of global variables, you will find two dictionary parameters below --
                    
136`global_var_include_regex` and `global_var_exclude_regex` -- which you can use to set a regular expression string
                    
137to tell the translator which global variables to share with the mel environment (i.e. which will use the get and set
                    
177are many more that i need to fix.  you'll know you hit the problem when you get this error: 'TypeError: iteration
                    
178over non-sequence'. just email me with commands that are giving you problems and i'll fix them as
                    
179quickly as i can.
                    
                
test_membership.py https://gitlab.com/amitt001/mailman | Python | 274 lines
                    
101                          system_preferences.preferred_language))
                    
102        self.assertEqual(member.address.email, 'anne@example.com')
                    
103
                    
192        # mixed case address can't be subscribed.
                    
193        email = 'APerson@example.com'
                    
194        add_member(
                    
195            self._mlist,
                    
196            RequestRecord(email.lower(), 'Ann Person',
                    
197                          DeliveryMode.regular,
                    
204                              system_preferences.preferred_language))
                    
205        self.assertEqual(cm.exception.email, email)
                    
206
                    
222                              system_preferences.preferred_language))
                    
223        self.assertEqual(cm.exception.email, email.lower())
                    
224
                    
                
tests.py https://code.google.com/p/pageforest/ | Python | 324 lines
                    
18
                    
19TAG_REGEX = re.compile(r'<[/!\w][^>]*>')
                    
20
                    
43
                    
44    Users: peter, paul (not email verified)
                    
45    Apps: www, myapp
                    
60        self.peter = User(key_name='peter', username='Peter',
                    
61                          email='peter@example.com',
                    
62                          email_verified=datetime.datetime.now())
                    
65        self.paul = User(key_name='paul', username='Paul',
                    
66                         email='paul@example.com')
                    
67        self.paul.set_password('paul_secret')
                    
141        """Extract the most meaningful parts from the response."""
                    
142        text = TAG_REGEX.sub(' ', response.content)
                    
143        lines = [line.strip() for line in text.splitlines() if line.strip()]
                    
                
test_membership.py https://gitlab.com/pratik4/mailman | Python | 274 lines
                    
101                          system_preferences.preferred_language))
                    
102        self.assertEqual(member.address.email, 'anne@example.com')
                    
103
                    
192        # mixed case address can't be subscribed.
                    
193        email = 'APerson@example.com'
                    
194        add_member(
                    
195            self._mlist,
                    
196            RequestRecord(email.lower(), 'Ann Person',
                    
197                          DeliveryMode.regular,
                    
204                              system_preferences.preferred_language))
                    
205        self.assertEqual(cm.exception.email, email)
                    
206
                    
222                              system_preferences.preferred_language))
                    
223        self.assertEqual(cm.exception.email, email.lower())
                    
224
                    
                
__init__.py https://github.com/atduskgreg/portable-google-app-engine-sdk.git | Python | 396 lines
                    
29  [('name', str),
                    
30   ('email', datastore_types.Email),
                    
31   ('birthdate', lambda x: datetime.datetime.fromtimestamp(float(x))),
                    
40  urlmap:
                    
41  - regex: /load
                    
42    handler:
                    
177         ('id_number', int),
                    
178         ('email', datastore_types.Email),
                    
179         ('user', users.User),
                    
                
__init__.py https://github.com/jchris/portable-google-app-engine-sdk.git | Python | 396 lines
                    
29  [('name', str),
                    
30   ('email', datastore_types.Email),
                    
31   ('birthdate', lambda x: datetime.datetime.fromtimestamp(float(x))),
                    
40  urlmap:
                    
41  - regex: /load
                    
42    handler:
                    
177         ('id_number', int),
                    
178         ('email', datastore_types.Email),
                    
179         ('user', users.User),
                    
                
0015_auto__del_repo__del_field_package_repo.py https://github.com/mrj0/opencomparison.git | Python | 143 lines
                    
21        db.create_table('package_repo', (
                    
22            ('slug_regex', self.gf('django.db.models.fields.CharField')(max_length='100', blank=True)),
                    
23            ('description', self.gf('django.db.models.fields.TextField')(blank=True)),
                    
25            ('handler', self.gf('django.db.models.fields.CharField')(default='package.handlers.unsupported', max_length='200')),
                    
26            ('repo_regex', self.gf('django.db.models.fields.CharField')(max_length='100', blank=True)),
                    
27            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
                    
32            ('is_supported', self.gf('django.db.models.fields.BooleanField')(default=False)),
                    
33            ('user_regex', self.gf('django.db.models.fields.CharField')(max_length='100', blank=True)),
                    
34            ('is_other', self.gf('django.db.models.fields.BooleanField')(default=False)),
                    
58            'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
                    
59            'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
                    
60            'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
                    
                
0015_auto__del_repo__del_field_package_repo.py https://github.com/pythonchelle/opencomparison.git | Python | 143 lines
                    
21        db.create_table('package_repo', (
                    
22            ('slug_regex', self.gf('django.db.models.fields.CharField')(max_length='100', blank=True)),
                    
23            ('description', self.gf('django.db.models.fields.TextField')(blank=True)),
                    
25            ('handler', self.gf('django.db.models.fields.CharField')(default='package.handlers.unsupported', max_length='200')),
                    
26            ('repo_regex', self.gf('django.db.models.fields.CharField')(max_length='100', blank=True)),
                    
27            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
                    
32            ('is_supported', self.gf('django.db.models.fields.BooleanField')(default=False)),
                    
33            ('user_regex', self.gf('django.db.models.fields.CharField')(max_length='100', blank=True)),
                    
34            ('is_other', self.gf('django.db.models.fields.BooleanField')(default=False)),
                    
58            'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
                    
59            'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
                    
60            'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
                    
                
forms.py https://github.com/liaowang11/django.git | Python | 215 lines
                    
13    """
                    
14    username = forms.RegexField(label=_("Username"), max_length=30, regex=r'^[\w.@+-]+$',
                    
15        help_text = _("Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only."),
                    
47class UserChangeForm(forms.ModelForm):
                    
48    username = forms.RegexField(label=_("Username"), max_length=30, regex=r'^[\w.@+-]+$',
                    
49        help_text = _("Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only."),
                    
107class PasswordResetForm(forms.Form):
                    
108    email = forms.EmailField(label=_("E-mail"), max_length=75)
                    
109
                    
113        """
                    
114        email = self.cleaned_data["email"]
                    
115        self.users_cache = User.objects.filter(email__iexact=email)
                    
119
                    
120    def save(self, domain_override=None, email_template_name='registration/password_reset_email.html',
                    
121             use_https=False, token_generator=default_token_generator, from_email=None, request=None):
                    
                
forms.py https://github.com/ramen/django.git | Python | 215 lines
                    
13    """
                    
14    username = forms.RegexField(label=_("Username"), max_length=30, regex=r'^[\w.@+-]+$',
                    
15        help_text = _("Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only."),
                    
47class UserChangeForm(forms.ModelForm):
                    
48    username = forms.RegexField(label=_("Username"), max_length=30, regex=r'^[\w.@+-]+$',
                    
49        help_text = _("Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only."),
                    
107class PasswordResetForm(forms.Form):
                    
108    email = forms.EmailField(label=_("E-mail"), max_length=75)
                    
109
                    
113        """
                    
114        email = self.cleaned_data["email"]
                    
115        self.users_cache = User.objects.filter(email__iexact=email)
                    
119
                    
120    def save(self, domain_override=None, email_template_name='registration/password_reset_email.html',
                    
121             use_https=False, token_generator=default_token_generator, from_email=None, request=None):
                    
                
forms.py https://github.com/sivy/django.git | Python | 215 lines
                    
13    """
                    
14    username = forms.RegexField(label=_("Username"), max_length=30, regex=r'^[\w.@+-]+$',
                    
15        help_text = _("Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only."),
                    
47class UserChangeForm(forms.ModelForm):
                    
48    username = forms.RegexField(label=_("Username"), max_length=30, regex=r'^[\w.@+-]+$',
                    
49        help_text = _("Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only."),
                    
107class PasswordResetForm(forms.Form):
                    
108    email = forms.EmailField(label=_("E-mail"), max_length=75)
                    
109
                    
113        """
                    
114        email = self.cleaned_data["email"]
                    
115        self.users_cache = User.objects.filter(email__iexact=email)
                    
119
                    
120    def save(self, domain_override=None, email_template_name='registration/password_reset_email.html',
                    
121             use_https=False, token_generator=default_token_generator, from_email=None, request=None):
                    
                
test_membership.py https://gitlab.com/DSpinellis/mailman | Python | 274 lines
                    
101                          system_preferences.preferred_language))
                    
102        self.assertEqual(member.address.email, 'anne@example.com')
                    
103
                    
192        # mixed case address can't be subscribed.
                    
193        email = 'APerson@example.com'
                    
194        add_member(
                    
195            self._mlist,
                    
196            RequestRecord(email.lower(), 'Ann Person',
                    
197                          DeliveryMode.regular,
                    
204                              system_preferences.preferred_language))
                    
205        self.assertEqual(cm.exception.email, email)
                    
206
                    
222                              system_preferences.preferred_language))
                    
223        self.assertEqual(cm.exception.email, email.lower())
                    
224
                    
                
test_membership.py https://gitlab.com/guptaabhinav206/mailman | Python | 274 lines
                    
101                          system_preferences.preferred_language))
                    
102        self.assertEqual(member.address.email, 'anne@example.com')
                    
103
                    
192        # mixed case address can't be subscribed.
                    
193        email = 'APerson@example.com'
                    
194        add_member(
                    
195            self._mlist,
                    
196            RequestRecord(email.lower(), 'Ann Person',
                    
197                          DeliveryMode.regular,
                    
204                              system_preferences.preferred_language))
                    
205        self.assertEqual(cm.exception.email, email)
                    
206
                    
222                              system_preferences.preferred_language))
                    
223        self.assertEqual(cm.exception.email, email.lower())
                    
224
                    
                
test_membership.py https://gitlab.com/sk7089775/mailman | Python | 274 lines
                    
101                          system_preferences.preferred_language))
                    
102        self.assertEqual(member.address.email, 'anne@example.com')
                    
103
                    
192        # mixed case address can't be subscribed.
                    
193        email = 'APerson@example.com'
                    
194        add_member(
                    
195            self._mlist,
                    
196            RequestRecord(email.lower(), 'Ann Person',
                    
197                          DeliveryMode.regular,
                    
204                              system_preferences.preferred_language))
                    
205        self.assertEqual(cm.exception.email, email)
                    
206
                    
222                              system_preferences.preferred_language))
                    
223        self.assertEqual(cm.exception.email, email.lower())
                    
224
                    
                
0023_auto__del_field_userprofile_display_name.py https://github.com/lmorchard/mozillians.git | Python | 114 lines
                    
37            'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 10, 26, 3, 59, 45, 535301)'}),
                    
38            'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
                    
39            'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
                    
88            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
                    
89            'is_regex': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
                    
90            'value': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
                    
                
forms.py https://bitbucket.org/xtchenhui/horizon-zte.git | Python | 196 lines
                    
62    name = forms.CharField(label=_("User Name"))
                    
63    email = forms.EmailField(label=_("Email"))
                    
64    password = forms.RegexField(
                    
66            widget=forms.PasswordInput(render_value=False),
                    
67            regex=validators.password_validator(),
                    
68            error_messages={'invalid': validators.password_validator_msg()})
                    
90                                                data['name'],
                    
91                                                data['email'],
                    
92                                                data['password'],
                    
115    name = forms.CharField(label=_("User Name"))
                    
116    email = forms.EmailField(label=_("Email"))
                    
117    password = forms.RegexField(label=_("Password"),
                    
118            widget=forms.PasswordInput(render_value=False),
                    
119            regex=validators.password_validator(),
                    
120            required=False,
                    
                
test_membership.py https://gitlab.com/levkowetz/mailman | Python | 274 lines
                    
101                          system_preferences.preferred_language))
                    
102        self.assertEqual(member.address.email, 'anne@example.com')
                    
103
                    
192        # mixed case address can't be subscribed.
                    
193        email = 'APerson@example.com'
                    
194        add_member(
                    
195            self._mlist,
                    
196            RequestRecord(email.lower(), 'Ann Person',
                    
197                          DeliveryMode.regular,
                    
204                              system_preferences.preferred_language))
                    
205        self.assertEqual(cm.exception.email, email)
                    
206
                    
222                              system_preferences.preferred_language))
                    
223        self.assertEqual(cm.exception.email, email.lower())
                    
224
                    
                
test_membership.py https://gitlab.com/sunny94/mailman | Python | 274 lines
                    
101                          system_preferences.preferred_language))
                    
102        self.assertEqual(member.address.email, 'anne@example.com')
                    
103
                    
192        # mixed case address can't be subscribed.
                    
193        email = 'APerson@example.com'
                    
194        add_member(
                    
195            self._mlist,
                    
196            RequestRecord(email.lower(), 'Ann Person',
                    
197                          DeliveryMode.regular,
                    
204                              system_preferences.preferred_language))
                    
205        self.assertEqual(cm.exception.email, email)
                    
206
                    
222                              system_preferences.preferred_language))
                    
223        self.assertEqual(cm.exception.email, email.lower())
                    
224
                    
                
test_membership.py https://gitlab.com/mmhat/mailman | Python | 274 lines
                    
101                          system_preferences.preferred_language))
                    
102        self.assertEqual(member.address.email, 'anne@example.com')
                    
103
                    
192        # mixed case address can't be subscribed.
                    
193        email = 'APerson@example.com'
                    
194        add_member(
                    
195            self._mlist,
                    
196            RequestRecord(email.lower(), 'Ann Person',
                    
197                          DeliveryMode.regular,
                    
204                              system_preferences.preferred_language))
                    
205        self.assertEqual(cm.exception.email, email)
                    
206
                    
222                              system_preferences.preferred_language))
                    
223        self.assertEqual(cm.exception.email, email.lower())
                    
224
                    
                
forms.py https://github.com/rohanza/django.git | Python | 215 lines
                    
13    """
                    
14    username = forms.RegexField(label=_("Username"), max_length=30, regex=r'^[\w.@+-]+$',
                    
15        help_text = _("Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only."),
                    
47class UserChangeForm(forms.ModelForm):
                    
48    username = forms.RegexField(label=_("Username"), max_length=30, regex=r'^[\w.@+-]+$',
                    
49        help_text = _("Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only."),
                    
107class PasswordResetForm(forms.Form):
                    
108    email = forms.EmailField(label=_("E-mail"), max_length=75)
                    
109
                    
113        """
                    
114        email = self.cleaned_data["email"]
                    
115        self.users_cache = User.objects.filter(email__iexact=email)
                    
119
                    
120    def save(self, domain_override=None, email_template_name='registration/password_reset_email.html',
                    
121             use_https=False, token_generator=default_token_generator, from_email=None, request=None):
                    
                
forms.py https://github.com/MediaSapiens/autonormix.git | Python | 214 lines
                    
13    """
                    
14    username = forms.RegexField(label=_("Username"), max_length=30, regex=r'^[\w.@+-]+$',
                    
15        help_text = _("Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only."),
                    
47class UserChangeForm(forms.ModelForm):
                    
48    username = forms.RegexField(label=_("Username"), max_length=30, regex=r'^[\w.@+-]+$',
                    
49        help_text = _("Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only."),
                    
106class PasswordResetForm(forms.Form):
                    
107    email = forms.EmailField(label=_("E-mail"), max_length=75)
                    
108
                    
112        """
                    
113        email = self.cleaned_data["email"]
                    
114        self.users_cache = User.objects.filter(email__iexact=email)
                    
118
                    
119    def save(self, domain_override=None, email_template_name='registration/password_reset_email.html',
                    
120             use_https=False, token_generator=default_token_generator, from_email=None, request=None):
                    
                
command.py https://gitlab.com/noc0lour/mailman | Python | 234 lines
                    
20# See the delivery diagram in IncomingRunner.py.  This module handles all
                    
21# email destined for mylist-request, -join, and -leave.  It no longer handles
                    
22# bounce messages (i.e. -admin or -bounces), nor does it handle mail to
                    
28from contextlib import suppress
                    
29from email.errors import HeaderParseError
                    
30from email.header import decode_header, make_header
                    
30from email.header import decode_header, make_header
                    
31from email.iterators import typed_subpart_iterator
                    
32from io import StringIO
                    
36from mailman.core.runner import Runner
                    
37from mailman.email.message import UserNotification
                    
38from mailman.interfaces.command import ContinueProcessing, IEmailResults
                    
64        elif subaddress == 'confirm':
                    
65            mo = re.match(config.mta.verp_confirm_regexp, msg.get('to', ''))
                    
66            if mo:
                    
                
0015_auto__del_repo__del_field_package_repo.py https://github.com/wwitzel3/opencomparison.git | Python | 143 lines
                    
21        db.create_table('package_repo', (
                    
22            ('slug_regex', self.gf('django.db.models.fields.CharField')(max_length='100', blank=True)),
                    
23            ('description', self.gf('django.db.models.fields.TextField')(blank=True)),
                    
25            ('handler', self.gf('django.db.models.fields.CharField')(default='package.handlers.unsupported', max_length='200')),
                    
26            ('repo_regex', self.gf('django.db.models.fields.CharField')(max_length='100', blank=True)),
                    
27            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
                    
32            ('is_supported', self.gf('django.db.models.fields.BooleanField')(default=False)),
                    
33            ('user_regex', self.gf('django.db.models.fields.CharField')(max_length='100', blank=True)),
                    
34            ('is_other', self.gf('django.db.models.fields.BooleanField')(default=False)),
                    
58            'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
                    
59            'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
                    
60            'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
                    
                
forms.py https://github.com/tjsavage/sfcsdatabase.git | Python | 215 lines
                    
13    """
                    
14    username = forms.RegexField(label=_("Username"), max_length=30, regex=r'^[\w.@+-]+$',
                    
15        help_text = _("Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only."),
                    
47class UserChangeForm(forms.ModelForm):
                    
48    username = forms.RegexField(label=_("Username"), max_length=30, regex=r'^[\w.@+-]+$',
                    
49        help_text = _("Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only."),
                    
107class PasswordResetForm(forms.Form):
                    
108    email = forms.EmailField(label=_("E-mail"), max_length=75)
                    
109
                    
113        """
                    
114        email = self.cleaned_data["email"]
                    
115        self.users_cache = User.objects.filter(email__iexact=email)
                    
119
                    
120    def save(self, domain_override=None, email_template_name='registration/password_reset_email.html',
                    
121             use_https=False, token_generator=default_token_generator, from_email=None, request=None):
                    
                
test_membership.py https://gitlab.com/josepperna/mailman | Python | 274 lines
                    
101                          system_preferences.preferred_language))
                    
102        self.assertEqual(member.address.email, 'anne@example.com')
                    
103
                    
192        # mixed case address can't be subscribed.
                    
193        email = 'APerson@example.com'
                    
194        add_member(
                    
195            self._mlist,
                    
196            RequestRecord(email.lower(), 'Ann Person',
                    
197                          DeliveryMode.regular,
                    
204                              system_preferences.preferred_language))
                    
205        self.assertEqual(cm.exception.email, email)
                    
206
                    
222                              system_preferences.preferred_language))
                    
223        self.assertEqual(cm.exception.email, email.lower())
                    
224
                    
                
forms.py https://github.com/arundhatisingh/Donate.git | Python | 214 lines
                    
13    """
                    
14    username = forms.RegexField(label=_("Username"), max_length=30, regex=r'^[\w.@+-]+$',
                    
15        help_text = _("Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only."),
                    
47class UserChangeForm(forms.ModelForm):
                    
48    username = forms.RegexField(label=_("Username"), max_length=30, regex=r'^[\w.@+-]+$',
                    
49        help_text = _("Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only."),
                    
106class PasswordResetForm(forms.Form):
                    
107    email = forms.EmailField(label=_("E-mail"), max_length=75)
                    
108
                    
112        """
                    
113        email = self.cleaned_data["email"]
                    
114        self.users_cache = User.objects.filter(email__iexact=email)
                    
118
                    
119    def save(self, domain_override=None, email_template_name='registration/password_reset_email.html',
                    
120             use_https=False, token_generator=default_token_generator, from_email=None, request=None):
                    
                
forms.py https://github.com/txm/potato.git | Python | 218 lines
                    
13    """
                    
14    username = forms.RegexField(label=_("Username"), max_length=30, regex=r'^[\w.@+-]+$',
                    
15        help_text = _("Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only."),
                    
47class UserChangeForm(forms.ModelForm):
                    
48    username = forms.RegexField(label=_("Username"), max_length=30, regex=r'^[\w.@+-]+$',
                    
49        help_text = _("Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only."),
                    
107class PasswordResetForm(forms.Form):
                    
108    email = forms.EmailField(label=_("E-mail"), max_length=75)
                    
109
                    
113        """
                    
114        email = self.cleaned_data["email"]
                    
115        self.users_cache = User.objects.filter(
                    
115        self.users_cache = User.objects.filter(
                    
116                                email__iexact=email,
                    
117                                is_active=True
                    
                
validators.py https://github.com/nrb/django.git | Python | 252 lines
                    
28        if regex is not None:
                    
29            self.regex = regex
                    
30        if message is not None:
                    
36        if isinstance(self.regex, basestring):
                    
37            self.regex = re.compile(self.regex)
                    
38
                    
42        """
                    
43        if not self.regex.search(smart_unicode(value)):
                    
44            raise ValidationError(self.message, code=self.code)
                    
141
                    
142class EmailValidator(RegexValidator):
                    
143
                    
164    r'|\[(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}\]$', re.IGNORECASE)  # literal form, ipv4 address (SMTP 4.1.3)
                    
165validate_email = EmailValidator(email_re, _(u'Enter a valid e-mail address.'), 'invalid')
                    
166
                    
                
sync_media_s3.py https://github.com/mpdaugherty/django-extensions.git | Python | 282 lines
                    
35TODO:
                    
36 * Use fnmatch (or regex) to allow more complex FILTER_LIST rules.
                    
37
                    
39import datetime
                    
40import email
                    
41import mimetypes
                    
252                # HTTP/1.0
                    
253                headers['Expires'] = '%s GMT' % (email.Utils.formatdate(
                    
254                    time.mktime((datetime.datetime.now() +
                    
                
debugerror.py https://github.com/yuroyoro/benchmark_asynchronous_servers.git | Python | 356 lines
                    
10
                    
11__all__ = ["debugerror", "djangoerror", "emailerrors"]
                    
12
                    
87        strClassName = strClassName.replace(/\-/g, "\\-");
                    
88        var oRegExp = new RegExp("(^|\\s)" + strClassName + "(\\s|$$)");
                    
89        var oElement;
                    
91            oElement = arrElements[i];
                    
92            if(oRegExp.test(oElement.className)){
                    
93                arrReturnElements.push(oElement);
                    
300
                    
301def emailerrors(to_address, olderror, from_address=None):
                    
302    """
                    
303    Wraps the old `internalerror` handler (pass as `olderror`) to 
                    
304    additionally email all errors to `to_address`, to aid in
                    
305    debugging production websites.
                    
                
forms.py https://bitbucket.org/rattray/anonbox.git | Python | 218 lines
                    
13    """
                    
14    username = forms.RegexField(label=_("Username"), max_length=30, regex=r'^[\w.@+-]+$',
                    
15        help_text = _("Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only."),
                    
47class UserChangeForm(forms.ModelForm):
                    
48    username = forms.RegexField(label=_("Username"), max_length=30, regex=r'^[\w.@+-]+$',
                    
49        help_text = _("Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only."),
                    
107class PasswordResetForm(forms.Form):
                    
108    email = forms.EmailField(label=_("E-mail"), max_length=75)
                    
109
                    
113        """
                    
114        email = self.cleaned_data["email"]
                    
115        self.users_cache = User.objects.filter(
                    
115        self.users_cache = User.objects.filter(
                    
116                                email__iexact=email,
                    
117                                is_active=True
                    
                
forms.py https://bitbucket.org/atmb4u/django-nonrel.git | Python | 218 lines
                    
13    """
                    
14    username = forms.RegexField(label=_("Username"), max_length=30, regex=r'^[\w.@+-]+$',
                    
15        help_text = _("Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only."),
                    
47class UserChangeForm(forms.ModelForm):
                    
48    username = forms.RegexField(label=_("Username"), max_length=30, regex=r'^[\w.@+-]+$',
                    
49        help_text = _("Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only."),
                    
107class PasswordResetForm(forms.Form):
                    
108    email = forms.EmailField(label=_("E-mail"), max_length=75)
                    
109
                    
113        """
                    
114        email = self.cleaned_data["email"]
                    
115        self.users_cache = User.objects.filter(
                    
115        self.users_cache = User.objects.filter(
                    
116                                email__iexact=email,
                    
117                                is_active=True
                    
                
forms.py https://bitbucket.org/Squazic/youwastetime.git | Python | 218 lines
                    
13    """
                    
14    username = forms.RegexField(label=_("Username"), max_length=30, regex=r'^[\w.@+-]+$',
                    
15        help_text = _("Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only."),
                    
47class UserChangeForm(forms.ModelForm):
                    
48    username = forms.RegexField(label=_("Username"), max_length=30, regex=r'^[\w.@+-]+$',
                    
49        help_text = _("Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only."),
                    
107class PasswordResetForm(forms.Form):
                    
108    email = forms.EmailField(label=_("E-mail"), max_length=75)
                    
109
                    
113        """
                    
114        email = self.cleaned_data["email"]
                    
115        self.users_cache = User.objects.filter(
                    
115        self.users_cache = User.objects.filter(
                    
116                                email__iexact=email,
                    
117                                is_active=True
                    
                
forms.py https://bitbucket.org/elissawolf92/hackpack.git | Python | 218 lines
                    
13    """
                    
14    username = forms.RegexField(label=_("Username"), max_length=30, regex=r'^[\w.@+-]+$',
                    
15        help_text = _("Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only."),
                    
47class UserChangeForm(forms.ModelForm):
                    
48    username = forms.RegexField(label=_("Username"), max_length=30, regex=r'^[\w.@+-]+$',
                    
49        help_text = _("Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only."),
                    
107class PasswordResetForm(forms.Form):
                    
108    email = forms.EmailField(label=_("E-mail"), max_length=75)
                    
109
                    
113        """
                    
114        email = self.cleaned_data["email"]
                    
115        self.users_cache = User.objects.filter(
                    
115        self.users_cache = User.objects.filter(
                    
116                                email__iexact=email,
                    
117                                is_active=True
                    
                
forms.py https://bitbucket.org/Squazic/homepage.git | Python | 218 lines
                    
13    """
                    
14    username = forms.RegexField(label=_("Username"), max_length=30, regex=r'^[\w.@+-]+$',
                    
15        help_text = _("Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only."),
                    
47class UserChangeForm(forms.ModelForm):
                    
48    username = forms.RegexField(label=_("Username"), max_length=30, regex=r'^[\w.@+-]+$',
                    
49        help_text = _("Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only."),
                    
107class PasswordResetForm(forms.Form):
                    
108    email = forms.EmailField(label=_("E-mail"), max_length=75)
                    
109
                    
113        """
                    
114        email = self.cleaned_data["email"]
                    
115        self.users_cache = User.objects.filter(
                    
115        self.users_cache = User.objects.filter(
                    
116                                email__iexact=email,
                    
117                                is_active=True
                    
                
forms.py https://bitbucket.org/ColonolPwns/bittches-be-hatin.git | Python | 218 lines
                    
13    """
                    
14    username = forms.RegexField(label=_("Username"), max_length=30, regex=r'^[\w.@+-]+$',
                    
15        help_text = _("Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only."),
                    
47class UserChangeForm(forms.ModelForm):
                    
48    username = forms.RegexField(label=_("Username"), max_length=30, regex=r'^[\w.@+-]+$',
                    
49        help_text = _("Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only."),
                    
107class PasswordResetForm(forms.Form):
                    
108    email = forms.EmailField(label=_("E-mail"), max_length=75)
                    
109
                    
113        """
                    
114        email = self.cleaned_data["email"]
                    
115        self.users_cache = User.objects.filter(
                    
115        self.users_cache = User.objects.filter(
                    
116                                email__iexact=email,
                    
117                                is_active=True
                    
                
forms.py https://bitbucket.org/rattray/hackpack-nodocs.git | Python | 218 lines
                    
13    """
                    
14    username = forms.RegexField(label=_("Username"), max_length=30, regex=r'^[\w.@+-]+$',
                    
15        help_text = _("Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only."),
                    
47class UserChangeForm(forms.ModelForm):
                    
48    username = forms.RegexField(label=_("Username"), max_length=30, regex=r'^[\w.@+-]+$',
                    
49        help_text = _("Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only."),
                    
107class PasswordResetForm(forms.Form):
                    
108    email = forms.EmailField(label=_("E-mail"), max_length=75)
                    
109
                    
113        """
                    
114        email = self.cleaned_data["email"]
                    
115        self.users_cache = User.objects.filter(
                    
115        self.users_cache = User.objects.filter(
                    
116                                email__iexact=email,
                    
117                                is_active=True
                    
                
forms.py https://bitbucket.org/rattray/hackpack.git | Python | 218 lines
                    
13    """
                    
14    username = forms.RegexField(label=_("Username"), max_length=30, regex=r'^[\w.@+-]+$',
                    
15        help_text = _("Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only."),
                    
47class UserChangeForm(forms.ModelForm):
                    
48    username = forms.RegexField(label=_("Username"), max_length=30, regex=r'^[\w.@+-]+$',
                    
49        help_text = _("Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only."),
                    
107class PasswordResetForm(forms.Form):
                    
108    email = forms.EmailField(label=_("E-mail"), max_length=75)
                    
109
                    
113        """
                    
114        email = self.cleaned_data["email"]
                    
115        self.users_cache = User.objects.filter(
                    
115        self.users_cache = User.objects.filter(
                    
116                                email__iexact=email,
                    
117                                is_active=True
                    
                
common.py https://gitlab.com/adam.lukaitis/muzei | Python | 397 lines
                    
31import datetime
                    
32from email import utils as email_utils
                    
33import logging
                    
43_GCS_BUCKET_REGEX_BASE = r'[a-z0-9\.\-_]{3,63}'
                    
44_GCS_BUCKET_REGEX = re.compile(_GCS_BUCKET_REGEX_BASE + r'$')
                    
45_GCS_BUCKET_PATH_REGEX = re.compile(r'/' + _GCS_BUCKET_REGEX_BASE + r'$')
                    
45_GCS_BUCKET_PATH_REGEX = re.compile(r'/' + _GCS_BUCKET_REGEX_BASE + r'$')
                    
46_GCS_PATH_PREFIX_REGEX = re.compile(r'/' + _GCS_BUCKET_REGEX_BASE + r'.*')
                    
47_GCS_FULLPATH_REGEX = re.compile(r'/' + _GCS_BUCKET_REGEX_BASE + r'/.*')
                    
178  _validate_path(name)
                    
179  if not _GCS_BUCKET_REGEX.match(name):
                    
180    raise ValueError('Bucket should be 3-63 characters long using only a-z,'
                    
295  if http_time is not None:
                    
296    return email_utils.mktime_tz(email_utils.parsedate_tz(http_time))
                    
297
                    
                
mail_mail.py https://gitlab.com/padjis/mapan | Python | 106 lines
                    
8
                    
9from odoo.addons.link_tracker.models.link_tracker import URL_REGEX
                    
10
                    
38
                    
39    def _get_unsubscribe_url(self, email_to):
                    
40        base_url = self.env['ir.config_parameter'].sudo().get_param('web.base.url')
                    
46                    'res_id': self.res_id,
                    
47                    'email': email_to,
                    
48                    'token': self.mailing_id._unsubscribe_token(
                    
48                    'token': self.mailing_id._unsubscribe_token(
                    
49                        self.res_id, email_to),
                    
50                }),
                    
88        if self.mailing_id and res.get('body') and res.get('email_to'):
                    
89            emails = tools.email_split(res.get('email_to')[0])
                    
90            email_to = emails and emails[0] or False
                    
                
0033_auto__add_field_userprofile_privacy_date_mozillian.py https://github.com/lmorchard/mozillians.git | Python | 134 lines
                    
37            'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2013, 7, 18, 7, 2, 42, 311664)'}),
                    
38            'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
                    
39            'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
                    
90            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
                    
91            'is_regex': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
                    
92            'value': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
                    
115            'privacy_date_mozillian': ('django.db.models.fields.PositiveIntegerField', [], {'default': '3'}),
                    
116            'privacy_email': ('django.db.models.fields.PositiveIntegerField', [], {'default': '3'}),
                    
117            'privacy_full_name': ('django.db.models.fields.PositiveIntegerField', [], {'default': '3'}),
                    
                
test_membership.py https://gitlab.com/fpeyre/mailman | Python | 274 lines
                    
101                          system_preferences.preferred_language))
                    
102        self.assertEqual(member.address.email, 'anne@example.com')
                    
103
                    
192        # mixed case address can't be subscribed.
                    
193        email = 'APerson@example.com'
                    
194        add_member(
                    
195            self._mlist,
                    
196            RequestRecord(email.lower(), 'Ann Person',
                    
197                          DeliveryMode.regular,
                    
204                              system_preferences.preferred_language))
                    
205        self.assertEqual(cm.exception.email, email)
                    
206
                    
222                              system_preferences.preferred_language))
                    
223        self.assertEqual(cm.exception.email, email.lower())
                    
224
                    
                
test_membership.py https://gitlab.com/ellmetha/mailman | Python | 274 lines
                    
101                          system_preferences.preferred_language))
                    
102        self.assertEqual(member.address.email, 'anne@example.com')
                    
103
                    
192        # mixed case address can't be subscribed.
                    
193        email = 'APerson@example.com'
                    
194        add_member(
                    
195            self._mlist,
                    
196            RequestRecord(email.lower(), 'Ann Person',
                    
197                          DeliveryMode.regular,
                    
204                              system_preferences.preferred_language))
                    
205        self.assertEqual(cm.exception.email, email)
                    
206
                    
222                              system_preferences.preferred_language))
                    
223        self.assertEqual(cm.exception.email, email.lower())
                    
224
                    
                
test_db.py https://gitlab.com/unofficial-mirrors/edx-platform | Python | 239 lines
                    
68                    try:
                    
69                        User.objects.get(username='student', email='student@edx.org')
                    
70                    except User.DoesNotExist:
                    
77
                    
78                    __, created = User.objects.get_or_create(username='student', email='student@edx.org')
                    
79                except Exception as exception:  # pylint: disable=broad-except
                    
113
                    
114        with self.assertRaisesRegexp(TransactionManagementError, 'Cannot be inside an atomic block.'):
                    
115            with atomic():
                    
117
                    
118        with self.assertRaisesRegexp(TransactionManagementError, 'Cannot be inside an atomic block.'):
                    
119            with outer_atomic():
                    
134
                    
135        with self.assertRaisesRegexp(TransactionManagementError, 'Cannot change isolation level when nested.'):
                    
136            with commit_on_success():
                    
                
forms.py https://github.com/tjsavage/tmrwmedia.git | Python | 214 lines
                    
13    """
                    
14    username = forms.RegexField(label=_("Username"), max_length=30, regex=r'^[\w.@+-]+$',
                    
15        help_text = _("Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only."),
                    
47class UserChangeForm(forms.ModelForm):
                    
48    username = forms.RegexField(label=_("Username"), max_length=30, regex=r'^[\w.@+-]+$',
                    
49        help_text = _("Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only."),
                    
106class PasswordResetForm(forms.Form):
                    
107    email = forms.EmailField(label=_("E-mail"), max_length=75)
                    
108
                    
112        """
                    
113        email = self.cleaned_data["email"]
                    
114        self.users_cache = User.objects.filter(email__iexact=email)
                    
118
                    
119    def save(self, domain_override=None, email_template_name='registration/password_reset_email.html',
                    
120             use_https=False, token_generator=default_token_generator, from_email=None, request=None):
                    
                
test_error_messages.py https://gitlab.com/asmjahid/django | Python | 274 lines
                    
6    BooleanField, CharField, ChoiceField, DateField, DateTimeField,
                    
7    DecimalField, EmailField, FileField, FloatField, Form,
                    
8    GenericIPAddressField, IntegerField, ModelChoiceField,
                    
8    GenericIPAddressField, IntegerField, ModelChoiceField,
                    
9    ModelMultipleChoiceField, MultipleChoiceField, RegexField,
                    
10    SplitDateTimeField, TimeField, URLField, ValidationError, utils,
                    
111
                    
112    def test_regexfield(self):
                    
113        e = {
                    
118        }
                    
119        f = RegexField(r'^[0-9]+$', min_length=5, max_length=10, error_messages=e)
                    
120        self.assertFormErrors(['REQUIRED'], f.clean, '')
                    
124
                    
125    def test_emailfield(self):
                    
126        e = {
                    
                
validators.py https://github.com/defcube/django-1.git | Python | 252 lines
                    
28        if regex is not None:
                    
29            self.regex = regex
                    
30        if message is not None:
                    
36        if isinstance(self.regex, basestring):
                    
37            self.regex = re.compile(self.regex)
                    
38
                    
42        """
                    
43        if not self.regex.search(smart_unicode(value)):
                    
44            raise ValidationError(self.message, code=self.code)
                    
141
                    
142class EmailValidator(RegexValidator):
                    
143
                    
164    r'|\[(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}\]$', re.IGNORECASE)  # literal form, ipv4 address (SMTP 4.1.3)
                    
165validate_email = EmailValidator(email_re, _(u'Enter a valid e-mail address.'), 'invalid')
                    
166
                    
                
forms.py https://bitbucket.org/vanujan016/v-nu016.git | Python | 218 lines
                    
13    """
                    
14    username = forms.RegexField(label=_("Username"), max_length=30, regex=r'^[\w.@+-]+$',
                    
15        help_text = _("Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only."),
                    
47class UserChangeForm(forms.ModelForm):
                    
48    username = forms.RegexField(label=_("Username"), max_length=30, regex=r'^[\w.@+-]+$',
                    
49        help_text = _("Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only."),
                    
107class PasswordResetForm(forms.Form):
                    
108    email = forms.EmailField(label=_("E-mail"), max_length=75)
                    
109
                    
113        """
                    
114        email = self.cleaned_data["email"]
                    
115        self.users_cache = User.objects.filter(
                    
115        self.users_cache = User.objects.filter(
                    
116                                email__iexact=email,
                    
117                                is_active=True
                    
                
forms.py https://bitbucket.org/abhimskywalker/hackpack.git | Python | 218 lines
                    
13    """
                    
14    username = forms.RegexField(label=_("Username"), max_length=30, regex=r'^[\w.@+-]+$',
                    
15        help_text = _("Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only."),
                    
47class UserChangeForm(forms.ModelForm):
                    
48    username = forms.RegexField(label=_("Username"), max_length=30, regex=r'^[\w.@+-]+$',
                    
49        help_text = _("Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only."),
                    
107class PasswordResetForm(forms.Form):
                    
108    email = forms.EmailField(label=_("E-mail"), max_length=75)
                    
109
                    
113        """
                    
114        email = self.cleaned_data["email"]
                    
115        self.users_cache = User.objects.filter(
                    
115        self.users_cache = User.objects.filter(
                    
116                                email__iexact=email,
                    
117                                is_active=True
                    
                
forms.py https://bitbucket.org/inirudebwoy/gdziebylkaziu.git | Python | 120 lines
                    
31    
                    
32    username = forms.RegexField(regex=r'^[\w.@+-]+$',
                    
33                                max_length=30,
                    
35                                error_messages={'invalid': _("This value may contain only letters, numbers and @/./+/-/_ characters.")})
                    
36    email = forms.EmailField(label=_("E-mail"))
                    
37    password1 = forms.CharField(widget=forms.PasswordInput,
                    
90        """
                    
91        if User.objects.filter(email__iexact=self.cleaned_data['email']):
                    
92            raise forms.ValidationError(_("This email address is already in use. Please supply a different email address."))
                    
116        """
                    
117        email_domain = self.cleaned_data['email'].split('@')[1]
                    
118        if email_domain in self.bad_domains:
                    
118        if email_domain in self.bad_domains:
                    
119            raise forms.ValidationError(_("Registration using free email addresses is prohibited. Please supply a different email address."))
                    
120        return self.cleaned_data['email']
                    
                
forms.py https://bitbucket.org/andrewlvov/django-registration-custom.git | Python | 120 lines
                    
31    
                    
32    username = forms.RegexField(regex=r'^[\w.@+-]+$',
                    
33                                max_length=30,
                    
35                                error_messages={'invalid': _("This value may contain only letters, numbers and @/./+/-/_ characters.")})
                    
36    email = forms.EmailField(label=_("E-mail"))
                    
37    password1 = forms.CharField(widget=forms.PasswordInput,
                    
90        """
                    
91        if User.objects.filter(email__iexact=self.cleaned_data['email']):
                    
92            raise forms.ValidationError(_("This email address is already in use. Please supply a different email address."))
                    
116        """
                    
117        email_domain = self.cleaned_data['email'].split('@')[1]
                    
118        if email_domain in self.bad_domains:
                    
118        if email_domain in self.bad_domains:
                    
119            raise forms.ValidationError(_("Registration using free email addresses is prohibited. Please supply a different email address."))
                    
120        return self.cleaned_data['email']
                    
                
forms.py https://github.com/cleanweb/green-tomatoe.git | Python | 218 lines
                    
13    """
                    
14    username = forms.RegexField(label=_("Username"), max_length=30, regex=r'^[\w.@+-]+$',
                    
15        help_text = _("Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only."),
                    
47class UserChangeForm(forms.ModelForm):
                    
48    username = forms.RegexField(label=_("Username"), max_length=30, regex=r'^[\w.@+-]+$',
                    
49        help_text = _("Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only."),
                    
107class PasswordResetForm(forms.Form):
                    
108    email = forms.EmailField(label=_("E-mail"), max_length=75)
                    
109
                    
113        """
                    
114        email = self.cleaned_data["email"]
                    
115        self.users_cache = User.objects.filter(
                    
115        self.users_cache = User.objects.filter(
                    
116                                email__iexact=email,
                    
117                                is_active=True
                    
                
inlinepatterns.py https://github.com/mfferreira/titanium_mobile.git | Python | 371 lines
                    
9
                    
10    pattern.getCompiledRegExp() # returns a regular expression
                    
11
                    
135
                    
136    def getCompiledRegExp (self):
                    
137        """ Return a compiled regular expression. """
                    
350        el = markdown.etree.Element('a')
                    
351        email = m.group(2)
                    
352        if email.startswith("mailto:"):
                    
352        if email.startswith("mailto:"):
                    
353            email = email[len("mailto:"):]
                    
354
                    
362
                    
363        letters = [codepoint2name(ord(letter)) for letter in email]
                    
364        el.text = markdown.AtomicString(''.join(letters))
                    
                
views.py https://github.com/eric-brechemier/django.git | Python | 191 lines
                    
38            # not be allowed, but things like /view/?param=http://example.com 
                    
39            # should be allowed. This regex checks if there is a '//' *before* a
                    
40            # question mark.
                    
105def password_reset(request, is_admin_site=False, template_name='registration/password_reset_form.html',
                    
106        email_template_name='registration/password_reset_email.html',
                    
107        password_reset_form=PasswordResetForm, token_generator=default_token_generator,
                    
107        password_reset_form=PasswordResetForm, token_generator=default_token_generator,
                    
108        post_reset_redirect=None, from_email=None):
                    
109    if post_reset_redirect is None:
                    
116            opts['token_generator'] = token_generator
                    
117            opts['from_email'] = from_email
                    
118            if is_admin_site:
                    
120            else:
                    
121                opts['email_template_name'] = email_template_name
                    
122                if not Site._meta.installed:
                    
                
test_membership.py https://gitlab.com/khushbuparakh/mailman | Python | 274 lines
                    
101                          system_preferences.preferred_language))
                    
102        self.assertEqual(member.address.email, 'anne@example.com')
                    
103
                    
192        # mixed case address can't be subscribed.
                    
193        email = 'APerson@example.com'
                    
194        add_member(
                    
195            self._mlist,
                    
196            RequestRecord(email.lower(), 'Ann Person',
                    
197                          DeliveryMode.regular,
                    
204                              system_preferences.preferred_language))
                    
205        self.assertEqual(cm.exception.email, email)
                    
206
                    
222                              system_preferences.preferred_language))
                    
223        self.assertEqual(cm.exception.email, email.lower())
                    
224
                    
                
forms.py https://github.com/ghber/My-Django-Nonrel.git | Python | 218 lines
                    
13    """
                    
14    username = forms.RegexField(label=_("Username"), max_length=30, regex=r'^[\w.@+-]+$',
                    
15        help_text = _("Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only."),
                    
47class UserChangeForm(forms.ModelForm):
                    
48    username = forms.RegexField(label=_("Username"), max_length=30, regex=r'^[\w.@+-]+$',
                    
49        help_text = _("Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only."),
                    
107class PasswordResetForm(forms.Form):
                    
108    email = forms.EmailField(label=_("E-mail"), max_length=75)
                    
109
                    
113        """
                    
114        email = self.cleaned_data["email"]
                    
115        self.users_cache = User.objects.filter(
                    
115        self.users_cache = User.objects.filter(
                    
116                                email__iexact=email,
                    
117                                is_active=True
                    
                
forms.py https://bitbucket.org/abhenderson/hackpack-nodocs.git | Python | 218 lines
                    
13    """
                    
14    username = forms.RegexField(label=_("Username"), max_length=30, regex=r'^[\w.@+-]+$',
                    
15        help_text = _("Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only."),
                    
47class UserChangeForm(forms.ModelForm):
                    
48    username = forms.RegexField(label=_("Username"), max_length=30, regex=r'^[\w.@+-]+$',
                    
49        help_text = _("Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only."),
                    
107class PasswordResetForm(forms.Form):
                    
108    email = forms.EmailField(label=_("E-mail"), max_length=75)
                    
109
                    
113        """
                    
114        email = self.cleaned_data["email"]
                    
115        self.users_cache = User.objects.filter(
                    
115        self.users_cache = User.objects.filter(
                    
116                                email__iexact=email,
                    
117                                is_active=True
                    
                
forms.py https://bitbucket.org/cbenson/hackpack.git | Python | 218 lines
                    
13    """
                    
14    username = forms.RegexField(label=_("Username"), max_length=30, regex=r'^[\w.@+-]+$',
                    
15        help_text = _("Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only."),
                    
47class UserChangeForm(forms.ModelForm):
                    
48    username = forms.RegexField(label=_("Username"), max_length=30, regex=r'^[\w.@+-]+$',
                    
49        help_text = _("Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only."),
                    
107class PasswordResetForm(forms.Form):
                    
108    email = forms.EmailField(label=_("E-mail"), max_length=75)
                    
109
                    
113        """
                    
114        email = self.cleaned_data["email"]
                    
115        self.users_cache = User.objects.filter(
                    
115        self.users_cache = User.objects.filter(
                    
116                                email__iexact=email,
                    
117                                is_active=True
                    
                
forms.py https://bitbucket.org/cbenson/hackpack-nodocs.git | Python | 218 lines
                    
13    """
                    
14    username = forms.RegexField(label=_("Username"), max_length=30, regex=r'^[\w.@+-]+$',
                    
15        help_text = _("Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only."),
                    
47class UserChangeForm(forms.ModelForm):
                    
48    username = forms.RegexField(label=_("Username"), max_length=30, regex=r'^[\w.@+-]+$',
                    
49        help_text = _("Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only."),
                    
107class PasswordResetForm(forms.Form):
                    
108    email = forms.EmailField(label=_("E-mail"), max_length=75)
                    
109
                    
113        """
                    
114        email = self.cleaned_data["email"]
                    
115        self.users_cache = User.objects.filter(
                    
115        self.users_cache = User.objects.filter(
                    
116                                email__iexact=email,
                    
117                                is_active=True
                    
                
forms.py https://bitbucket.org/tribbettz/hackpack.git | Python | 218 lines
                    
13    """
                    
14    username = forms.RegexField(label=_("Username"), max_length=30, regex=r'^[\w.@+-]+$',
                    
15        help_text = _("Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only."),
                    
47class UserChangeForm(forms.ModelForm):
                    
48    username = forms.RegexField(label=_("Username"), max_length=30, regex=r'^[\w.@+-]+$',
                    
49        help_text = _("Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only."),
                    
107class PasswordResetForm(forms.Form):
                    
108    email = forms.EmailField(label=_("E-mail"), max_length=75)
                    
109
                    
113        """
                    
114        email = self.cleaned_data["email"]
                    
115        self.users_cache = User.objects.filter(
                    
115        self.users_cache = User.objects.filter(
                    
116                                email__iexact=email,
                    
117                                is_active=True
                    
                
forms.py https://bitbucket.org/aatifh/tatooine-p.git | Python | 218 lines
                    
13    """
                    
14    username = forms.RegexField(label=_("Username"), max_length=30, regex=r'^[\w.@+-]+$',
                    
15        help_text = _("Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only."),
                    
47class UserChangeForm(forms.ModelForm):
                    
48    username = forms.RegexField(label=_("Username"), max_length=30, regex=r'^[\w.@+-]+$',
                    
49        help_text = _("Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only."),
                    
107class PasswordResetForm(forms.Form):
                    
108    email = forms.EmailField(label=_("E-mail"), max_length=75)
                    
109
                    
113        """
                    
114        email = self.cleaned_data["email"]
                    
115        self.users_cache = User.objects.filter(
                    
115        self.users_cache = User.objects.filter(
                    
116                                email__iexact=email,
                    
117                                is_active=True
                    
                
forms.py https://bitbucket.org/whyknot/hackpack.git | Python | 218 lines
                    
13    """
                    
14    username = forms.RegexField(label=_("Username"), max_length=30, regex=r'^[\w.@+-]+$',
                    
15        help_text = _("Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only."),
                    
47class UserChangeForm(forms.ModelForm):
                    
48    username = forms.RegexField(label=_("Username"), max_length=30, regex=r'^[\w.@+-]+$',
                    
49        help_text = _("Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only."),
                    
107class PasswordResetForm(forms.Form):
                    
108    email = forms.EmailField(label=_("E-mail"), max_length=75)
                    
109
                    
113        """
                    
114        email = self.cleaned_data["email"]
                    
115        self.users_cache = User.objects.filter(
                    
115        self.users_cache = User.objects.filter(
                    
116                                email__iexact=email,
                    
117                                is_active=True
                    
                
forms.py https://bitbucket.org/joncchen/hackpack-nodocs.git | Python | 218 lines
                    
13    """
                    
14    username = forms.RegexField(label=_("Username"), max_length=30, regex=r'^[\w.@+-]+$',
                    
15        help_text = _("Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only."),
                    
47class UserChangeForm(forms.ModelForm):
                    
48    username = forms.RegexField(label=_("Username"), max_length=30, regex=r'^[\w.@+-]+$',
                    
49        help_text = _("Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only."),
                    
107class PasswordResetForm(forms.Form):
                    
108    email = forms.EmailField(label=_("E-mail"), max_length=75)
                    
109
                    
113        """
                    
114        email = self.cleaned_data["email"]
                    
115        self.users_cache = User.objects.filter(
                    
115        self.users_cache = User.objects.filter(
                    
116                                email__iexact=email,
                    
117                                is_active=True
                    
                
models.py https://github.com/kd7lxl/memrec.git | Python | 149 lines
                    
1from django.db import models
                    
2from django.core.validators import RegexValidator
                    
3
                    
7phone_re = re.compile(r'^[\d]{10}$')
                    
8validate_phone = RegexValidator(phone_re, (u"Enter a 10-digit phone number with no punctuation."), 'invalid')
                    
9
                    
10hostname_re = re.compile(r'^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z]|[A-Za-z][A-Za-z0-9\-]*[A-Za-z0-9])$')
                    
11validate_hostname = RegexValidator(hostname_re, (u"Enter a valid hostname."), 'invalid')
                    
12
                    
91
                    
92class EmailAddress(models.Model):
                    
93    person = models.ForeignKey(Person)
                    
93    person = models.ForeignKey(Person)
                    
94    email_address = models.EmailField()
                    
95    
                    
                
validators.py https://bitbucket.org/ducopdep/tiny_blog.git | Python | 252 lines
                    
28        if regex is not None:
                    
29            self.regex = regex
                    
30        if message is not None:
                    
36        if isinstance(self.regex, basestring):
                    
37            self.regex = re.compile(self.regex)
                    
38
                    
42        """
                    
43        if not self.regex.search(smart_unicode(value)):
                    
44            raise ValidationError(self.message, code=self.code)
                    
141
                    
142class EmailValidator(RegexValidator):
                    
143
                    
164    r'|\[(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}\]$', re.IGNORECASE)  # literal form, ipv4 address (SMTP 4.1.3)
                    
165validate_email = EmailValidator(email_re, _(u'Enter a valid e-mail address.'), 'invalid')
                    
166
                    
                
validators.py https://bitbucket.org/ducopdep/tiny_blog.git | Python | 252 lines
                    
28        if regex is not None:
                    
29            self.regex = regex
                    
30        if message is not None:
                    
36        if isinstance(self.regex, basestring):
                    
37            self.regex = re.compile(self.regex)
                    
38
                    
42        """
                    
43        if not self.regex.search(smart_unicode(value)):
                    
44            raise ValidationError(self.message, code=self.code)
                    
141
                    
142class EmailValidator(RegexValidator):
                    
143
                    
164    r'|\[(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}\]$', re.IGNORECASE)  # literal form, ipv4 address (SMTP 4.1.3)
                    
165validate_email = EmailValidator(email_re, _(u'Enter a valid e-mail address.'), 'invalid')
                    
166
                    
                
validators.py https://bitbucket.org/pcelta/python-django.git | Python | 252 lines
                    
28        if regex is not None:
                    
29            self.regex = regex
                    
30        if message is not None:
                    
36        if isinstance(self.regex, basestring):
                    
37            self.regex = re.compile(self.regex)
                    
38
                    
42        """
                    
43        if not self.regex.search(smart_unicode(value)):
                    
44            raise ValidationError(self.message, code=self.code)
                    
141
                    
142class EmailValidator(RegexValidator):
                    
143
                    
164    r'|\[(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}\]$', re.IGNORECASE)  # literal form, ipv4 address (SMTP 4.1.3)
                    
165validate_email = EmailValidator(email_re, _(u'Enter a valid e-mail address.'), 'invalid')
                    
166
                    
                
validators.py https://bitbucket.org/pcelta/python-django.git | Python | 252 lines
                    
28        if regex is not None:
                    
29            self.regex = regex
                    
30        if message is not None:
                    
36        if isinstance(self.regex, basestring):
                    
37            self.regex = re.compile(self.regex)
                    
38
                    
42        """
                    
43        if not self.regex.search(smart_unicode(value)):
                    
44            raise ValidationError(self.message, code=self.code)
                    
141
                    
142class EmailValidator(RegexValidator):
                    
143
                    
164    r'|\[(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}\]$', re.IGNORECASE)  # literal form, ipv4 address (SMTP 4.1.3)
                    
165validate_email = EmailValidator(email_re, _(u'Enter a valid e-mail address.'), 'invalid')
                    
166
                    
                
_encoded_words.py https://github.com/albertz/CPython.git | Python | 233 lines
                    
46from string import ascii_letters, digits
                    
47from email import errors
                    
48
                    
62
                    
63# regex based decoder.
                    
64_q_byte_subber = functools.partial(re.compile(br'=([a-fA-F0-9]{2})').sub,
                    
                
forms.py https://github.com/Terhands/django.git | Python | 215 lines
                    
13    """
                    
14    username = forms.RegexField(label=_("Username"), max_length=30, regex=r'^[\w.@+-]+$',
                    
15        help_text = _("Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only."),
                    
47class UserChangeForm(forms.ModelForm):
                    
48    username = forms.RegexField(label=_("Username"), max_length=30, regex=r'^[\w.@+-]+$',
                    
49        help_text = _("Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only."),
                    
107class PasswordResetForm(forms.Form):
                    
108    email = forms.EmailField(label=_("E-mail"), max_length=75)
                    
109
                    
113        """
                    
114        email = self.cleaned_data["email"]
                    
115        self.users_cache = User.objects.filter(email__iexact=email)
                    
119
                    
120    def save(self, domain_override=None, email_template_name='registration/password_reset_email.html',
                    
121             use_https=False, token_generator=default_token_generator, from_email=None, request=None):
                    
                
test_membership.py https://gitlab.com/alex1007/mailman | Python | 274 lines
                    
101                          system_preferences.preferred_language))
                    
102        self.assertEqual(member.address.email, 'anne@example.com')
                    
103
                    
192        # mixed case address can't be subscribed.
                    
193        email = 'APerson@example.com'
                    
194        add_member(
                    
195            self._mlist,
                    
196            RequestRecord(email.lower(), 'Ann Person',
                    
197                          DeliveryMode.regular,
                    
204                              system_preferences.preferred_language))
                    
205        self.assertEqual(cm.exception.email, email)
                    
206
                    
222                              system_preferences.preferred_language))
                    
223        self.assertEqual(cm.exception.email, email.lower())
                    
224
                    
                
forms.py https://github.com/twiglet/twigletweb.git | Python | 218 lines
                    
13    """
                    
14    username = forms.RegexField(label=_("Username"), max_length=30, regex=r'^[\w.@+-]+$',
                    
15        help_text = _("Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only."),
                    
47class UserChangeForm(forms.ModelForm):
                    
48    username = forms.RegexField(label=_("Username"), max_length=30, regex=r'^[\w.@+-]+$',
                    
49        help_text = _("Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only."),
                    
107class PasswordResetForm(forms.Form):
                    
108    email = forms.EmailField(label=_("E-mail"), max_length=75)
                    
109
                    
113        """
                    
114        email = self.cleaned_data["email"]
                    
115        self.users_cache = User.objects.filter(
                    
115        self.users_cache = User.objects.filter(
                    
116                                email__iexact=email,
                    
117                                is_active=True
                    
                
validators.py https://github.com/theosp/google_appengine.git | Python | 252 lines
                    
28        if regex is not None:
                    
29            self.regex = regex
                    
30        if message is not None:
                    
36        if isinstance(self.regex, basestring):
                    
37            self.regex = re.compile(self.regex)
                    
38
                    
42        """
                    
43        if not self.regex.search(smart_unicode(value)):
                    
44            raise ValidationError(self.message, code=self.code)
                    
141
                    
142class EmailValidator(RegexValidator):
                    
143
                    
164    r'|\[(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}\]$', re.IGNORECASE)  # literal form, ipv4 address (SMTP 4.1.3)
                    
165validate_email = EmailValidator(email_re, _(u'Enter a valid e-mail address.'), 'invalid')
                    
166
                    
                
inlinepatterns.py https://github.com/broady/cuter.git | Python | 371 lines
                    
9
                    
10    pattern.getCompiledRegExp() # returns a regular expression
                    
11
                    
135
                    
136    def getCompiledRegExp (self):
                    
137        """ Return a compiled regular expression. """
                    
350        el = markdown.etree.Element('a')
                    
351        email = m.group(2)
                    
352        if email.startswith("mailto:"):
                    
352        if email.startswith("mailto:"):
                    
353            email = email[len("mailto:"):]
                    
354
                    
362
                    
363        letters = [codepoint2name(ord(letter)) for letter in email]
                    
364        el.text = markdown.AtomicString(''.join(letters))
                    
                
__init__.py https://github.com/netconstructor/DeforestationAnalysisTool.git | Python | 226 lines
                    
19
                    
20from wtforms.validators import Email, email, EqualTo, equal_to, \
                    
21    IPAddress, ip_address, Length, length, NumberRange, number_range, \
                    
21    IPAddress, ip_address, Length, length, NumberRange, number_range, \
                    
22    Optional, optional, Required, required, Regexp, regexp, \
                    
23    URL, url, AnyOf, any_of, NoneOf, none_of
                    
                
widgets.py https://github.com/socialplanning/opencore-listen.git | Python | 309 lines
                    
11from Products.CMFPlone.utils import getSiteEncoding
                    
12from Products.listen.lib.common import email_regex
                    
13
                    
250    """A version of the removal widget that will accept entries that may be
                    
251      simple email addresses and not exclusively member ids.
                    
252
                    
267
                    
268    But, if we add a simple email address::
                    
269        >>> widget.setRenderedValue((u'test1','tester@example.com'))
                    
286                info = None
                    
287            if info is None and email_regex.match(entry):
                    
288                info = {'id': entry, 'name': entry, 'fullname': '',
                    
                
validators.py https://bitbucket.org/ssaltzman/poet.git | Python | 190 lines
                    
25        if regex is not None:
                    
26            self.regex = regex
                    
27        if message is not None:
                    
32        if isinstance(self.regex, basestring):
                    
33            self.regex = re.compile(regex)
                    
34
                    
45
                    
46class URLValidator(RegexValidator):
                    
47    regex = re.compile(
                    
115
                    
116class EmailValidator(RegexValidator):
                    
117
                    
137    r')@(?:[A-Z0-9](?:[A-Z0-9-]{0,61}[A-Z0-9])?\.)+[A-Z]{2,6}\.?$', re.IGNORECASE)  # domain
                    
138validate_email = EmailValidator(email_re, _(u'Enter a valid e-mail address.'), 'invalid')
                    
139
                    
                
validators.py https://bitbucket.org/ssaltzman/poet.git | Python | 190 lines
                    
25        if regex is not None:
                    
26            self.regex = regex
                    
27        if message is not None:
                    
32        if isinstance(self.regex, basestring):
                    
33            self.regex = re.compile(regex)
                    
34
                    
45
                    
46class URLValidator(RegexValidator):
                    
47    regex = re.compile(
                    
115
                    
116class EmailValidator(RegexValidator):
                    
117
                    
137    r')@(?:[A-Z0-9](?:[A-Z0-9-]{0,61}[A-Z0-9])?\.)+[A-Z]{2,6}\.?$', re.IGNORECASE)  # domain
                    
138validate_email = EmailValidator(email_re, _(u'Enter a valid e-mail address.'), 'invalid')
                    
139
                    
                
forms.py https://github.com/phektus/Django-Google-AppEngine-OpenId-Auth.git | Python | 218 lines
                    
13    """
                    
14    username = forms.RegexField(label=_("Username"), max_length=30, regex=r'^[\w.@+-]+$',
                    
15        help_text = _("Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only."),
                    
47class UserChangeForm(forms.ModelForm):
                    
48    username = forms.RegexField(label=_("Username"), max_length=30, regex=r'^[\w.@+-]+$',
                    
49        help_text = _("Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only."),
                    
107class PasswordResetForm(forms.Form):
                    
108    email = forms.EmailField(label=_("E-mail"), max_length=75)
                    
109
                    
113        """
                    
114        email = self.cleaned_data["email"]
                    
115        self.users_cache = User.objects.filter(
                    
115        self.users_cache = User.objects.filter(
                    
116                                email__iexact=email,
                    
117                                is_active=True
                    
                
forms.py https://github.com/monkeini/django.git | Python | 215 lines
                    
13    """
                    
14    username = forms.RegexField(label=_("Username"), max_length=30, regex=r'^[\w.@+-]+$',
                    
15        help_text = _("Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only."),
                    
47class UserChangeForm(forms.ModelForm):
                    
48    username = forms.RegexField(label=_("Username"), max_length=30, regex=r'^[\w.@+-]+$',
                    
49        help_text = _("Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only."),
                    
107class PasswordResetForm(forms.Form):
                    
108    email = forms.EmailField(label=_("E-mail"), max_length=75)
                    
109
                    
113        """
                    
114        email = self.cleaned_data["email"]
                    
115        self.users_cache = User.objects.filter(email__iexact=email)
                    
119
                    
120    def save(self, domain_override=None, email_template_name='registration/password_reset_email.html',
                    
121             use_https=False, token_generator=default_token_generator, from_email=None, request=None):
                    
                
forms.py https://github.com/gabrielgrant/django.git | Python | 215 lines
                    
13    """
                    
14    username = forms.RegexField(label=_("Username"), max_length=30, regex=r'^[\w.@+-]+$',
                    
15        help_text = _("Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only."),
                    
47class UserChangeForm(forms.ModelForm):
                    
48    username = forms.RegexField(label=_("Username"), max_length=30, regex=r'^[\w.@+-]+$',
                    
49        help_text = _("Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only."),
                    
107class PasswordResetForm(forms.Form):
                    
108    email = forms.EmailField(label=_("E-mail"), max_length=75)
                    
109
                    
113        """
                    
114        email = self.cleaned_data["email"]
                    
115        self.users_cache = User.objects.filter(email__iexact=email)
                    
119
                    
120    def save(self, domain_override=None, email_template_name='registration/password_reset_email.html',
                    
121             use_https=False, token_generator=default_token_generator, from_email=None, request=None):
                    
                
forms.py https://github.com/arvindcbe/django.git | Python | 215 lines
                    
13    """
                    
14    username = forms.RegexField(label=_("Username"), max_length=30, regex=r'^[\w.@+-]+$',
                    
15        help_text = _("Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only."),
                    
47class UserChangeForm(forms.ModelForm):
                    
48    username = forms.RegexField(label=_("Username"), max_length=30, regex=r'^[\w.@+-]+$',
                    
49        help_text = _("Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only."),
                    
107class PasswordResetForm(forms.Form):
                    
108    email = forms.EmailField(label=_("E-mail"), max_length=75)
                    
109
                    
113        """
                    
114        email = self.cleaned_data["email"]
                    
115        self.users_cache = User.objects.filter(email__iexact=email)
                    
119
                    
120    def save(self, domain_override=None, email_template_name='registration/password_reset_email.html',
                    
121             use_https=False, token_generator=default_token_generator, from_email=None, request=None):
                    
                
__init__.py https://github.com/rtnpro/askbot-devel.git | Python | 393 lines
                    
82            body_text = None,
                    
83            from_email = django_settings.DEFAULT_FROM_EMAIL,
                    
84            recipient_list = None,
                    
335        if form.is_valid():
                    
336            email_address = form.cleaned_data['email']
                    
337            user = User.objects.get(
                    
337            user = User.objects.get(
                    
338                        email__iexact = email_address
                    
339                    )
                    
375    except User.DoesNotExist:
                    
376        bounce_email(email_address, subject, reason = 'unknown_user')
                    
377    except User.MultipleObjectsReturned:
                    
377    except User.MultipleObjectsReturned:
                    
378        bounce_email(email_address, subject, reason = 'problem_posting')
                    
379    except PermissionDenied, error:
                    
                
pages.py https://gitlab.com/phyks/weboob | Python | 207 lines
                    
28from weboob.browser.elements import ListElement, ItemElement, method
                    
29from weboob.browser.filters.standard import CleanText, Format, Regexp, Env, DateTime, Filter
                    
30from weboob.browser.filters.html import Link, Attr
                    
69            form = self.get_form(xpath='//form[@action="https://twitter.com/sessions"]')
                    
70            form['session[username_or_email]'] = login
                    
71            form['session[password]'] = passwd
                    
85    def get_me(self):
                    
86        return Regexp(Link('//a[@data-nav="view_profile"]'), '/(.+)')(self.doc)
                    
87
                    
100                                     replace=[('@ ', '@'), ('# ', '#'), ('http:// ', 'http://')]))
                    
101        obj_date = DateTime(Regexp(CleanText('//div[has-class("permalink-inner permalink-tweet-container")]/div/div/div[@class="client-and-actions"]/span/span'),
                    
102                                   '(\d+:\d+).+- (.+\d{4})',
                    
111
                    
112            obj_id = Regexp(Link('./div/div/small/a', default=''), '/.+/status/(.+)', default=None)
                    
113
                    
                
test_membership.py https://gitlab.com/Soumya97/mailman | Python | 274 lines
                    
101                          system_preferences.preferred_language))
                    
102        self.assertEqual(member.address.email, 'anne@example.com')
                    
103
                    
192        # mixed case address can't be subscribed.
                    
193        email = 'APerson@example.com'
                    
194        add_member(
                    
195            self._mlist,
                    
196            RequestRecord(email.lower(), 'Ann Person',
                    
197                          DeliveryMode.regular,
                    
204                              system_preferences.preferred_language))
                    
205        self.assertEqual(cm.exception.email, email)
                    
206
                    
222                              system_preferences.preferred_language))
                    
223        self.assertEqual(cm.exception.email, email.lower())
                    
224
                    
                
test_membership.py https://gitlab.com/nikhilrayaprolu/mailman | Python | 274 lines
                    
101                          system_preferences.preferred_language))
                    
102        self.assertEqual(member.address.email, 'anne@example.com')
                    
103
                    
192        # mixed case address can't be subscribed.
                    
193        email = 'APerson@example.com'
                    
194        add_member(
                    
195            self._mlist,
                    
196            RequestRecord(email.lower(), 'Ann Person',
                    
197                          DeliveryMode.regular,
                    
204                              system_preferences.preferred_language))
                    
205        self.assertEqual(cm.exception.email, email)
                    
206
                    
222                              system_preferences.preferred_language))
                    
223        self.assertEqual(cm.exception.email, email.lower())
                    
224
                    
                
 

Source

Language