Fix typos1 conflicts resolved (#842)

* Update 0006_network_allow_ixp_update.py

fixes 'Sepcifies' typo in 0006_network_allow_ixp_update.py

* Update 0029_auto_20200401_1006.py

fixes 'Sepcifies' typo in 0029_auto_20200401_1006.py

* Update models.py

fixes 'Sepcifies' typo in models.py

* Update org_admin_views.py

fixes 'afiliation' typos in org_admin_views.py

* Update serializers.py

fix use of "it's" when it should instead be "its" in 'serializers.py'

* Update 0004_geocode_fields.py

correct use of "it's" to be "its" in '0004_geocode_fields.py', also fix spelling of 'syncronized'

* Update 0029_auto_20200401_1006.py

correct use of "it's" to be "its" in '0029_auto_20200401_1006.py', also fix spelling of 'syncronized'

* Update models.py

correct use of "it's" to be "its" in 'models.py', also fix spelling of 'syncronized'

* Update email_confirm.html

correct 're-initate' in email_confirm.html

* Update notify-pdb-admin-user-affil.txt

correct 'organzation' in 'notify-pdb-admin-user-affil.txt'

* Update op_create.md

correct 'organzation' in 'ip_create.md'

* Update notify-pdb-admin-asnauto-skipvq.txt

correct 'organzation' in 'notify-pdb-admin-asnauto-skipvq.txt'

* Update models.py

correct 'organzation' in 'models.py'

* Update notify-pdb-admin-asnauto-skipvq.txt

fix 'succesfully' in 'notify-pdb-admin-asnauto-skipvq.txt'

* Update views.py

fix 'succesfully' in 'views.py'

* Update pdb_migrate_ixlans.py

* Update models.py

several more replacements of "it's" with "its"

* Update rest.py

one more replacement of "it's" with "its"

* Update op_retrieve.md

replace "dont" with "don't"

* Update notify-org-admin-merge.txt

fix "dont" with "don't"

* Update error.html

fix "dont" with "don't"

* Update op_list.md

fix "dont" with "don't"

* Update serializers.py

fix "dont" with "don't"

* Update deskpro.py

fix "dont" with "don't"

* Update mock.py

fix "dont" with "don't"

* Update ixf.py

fix "dont" with "don't"

* Update admin.py

fix "dont" with "don't"

* Update api_schema.py

fix "dont" with "don't"

* Update signals.py

fix "dont" with "don't"

* Update views.py

fix "dont" with "don't"

* Update test_admin.py

fix "dont" with "don't"

* Update pdb_api_test.py

fix "dont" with "don't"

* Update models.py

fix "dont" with "don't"

* revert to "IXP" in help text

Co-authored-by: Theo Baschak <tbaschak@users.noreply.github.com>
Co-authored-by: Stefan Pratter <stefan@20c.com>
This commit is contained in:
Matt Griswold
2020-09-29 20:01:47 +00:00
committed by GitHub
parent 1fa46e2acb
commit aed211418d
25 changed files with 57 additions and 57 deletions
+1 -1
View File
@@ -19,5 +19,5 @@ Currently this is the case for:
To be able to create an object, the requesting user requires `create` permissions to one of the
object's parents in the relationship hierarchy.
For example to create a `net` type object, the user needs to be permissioned to create in the organzation
For example to create a `net` type object, the user needs to be permissioned to create in the organization
that is to be the network's holder entity.
+1 -1
View File
@@ -66,7 +66,7 @@ Depth can be one of three values:
- 1 : expand sets into ids (slow)
- 2 : expand sets into objects (slower)
- 0 : dont expand sets at all (default behaviour)
- 0 : don't expand sets at all (default behaviour)
**example**
+1 -1
View File
@@ -9,7 +9,7 @@ Depth can be one of three values:
- 1 : expand sets into ids (slow)
- 2 : expand sets into objects (slower)
- 0 : dont expand sets at all (default behaviour)
- 0 : don't expand sets at all (default behaviour)
**example**
+2 -2
View File
@@ -392,7 +392,7 @@ class ModelAdminWithVQCtrl:
fieldsets = tuple(super().get_fieldsets(request, obj=obj))
# on automatically defined fieldsets it will insert the controls
# somewhere towards the bottom, we dont want that - so we look for it and
# somewhere towards the bottom, we don't want that - so we look for it and
# remove it
for k, s in fieldsets:
if "verification_queue" in s["fields"]:
@@ -1377,7 +1377,7 @@ class UserPermissionAdmin(UserAdmin):
def get_form(self, request, obj=None, **kwargs):
# we want to remove the password field from the form
# since we dont send it and dont want to run clean for it
# since we don't send it and don't want to run clean for it
form = super().get_form(request, obj, **kwargs)
del form.base_fields["password"]
return form
+1 -1
View File
@@ -283,7 +283,7 @@ class BaseSchema(AutoSchema):
elif typ == "ForeignKey" and (fld.one_to_many or hasattr(fld, "multiple")):
# mark prefix of nested object as blocked so we
# dont expose it's fields to the documentation
# don't expose it's fields to the documentation
blocked_prefixes.append(f"{field}__")
continue
+1 -1
View File
@@ -240,7 +240,7 @@ def ticket_queue_deletion_prevented(user, instance):
f"{instance}"
)
# we dont want to spam DeskPRO with tickets when a user
# we don't want to spam DeskPRO with tickets when a user
# repeatedly clicks the delete button for an object
#
# so we check if a ticket has recently been sent for it
+2 -2
View File
@@ -518,7 +518,7 @@ class Importer:
netixlan_qset = self.ixlan.netixlan_set_active
# if we are only processing a specific asn ignore
# all that dont match
# all that don't match
if self.asn:
netixlan_qset = netixlan_qset.filter(asn=self.asn)
@@ -666,7 +666,7 @@ class Importer:
asn = member["asnum"]
# if we are only processing a specific asn, ignore all
# that dont match
# that don't match
if self.asn and asn != self.asn:
continue
@@ -664,7 +664,7 @@ class TestJSON(unittest.TestCase):
for k, v in list(test_failures["perms"].items()):
data_perms[k] = v
# if data is empty set something so we dont
# if data is empty set something so we don't
# trigger the empty data error
data_perms["_dummy_"] = 1
@@ -792,7 +792,7 @@ class TestJSON(unittest.TestCase):
for pk_fld in pk_flds:
# serializer has marked field as to be excluded from serialized data
# dont check for it
# don't check for it
if pk_fld in list_exclude:
continue
@@ -1592,7 +1592,7 @@ class TestJSON(unittest.TestCase):
self.assert_delete(self.db_org_admin, "ixpfx", test_success=SHARED["ixpfx_id"])
# re-creating a deleted ixpfx that is under another exchange
# that we dont have write perms too
# that we don't have write perms too
pfx = IXLanPrefix.objects.create(
ixlan=SHARED["ixlan_r_ok"], prefix="205.127.237.0/24", protocol="IPv4"
)
@@ -1813,7 +1813,7 @@ class TestJSON(unittest.TestCase):
"org",
# can delete the org we just made
test_success=org.id,
# cant delete the org we dont have write perms to
# cant delete the org we don't have write perms to
test_failure=SHARED["org_r_ok"].id,
)
self.assert_delete(
@@ -432,7 +432,7 @@ class Command(BaseCommand):
def migrate_ixlan_id_sql(self, old_id, new_id):
"""
Migrate ixlan id so it matches it's parent id
Migrate ixlan id so it matches its parent id
This is called automatically during `migrate_ixlan_id` and should not be
called manually
@@ -33,7 +33,7 @@ class Migration(migrations.Migration):
name="geocode_status",
field=models.BooleanField(
default=False,
help_text=b"Has this object's latitude and longitude been syncronized to it's address fields",
help_text=b"Has this object's latitude and longitude been synchronized to its address fields",
),
),
]
@@ -17,7 +17,7 @@ class Migration(migrations.Migration):
name="allow_ixp_update",
field=models.BooleanField(
default=False,
help_text=b"Sepcifies whether an ixp is allowed to add a netixlan entry for this network via their ixp_member data",
help_text=b"Specifies whether an ixp is allowed to add a netixlan entry for this network via their ixp_member data",
),
),
]
@@ -81,7 +81,7 @@ class Migration(migrations.Migration):
name="geocode_status",
field=models.BooleanField(
default=False,
help_text="Has this object's latitude and longitude been syncronized to it's address fields",
help_text="Has this object's latitude and longitude been synchronized to its address fields",
),
),
migrations.AlterField(
@@ -146,7 +146,7 @@ class Migration(migrations.Migration):
name="allow_ixp_update",
field=models.BooleanField(
default=False,
help_text="Sepcifies whether an ixp is allowed to add a netixlan entry for this network via their ixp_member data",
help_text="Specifies whether an ixp is allowed to add a netixlan entry for this network via their ixp_member data",
),
),
migrations.AlterField(
+1 -1
View File
@@ -97,7 +97,7 @@ class Mock:
# elif reftag != "ixlan":
# continue
# this we dont care about either
# this we don't care about either
if field.name.find("geocode") == 0:
continue
+9 -9
View File
@@ -246,7 +246,7 @@ class GeocodeBaseMixin(models.Model):
geocode_status = models.BooleanField(
default=False,
help_text=_(
"Has this object's latitude and longitude been syncronized to it's address fields"
"Has this object's latitude and longitude been synchronized to its address fields"
),
)
geocode_date = models.DateTimeField(
@@ -330,7 +330,7 @@ class UserOrgAffiliationRequest(models.Model):
When an ASN is entered that is not in the database yet it will
notify PDB staff
When an ASN is entered that is already in the database the organzation
When an ASN is entered that is already in the database the organization
adminstration is notified and they can then approve or deny
the affiliation request themselves.
@@ -417,7 +417,7 @@ class UserOrgAffiliationRequest(models.Model):
if not self.user.is_verified_user:
self.user.set_verified()
# since it was approved, we dont need to keep the
# since it was approved, we don't need to keep the
# request item around
self.status = "approved"
self.delete()
@@ -710,7 +710,7 @@ class Organization(ProtectedMixin, pdb_models.OrganizationBase):
@property
def urls(self):
"""
Returns all the websites for the org based on it's
Returns all the websites for the org based on its
website field and the website fields on all the entities it
owns
"""
@@ -1676,7 +1676,7 @@ class InternetExchange(ProtectedMixin, pdb_models.InternetExchangeBase):
Keyword Argument(s):
- create_ixlan (`bool`=True): if True and the ix is missing
it's ixlan, create it
its ixlan, create it
"""
r = super().save(**kwargs)
@@ -1800,7 +1800,7 @@ class IXLan(pdb_models.IXLanBase):
set for ixlan.
This will strip `ixf_ixp_member_list_url` fields for
users that dont have read permissions for them according
users that don't have read permissions for them according
to `ixf_ixp_member_list_url_visible`
Argument(s):
@@ -3526,7 +3526,7 @@ class IXLanPrefix(ProtectedMixin, pdb_models.IXLanPrefixBase):
of the following is True:
- parent ixlan has netixlans that fall into
it's address space
its address space
"""
prefix = self.prefix
@@ -3585,7 +3585,7 @@ class Network(pdb_models.NetworkBase):
null=False,
default=False,
help_text=_(
"Sepcifies whether an IXP is allowed to add a netixlan entry for this network via their ixp_member data"
"Specifies whether an IXP is allowed to add a netixlan entry for this network via their ixp_member data"
),
)
@@ -4536,7 +4536,7 @@ class User(AbstractBaseUser, PermissionsMixin):
return None
# allauth supports multiple email addresses per user, however
# we dont need that, so we check for the primary email address
# we don't need that, so we check for the primary email address
# and if it already exist we make sure to update it to the
# email address currently specified on the user instance
try:
+2 -2
View File
@@ -459,7 +459,7 @@ def uoar_approve(request, **kwargs):
if admin_user != request.user:
with override(admin_user.locale):
admin_user.email_user(
_("%(user_name)s's afilliation request has been approved")
_("%(user_name)s's affiliation request has been approved")
% {"user_name": uoar.user.full_name},
loader.get_template(
"email/notify-org-admin-user-affil-approved.txt"
@@ -518,7 +518,7 @@ def uoar_deny(request, **kwargs):
if user != request.user:
with override(user.locale):
user.email_user(
_("%(user_name)s's afilliation request has been denied")
_("%(user_name)s's affiliation request has been denied")
% {"user_name": uoar.user.full_name},
loader.get_template(
"email/notify-org-admin-user-affil-denied.txt"
+1 -1
View File
@@ -511,7 +511,7 @@ class ModelViewSet(viewsets.ModelViewSet):
def require_data(self, request):
"""
Test that the request contains data in it's body that
Test that the request contains data in its body that
can be parsed to the required format (json) and is not
empty
+13 -13
View File
@@ -344,7 +344,7 @@ class SaneIntegerField(serializers.IntegerField):
class ParentStatusException(IOError):
"""
Throw this when an object cannot be created because it's parent is
Throw this when an object cannot be created because its parent is
either status pending or deleted
"""
@@ -352,14 +352,14 @@ class ParentStatusException(IOError):
if parent.status == "pending":
super(IOError, self).__init__(
_(
"Object of type '%(type)s' cannot be created because it's parent entity '%(parent_tag)s/%(parent_id)s' has not yet been approved"
"Object of type '%(type)s' cannot be created because its parent entity '%(parent_tag)s/%(parent_id)s' has not yet been approved"
)
% {"type": typ, "parent_tag": parent.ref_tag, "parent_id": parent.id}
)
elif parent.status == "deleted":
super(IOError, self).__init__(
_(
"Object of type '%(type)s' cannot be created because it's parent entity '%(parent_tag)s/%(parent_id)s' has been marked as deleted"
"Object of type '%(type)s' cannot be created because its parent entity '%(parent_tag)s/%(parent_id)s' has been marked as deleted"
)
% {"type": typ, "parent_tag": parent.ref_tag, "parent_id": parent.id}
)
@@ -1073,7 +1073,7 @@ class FacilitySerializer(ModelSerializer):
validators = [FieldMethodValidator("suggest", ["POST"])]
def has_create_perms(self, user, data):
# we dont want users to be able to create facilities if the parent
# we don't want users to be able to create facilities if the parent
# organization status is pending or deleted
if data.get("org") and data.get("org").status != "ok":
raise ParentStatusException(data.get("org"), self.Meta.model.handleref.tag)
@@ -1214,7 +1214,7 @@ class InternetExchangeFacilitySerializer(ModelSerializer):
fac = serializers.SerializerMethodField()
def has_create_perms(self, user, data):
# we dont want users to be able to create ixfacs if the parent
# we don't want users to be able to create ixfacs if the parent
# ix or fac status is pending or deleted
if data.get("ix") and data.get("ix").status != "ok":
raise ParentStatusException(data.get("ix"), self.Meta.model.handleref.tag)
@@ -1274,7 +1274,7 @@ class NetworkContactSerializer(ModelSerializer):
net = serializers.SerializerMethodField()
def has_create_perms(self, user, data):
# we dont want users to be able to create contacts if the parent
# we don't want users to be able to create contacts if the parent
# network status is pending or deleted
if data.get("network") and data.get("network").status != "ok":
raise ParentStatusException(
@@ -1363,7 +1363,7 @@ class NetworkIXLanSerializer(ModelSerializer):
ipaddr6 = IPAddressField(version=6, allow_blank=True)
def has_create_perms(self, user, data):
# we dont want users to be able to create netixlans if the parent
# we don't want users to be able to create netixlans if the parent
# network or ixlan is pending or deleted
if data.get("network") and data.get("network").status != "ok":
raise ParentStatusException(
@@ -1598,7 +1598,7 @@ class NetworkFacilitySerializer(ModelSerializer):
return qset.select_related("network", "facility"), filters
def has_create_perms(self, user, data):
# we dont want users to be able to create netfac links if the parent
# we don't want users to be able to create netfac links if the parent
# network or facility status is pending or deleted
if data.get("network") and data.get("network").status != "ok":
raise ParentStatusException(
@@ -1849,7 +1849,7 @@ class NetworkSerializer(ModelSerializer):
return super().to_internal_value(data)
def has_create_perms(self, user, data):
# we dont want users to be able to create networks if the parent
# we don't want users to be able to create networks if the parent
# organization status is pending or deleted
if data.get("org") and data.get("org").status != "ok":
raise ParentStatusException(data.get("org"), self.Meta.model.handleref.tag)
@@ -1978,7 +1978,7 @@ class IXLanPrefixSerializer(ModelSerializer):
return qset.select_related("ixlan", "ixlan__ix"), filters
def has_create_perms(self, user, data):
# we dont want users to be able to create prefixes if the parent
# we don't want users to be able to create prefixes if the parent
# ixlan status is pending or deleted
if data.get("ixlan") and data.get("ixlan").status != "ok":
raise ParentStatusException(
@@ -2066,7 +2066,7 @@ class IXLanSerializer(ModelSerializer):
)
def has_create_perms(self, user, data):
# we dont want users to be able to create ixlans if the parent
# we don't want users to be able to create ixlans if the parent
# ix status is pending or deleted
if data.get("ix") and data.get("ix").status != "ok":
raise ParentStatusException(data.get("ix"), self.Meta.model.handleref.tag)
@@ -2279,7 +2279,7 @@ class InternetExchangeSerializer(ModelSerializer):
return qset, filters
def has_create_perms(self, user, data):
# we dont want users to be able to create internet exchanges if the parent
# we don't want users to be able to create internet exchanges if the parent
# organization status is pending or deleted
if data.get("org") and data.get("org").status != "ok":
raise ParentStatusException(data.get("org"), self.Meta.model.handleref.tag)
@@ -2312,7 +2312,7 @@ class InternetExchangeSerializer(ModelSerializer):
# object is created and connected to the ix
# the prefix that was provided, we pop it off the validated
# data because we dont need it during the ix creation
# data because we don't need it during the ix creation
prefix = validated_data.pop("prefix")
# create ix
+1 -1
View File
@@ -400,7 +400,7 @@ if getattr(settings, "DISABLE_VERIFICATION_QUEUE", False) is False:
if instance.notified:
return
# we dont sent notifications unless requesting user has been identified
# we don't sent notifications unless requesting user has been identified
if not instance.user_id:
return
@@ -20,7 +20,7 @@
</form>
{% else %}
<div class="marg-bot-15">
{% trans "The email confirmation process for this email address has been terminated, please re-initate" %} <a href="/verify">{% trans "here" %}</a>
{% trans "The email confirmation process for this email address has been terminated, please re-initiate" %} <a href="/verify">{% trans "here" %}</a>
</div>
{% endif %}
</div>
@@ -8,4 +8,4 @@
{{ entity_type_name }} "{{ entity_target.name }}" ({% trans "ID" %}: {{ entity_target.id }})
{{ entity_target_url }}
{% trans "All merges are processed manually by peeringdb support staff. If you think this action has been executed in error please dont hesitate to contact peeringdb support at" %} {{ support_email }}.
{% trans "All merges are processed manually by peeringdb support staff. If you think this action has been executed in error please don't hesitate to contact peeringdb support at" %} {{ support_email }}.
@@ -2,8 +2,8 @@
{% language 'en' %}
{% blocktrans with u_name=user.username n_name=net.name n_asn=net.asn n_id=net.id o_name=org.name o_id=org.id n_url=net.view_url o_url=org.view_url trimmed %}
User '{{ u_name }}' created Network {{ n_name }} AS{{ n_asn }} (<a href="{{ n_url }}">{{n_id}}</a>) under organzation {{ o_name }} (<a href="{{ o_url }}">{{ o_id }}</a>).
User '{{ u_name }}' created Network {{ n_name }} AS{{ n_asn }} (<a href="{{ n_url }}">{{n_id}}</a>) under organization {{ o_name }} (<a href="{{ o_url }}">{{ o_id }}</a>).
{% endblocktrans %}
{% trans "As the user's email address was succesfully matched against RiR entry data this network has skipped the verification queue." %}
{% trans "As the user's email address was successfully matched against RiR entry data this network has skipped the verification queue." %}
{% endlanguage %}
@@ -7,7 +7,7 @@
{% if instance.org_name %}
{% trans "They also provided this organization name in their request" %}: {{ instance.org_name }}
{% endif %}
{% trans "There was no entry in our database that matches that ASN, so it is likely that a network and organzation for it will need to be created." %}
{% trans "There was no entry in our database that matches that ASN, so it is likely that a network and organization for it will need to be created." %}
{% else %}
{% blocktrans with u_name=user.full_name u_email=user.email o_name=instance.org_name trimmed %}
User {{ u_name }} ({{ u_email }}) wishes to create an organization called {{ o_name }}.
@@ -25,7 +25,7 @@
{% trans "ATTENTION: This is an ownership request, approving it will grant the user administration rights over the organization and any entities it owns." %}
{% endif %}
{% if instance.org.urls %}
{% trans "These are the website addresses were able to derive from the organzation and it's entities" %}:
{% trans "These are the website addresses were able to derive from the organization and it's entities" %}:
{% for url in instance.org.urls %}- <a href="{{ url }}">{{ url }}</a> {% endfor %}
{%endif %}
{% trans "These are the email addresses we could fetch from the ASNs belonging to this organization" %}:
+1 -1
View File
@@ -25,7 +25,7 @@
<p>{% trans "The page you requested does not exist." %}</p>
{% elif status == 403 %}
<h1>{% trans "403 - Forbidden" %}</h4>
<p>{% trans "You dont have permissions to view this page." %}</p>
<p>{% trans "You don't have permissions to view this page." %}</p>
{% endif %}
{% endblock %}
<p><a href="/">{% trans "Take me home" %}</a>.</p>
+4 -4
View File
@@ -921,7 +921,7 @@ def view_organization(request, id):
)
# if the organization being viewed is the one used
# to store suggested entities, we dont want to show the editorial
# to store suggested entities, we don't want to show the editorial
# tools
if org.id == dj_settings.SUGGEST_ENTITY_ORG:
perms["can_create"] = False
@@ -931,7 +931,7 @@ def view_organization(request, id):
perms["can_delete_%s" % tag] = False
# if user has writing perms to entity, we want to load sub entities
# that have status pending so we dont use the ones kicked back
# that have status pending so we don't use the ones kicked back
# by the serializer
if perms.get("can_delete_ix") or perms.get("can_create_ix"):
exchanges = org.ix_set.filter(status__in=["ok", "pending"])
@@ -1457,7 +1457,7 @@ def view_network(request, id):
.order_by("ixlan__ix__name")
)
# This will be passed as default value for keys that dont exist - causing
# This will be passed as default value for keys that don't exist - causing
# them not to be rendered in the template - also it is fairly
# safe to assume that no existing keys have been dropped because permission
# requirements to view them were not met.
@@ -2049,7 +2049,7 @@ class LoginView(two_factor.views.LoginView):
def done(self, form_list, **kwargs):
"""
User authenticated succesfully, set language options
User authenticated successfully, set language options
"""
response = super().done(form_list, **kwargs)
+1 -1
View File
@@ -186,7 +186,7 @@ class AdminTests(TestCase):
t_org.refresh_from_db()
self.assertEqual(t_org.status, "ok")
# TEST 2 - Dont allow merging of target org into target org
# TEST 2 - Don't allow merging of target org into target org
with pytest.raises(ValueError):
admin.merge_organizations([t_org], t_org, request)