Verified Commit b8be9edc authored by Elger Jonker's avatar Elger Jonker

lint

parent 4bc80e96
import logging
import re
import urllib
from random import choice, choices, randint
from constance import config
......@@ -12,9 +14,6 @@ from jet.admin import CompactInline
from failmap.app.models import GameUser
from failmap.game.models import Contest, OrganizationSubmission, Team, UrlSubmission
from failmap.organizations.models import Coordinate, Organization, OrganizationType, Url
import urllib
import re
log = logging.getLogger(__package__)
......@@ -158,7 +157,7 @@ def create_printout(contest):
teamcontent += "<br />"
teamcontent += "Then select your team and fill in it's secret:<br />"
teamcontent += "Team: <span style='background-color: %s; width: 60px; height: 20px;'><b>%s</b></span><br />" % \
(team.color, team.name)
(team.color, team.name)
teamcontent += "Secret: <b>%s</b><br />" % team.secret
teamcontent += "<br />"
teamcontent += "If you have any questions, please ask the contest organizer!<br>"
......
......@@ -238,7 +238,7 @@ class UrlSubmissionForm(forms.Form):
<li>You can also search for organization type, and it's name at the same time.</li>
<li>A list of all approved organizations is shown <a href='/game/submitted_organizations/'>
here</a></li>
<li>If your newly added organization is missing, please ask the competition host to verify your
<li>If your newly added organization is missing, please ask the competition host to verify your
organization.</li>
<li>Urls entered below will be added to all organizations selected here.</li>
</ul>
......@@ -289,16 +289,16 @@ class UrlSubmissionForm(forms.Form):
initial=initial,
label="Addresses of Services, Websites and other online presence.",
help_text="""
Hints:
Hints:
<ul>
<li>The following is all the same url (google.com):
<li>The following is all the same url (google.com):
https://google.com, https://www.google.com, http://nonsense.google.com, bla.nonsense.google.com,
google.com
google.com
</li>
<li>Subdomains and protocols are removed: the system will discover these.</li>
<li>Each address will be resolved to see if it exists. This can take a while.</li>
<li>You can enter multiple sites at once using comma or space as a delimiter.
For example: The value
<li>You can enter multiple sites at once using comma or space as a delimiter.
For example: The value
<i>failmap.org, microsoft.com, apple.com </i> can be copy-pasted succesfully.</li>
<li>The url will be added to all organizations selected above, be careful.</li>
<li>It's not possible to enter IP addresses: the IP's behind services/organizations often change.</li>
......@@ -398,7 +398,6 @@ class UrlSubmissionForm(forms.Form):
existing = []
for organization in organizations:
if not Organization.objects.filter(pk=organization,
country=self.contest.target_country, is_dead=False).exists():
......
......@@ -13,6 +13,7 @@ class Migration(migrations.Migration):
migrations.AlterField(
model_name='team',
name='name',
field=models.CharField(default='Unspecified', help_text='Whatever name the team wants. Must be at least PEGI 88.', max_length=42, verbose_name='Team name'),
field=models.CharField(
default='Unspecified', help_text='Whatever name the team wants. Must be at least PEGI 88.', max_length=42, verbose_name='Team name'),
),
]
......@@ -13,6 +13,7 @@ class Migration(migrations.Migration):
migrations.AlterField(
model_name='team',
name='name',
field=models.CharField(help_text='Whatever name the team wants. Must be at least PEGI 88.', max_length=42, verbose_name='Team name'),
field=models.CharField(help_text='Whatever name the team wants. Must be at least PEGI 88.',
max_length=42, verbose_name='Team name'),
),
]
......@@ -13,6 +13,7 @@ class Migration(migrations.Migration):
migrations.AlterField(
model_name='team',
name='name',
field=models.CharField(default=None, help_text='Whatever name the team wants. Must be at least PEGI 88.', max_length=42, verbose_name='Team name'),
field=models.CharField(
default=None, help_text='Whatever name the team wants. Must be at least PEGI 88.', max_length=42, verbose_name='Team name'),
),
]
......@@ -13,6 +13,7 @@ class Migration(migrations.Migration):
migrations.AlterField(
model_name='team',
name='name',
field=models.CharField(help_text='Whatever name the team wants. Must be at least PEGI 88.', max_length=42, verbose_name='Team name'),
field=models.CharField(help_text='Whatever name the team wants. Must be at least PEGI 88.',
max_length=42, verbose_name='Team name'),
),
]
......@@ -13,6 +13,7 @@ class Migration(migrations.Migration):
migrations.AddField(
model_name='contest',
name='url_organization_discovery_help',
field=models.TextField(default='', help_text='HTML: information where contestants can find good sources of urls / organizations. Displayed on both the URL and Organization adding forms.', max_length=1024),
field=models.TextField(
default='', help_text='HTML: information where contestants can find good sources of urls / organizations. Displayed on both the URL and Organization adding forms.', max_length=1024),
),
]
import markdown as md
from django import template
from django.template.defaultfilters import stringfilter
import markdown as md
register = template.Library()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment