Changed additional regexes to r strings.
- Legacy-Id: 16377
This commit is contained in:
parent
0589d0b313
commit
b7690fbdcd
|
@ -66,7 +66,7 @@ class ModelResource(tastypie.resources.ModelResource):
|
|||
return "%s:%s:%s:%s" % (self._meta.api_name, self._meta.resource_name, ':'.join(args), smooshed)
|
||||
|
||||
|
||||
TIMEDELTA_REGEX = re.compile('^(?P<days>\d+d)?\s?(?P<hours>\d+h)?\s?(?P<minutes>\d+m)?\s?(?P<seconds>\d+s?)$')
|
||||
TIMEDELTA_REGEX = re.compile(r'^(?P<days>\d+d)?\s?(?P<hours>\d+h)?\s?(?P<minutes>\d+m)?\s?(?P<seconds>\d+s?)$')
|
||||
|
||||
class TimedeltaField(ApiField):
|
||||
dehydrated_type = 'timedelta'
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# Copyright The IETF Trust 2012-2019, All Rights Reserved
|
||||
|
||||
from ietf.doc import views_conflict_review, views_doc
|
||||
from ietf.utils.urls import url
|
||||
|
@ -6,7 +7,7 @@ urlpatterns = [
|
|||
url(r'^state/$', views_conflict_review.change_state),
|
||||
url(r'^submit/$', views_conflict_review.submit),
|
||||
url(r'^ad/$', views_conflict_review.edit_ad),
|
||||
url(r'^approve/$', views_conflict_review.approve),
|
||||
url(r'^approve/$', views_conflict_review.approve_conflict_review),
|
||||
url(r'^start_conflict_review/$', views_conflict_review.start_review),
|
||||
url(r'^telechat/$', views_doc.telechat_date, name='ietf.doc.views_doc.telechat_date;conflict-review'),
|
||||
url(r'^notices/$', views_doc.edit_notify, name='ietf.doc.views_doc.edit_notify;conflict-review'),
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# Copyright The IETF Trust 2014-2019, All Rights Reserved
|
||||
import datetime
|
||||
import email
|
||||
|
||||
|
@ -107,12 +108,12 @@ class DraftForm(forms.ModelForm):
|
|||
help_texts = { 'sections': 'Sections' }
|
||||
|
||||
validate_patent_number = RegexValidator(
|
||||
regex=("^("
|
||||
"([A-Z][A-Z]\d\d/\d{6}"
|
||||
"|[A-Z][A-Z]\d{6,12}([A-Z]\d?)?"
|
||||
"|[A-Z][A-Z]\d{4}(\w{1,2}\d{5,7})?"
|
||||
"|[A-Z][A-Z]\d{15}"
|
||||
")[, ]*)+$"),
|
||||
regex=(r"^("
|
||||
r"([A-Z][A-Z]\d\d/\d{6}"
|
||||
r"|[A-Z][A-Z]\d{6,12}([A-Z]\d?)?"
|
||||
r"|[A-Z][A-Z]\d{4}(\w{1,2}\d{5,7})?"
|
||||
r"|[A-Z][A-Z]\d{15}"
|
||||
r")[, ]*)+$"),
|
||||
message="Please enter one or more patent publication or application numbers as country code and serial number, e.g.: US62/123456 or WO2017123456." )
|
||||
|
||||
def validate_string(s, letter_min, digit_min, space_min, message):
|
||||
|
|
|
@ -1,13 +1,14 @@
|
|||
# Copyright The IETF Trust 2016-2019, All Rights Reserved
|
||||
from django.conf import settings
|
||||
|
||||
from ietf.stats import views
|
||||
from ietf.utils.urls import url
|
||||
|
||||
urlpatterns = [
|
||||
url("^$", views.stats_index),
|
||||
url("^document/(?:(?P<stats_type>authors|pages|words|format|formlang|author/(?:documents|affiliation|country|continent|citations|hindex)|yearly/(?:affiliation|country|continent))/)?$", views.document_stats),
|
||||
url("^knowncountries/$", views.known_countries_list),
|
||||
url("^meeting/(?P<num>\d+)/(?P<stats_type>country|continent)/$", views.meeting_stats),
|
||||
url("^meeting/(?:(?P<stats_type>overview|country|continent)/)?$", views.meeting_stats),
|
||||
url("^review/(?:(?P<stats_type>completion|results|states|time)/)?(?:%(acronym)s/)?$" % settings.URL_REGEXPS, views.review_stats),
|
||||
url(r"^$", views.stats_index),
|
||||
url(r"^document/(?:(?P<stats_type>authors|pages|words|format|formlang|author/(?:documents|affiliation|country|continent|citations|hindex)|yearly/(?:affiliation|country|continent))/)?$", views.document_stats),
|
||||
url(r"^knowncountries/$", views.known_countries_list),
|
||||
url(r"^meeting/(?P<num>\d+)/(?P<stats_type>country|continent)/$", views.meeting_stats),
|
||||
url(r"^meeting/(?:(?P<stats_type>overview|country|continent)/)?$", views.meeting_stats),
|
||||
url(r"^review/(?:(?P<stats_type>completion|results|states|time)/)?(?:%(acronym)s/)?$" % settings.URL_REGEXPS, views.review_stats),
|
||||
]
|
||||
|
|
Loading…
Reference in a new issue