1
0
mirror of https://github.com/peeringdb/peeringdb.git synced 2024-05-11 05:55:09 +00:00

ignore new ixf field (#1082)

* ignore new ixf field

* pre-commit

* gh actions linting fix
This commit is contained in:
Matt Griswold
2021-10-30 10:20:04 -05:00
committed by GitHub
parent 3b78cd6270
commit 1eda45ffeb
23 changed files with 36 additions and 48 deletions

View File

@@ -118,4 +118,3 @@ Command line whois.
## pdb_wipe.py
Wipe all peering data.

View File

@@ -24,7 +24,7 @@ Generally speaking, anything that is going to be exposed to the public on Peerin
### Migrations
For concrete models, `django-peeringdb` and `peeringdb_server` maintain their own set of migrations.
For concrete models, `django-peeringdb` and `peeringdb_server` maintain their own set of migrations.
Please make sure that when you add fields or models to django-peeringdb that migrations for the changes exist in both places.
@@ -37,7 +37,7 @@ Refer to [django migration documentation](https://docs.djangoproject.com/en/3.2/
- has a parent `Organization` relationship
- `Network` (`net`): represents a network (asn)
- has a parent `Organization` relationship
- `InternetExchange` (`ix`): represents an internet exchange
- `InternetExchange` (`ix`): represents an internet exchange
- has a parent `Organization` relationship
- `IXLan` (`ixlan`): represents LAN information for an exchange
- has a parent `InternetExchange` relationship
@@ -68,7 +68,7 @@ Through `django-handleref` each of the above objects maintains a status field th
- `ok`: object is approved and currently live
- `pending`: object is pending approval through admin-com
- `deleted`: object is marked as deleted
- `deleted`: object is marked as deleted
### Soft delete
@@ -76,7 +76,7 @@ With the exception of stale `poc` objects, public peering data is *never* hard d
Soft deleting an object means flipping its status from `ok` to `deleted`.
Note that `django-handleref` overrides the model's `delete` method to do this automatically.
Note that `django-handleref` overrides the model's `delete` method to do this automatically.
```py
net = Network.objects.get(id=20)

View File

@@ -280,4 +280,3 @@ View definitions:
- Entity views (network, facility, internet exchange and organization)
- Sponsorships
- User Registration

View File

@@ -35,4 +35,4 @@ Save key permissions for the specified org and key.
Perms should be a dict of permissioning ids and permission levels.
---
---

View File

@@ -288,4 +288,3 @@ ToolHistory(peeringdb_server.autocomplete_views.CommandLineToolHistoryAutocomple
```
Autocomplete for command line tools that were run via the admin ui.

View File

@@ -15,4 +15,4 @@ Will yield the current request, if there is one.
To se the current request for the context pass it to
the request parameter.
---
---

View File

@@ -56,4 +56,4 @@ available to site administrators.
Return all sponsorships.
---
---

View File

@@ -27,4 +27,3 @@ TestRouter(peeringdb_server.db_router.DatabaseRouter)
A very basic database router that routes to a different
read and write db.

View File

@@ -12,4 +12,4 @@ Define ix-f import preview, review and post-mortem views.
A simple decorator to enable basic auth for a specific view.
---
---

View File

@@ -39,4 +39,4 @@ Arguments:
- entity_source <HandleRef>: handleref object, entity that was merged
- entity_target <HandleRef>: handleref object, entity that was merged into
---
---

View File

@@ -72,4 +72,4 @@ Should be below org_admin_required.
Also sets "user" in kwargs.
---
---

View File

@@ -58,4 +58,3 @@ MungeRenderer(rest_framework.renderers.BaseRenderer)
All renderers should extend this class, setting the `media_type`
and `format` attributes, and override the `.render()` method.

View File

@@ -19,4 +19,4 @@ context.
If no request can be obtained this will return False.
---
---

View File

@@ -20,4 +20,4 @@ Search searchable objects (ixp, network, facility ...) by term.
Returns result dict.
---
---

View File

@@ -82,4 +82,4 @@ and update net_count for the related InternetExchange.
Updates 'attribute' field in Network whenever it's called.
---
---

View File

@@ -97,4 +97,4 @@ Raises:
Returns:
- str: zipcode
---
---

View File

@@ -16,7 +16,7 @@ REST API filtering happens when filter parameters are passed to REST API list re
This is almost a straight pass through to django query set filters (after some sanitizing of course).
Most querying logic for this is defined in `rest.py`
Most querying logic for this is defined in `rest.py`
Note that there is some extra effort involved for more intricate query filters, such as relationship queries or customized queries like the `whereis` filter for `ixpfx`

View File

@@ -14,6 +14,6 @@ export GOOGLE_GEOLOC_API_KEY=abcde
When adding a setting use the `set_from_env` and the `set_option` wrappers to do so.
These ensure that the overrides mentioned above are functional. Use `set_from_env` for variables you anticipate are definitely going to be overridden on a per environment basis.
These ensure that the overrides mentioned above are functional. Use `set_from_env` for variables you anticipate are definitely going to be overridden on a per environment basis.
Use `set_option` for everything else.

View File

@@ -1,4 +1,4 @@
## django-grainy
## django-grainy
PeeringDB users [grainy](https://github.com/20c/grainy) and [django-grainy](https://github.com/20c/django-grainy) to manage user permissions.
@@ -28,10 +28,10 @@ and all the objects permissioned within it.
A user given permissions to `peeringdb.organization.1.network.1` would only have permissions to the network
with id `1` assuming that network belongs to the organization with id `1`.
A user given permissions to `peeringdb.organization` has permissions to ALL organizations and ALL objects
A user given permissions to `peeringdb.organization` has permissions to ALL organizations and ALL objects
permissioned within them.
A user given permissions to `peeringdb.organization.*.network.*.poc_set.users` has permission to view all `user`
A user given permissions to `peeringdb.organization.*.network.*.poc_set.users` has permission to view all `user`
visible points of contact.
### Setting permissions
@@ -59,6 +59,6 @@ When handling a django request to the REST API, it needs to be determined who or
It is either a guest (unauthenticated user), a user (through session or user api key auth) or an organization (through org api key auth).
The logic for this exists in `permissions.py`.
The logic for this exists in `permissions.py`.
This is already wired up to all API views, but needs to be kept in mind when adding new views.

View File

@@ -13,7 +13,7 @@ PeeringDB uses the following third party js libraries:
- [20c-edit](https://github.com/20c/js-edit) wiring of forms to REST API, seamless switching between view and editor
- [20c-list-util](https://github.com/20c/js-listutil) list filtering and sorting
- [autocomplete-light](https://django-autocomplete-light.readthedocs.io/en/master/) autocomplete fields
- [dom-purify](https://github.com/cure53/DOMPurify) santize DOM
- [dom-purify](https://github.com/cure53/DOMPurify) santize DOM
- [showdown](https://github.com/showdownjs/showdown) markdown to html
- [js-cookie](https://github.com/js-cookie/js-cookie) cookie utils
@@ -26,7 +26,7 @@ PeeringDB specific javascript code can be found in these files:
- advanced search
- custom 20c-edit input types
- custom 20c-edit editor handlers
- data loaders
- data loaders
- ix-f post mortem, preview and review tools
- quick search
- api key permissions
@@ -85,7 +85,7 @@ Some types have specific properties, find those listed below:
- `flags`: renders checkboxes for boolean flags
- `value` (`list<dict>`): one entry for each checkbox (flag), each item should
be a `dict` containing `name` and `value` keys (*required*)
- `url`
- `url`
- `list`
- `data` (`str`): data loader name (*required*) - reference to data loaders below
- `multiple` (`bool`): allow multi select
@@ -133,7 +133,7 @@ therefore the value of `"my_organizations"` in the response is NOT arbitrary.
#### `urls.py`
URL routing needs to be set up:
URL routing needs to be set up:
```py
url(r"^data/my_organizations$", peeringdb_server.data_views.my_organizations),
@@ -141,7 +141,7 @@ URL routing needs to be set up:
#### `static/peeringdb.js`
The front-end needs to assign the loader:
The front-end needs to assign the loader:
```js
twentyc.data.loaders.assign("my_organizations", "data");
@@ -177,5 +177,3 @@ In instances where you want to check permissions after the data has been seriali
```
PeeringDB uses [django-grainy](https://github.com/20c/django-grainy) for granular permission checking and handling.