
[](https://github.com/ietf-tools/datatracker/releases)
[](https://github.com/ietf-tools/datatracker/blob/main/LICENSE)
[](https://github.com/ietf-tools/datatracker/pkgs/container/datatracker-db)
[](#prerequisites)
[](#prerequisites)
[](#prerequisites)
[](#prerequisites)
##### The day-to-day front-end to the IETF database for people who work on IETF standards.
- [**Production Website**](https://datatracker.ietf.org)
- [Changelog](https://github.com/ietf-tools/datatracker/blob/main/CHANGELOG.md)
- [Contributing](https://github.com/ietf-tools/.github/blob/main/CONTRIBUTING.md)
- [Getting Started](#getting-started)
- [Prerequisites](#prerequisites)
- [Git Cloning Tips](#git-cloning-tips)
- [Code Tree Overview](#code-tree-overview)
- [Adding a New Web Page](#adding-a-new-web-page)
- [Testing your work](#testing-your-work)
- [Docker Dev Environment](docker/README.md)
- [Continuous Integration](#continuous-integration)
- [Database & Assets](#database--assets)
---
### Getting Started
This project is following the standard **Git Feature Workflow** development model. Learn about all the various steps of the development workflow, from creating a fork to submitting a pull request, in the [Contributing](https://github.com/ietf-tools/.github/blob/main/CONTRIBUTING.md) guide.
> Make sure to read the [Styleguides](https://github.com/ietf-tools/.github/blob/main/CONTRIBUTING.md#styleguides) section to ensure a cohesive code format across the project.
You can submit bug reports, enhancement and new feature requests in the [discussions](https://github.com/ietf-tools/datatracker/discussions) area. Accepted tickets will be converted to issues.
#### Prerequisites
- Python 3.6
- Django 2.x
- Node.js 16.x
- MariaDB 10
> See the [Docker Dev Environment](docker/README.md) section for a preconfigured docker environment.
#### Git Cloning Tips
Because of the extensive history of this project, cloning the datatracker project locally can take a long time / disk space. You can speed up the cloning process by limiting the history depth, for example:
- To fetch only up to the 10 latest commits:
```sh
git clone --depth=10 https://github.com/ietf-tools/datatracker.git
```
- To fetch only up to a specific date:
```sh
git clone --shallow-since=DATE https://github.com/ietf-tools/datatracker.git
```
#### Code Tree Overview
The `ietf/templates/` directory contains Django templates used to generate web pages for the datatracker, mailing list, wgcharter and other things.
Most of the other `ietf` sub-directories, such as `meeting`, contain the python/Django model and view information that go with the related templates. In these directories, the key files are:
| File | Description |
|--|--|
| urls.py | binds a URL to a view, possibly selecting some data from the model. |
| models.py | has the data models for the tool area. |
| views.py | has the views for this tool area, and is where views are bound to the template. |
#### Adding a New Web Page
To add a new page to the tools, first explore the `models.py` to see if the model you need already exists. Within `models.py` are classes such as:
```python
class IETFWG(models.Model):
ACTIVE = 1
group_acronym = models.ForeignKey(Acronym, primary_key=True, unique=True, editable=False)
group_type = models.ForeignKey(WGType)
proposed_date = models.DateField(null=True, blank=True)
start_date = models.DateField(null=True, blank=True)
dormant_date = models.DateField(null=True, blank=True)
...
```
In this example, the `IETFWG` class can be used to reference various fields of the database including `group_type`. Of note here is that `group_acronym` is the `Acronym` model so fields in that model can be accessed (e.g., `group_acronym.name`).
Next, add a template for the new page in the proper sub-directory of the `ietf/templates` directory. For a simple page that iterates over one type of object, the key part of the template will look something like this:
```html
{% for wg in object_list %}