diff options
Diffstat (limited to 'utils.py')
-rw-r--r-- | utils.py | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -13,11 +13,11 @@ # You should have received a copy of the GNU Affero General Public License # along with celcatsanitizer. If not, see <http://www.gnu.org/licenses/>. -from django.utils import timezone - import datetime import re +from django.utils import timezone + def get_current_week(): return timezone.now().isocalendar()[:2] @@ -60,7 +60,7 @@ def parse_group(name): # \(.+\)) un ou plusieurs caractères quelconques entre parenthèses # ? groupe optionnel # $ fin de la ligne - group_regex = re.compile("^([\w ]+?)\s+((CM(\w))|(TD(\w)(\d))|(TP(\w)(\d)(\d)))?(\s\(.+\))?$") + group_regex = re.compile(r"^([\w ]+?)\s+((CM(\w))|(TD(\w)(\d))|(TP(\w)(\d)(\d)))?(\s\(.+\))?$") search = group_regex.search(name) if search is None: return name, None, None, None |