diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 000000000..c0f7ffdca --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,8 @@ +blank_issues_enabled: false +contact_links: + - name: Help / Questions + url: https://github.com/ietf-tools/datatracker/discussions/categories/help-questions + about: Need help? Have a question on setting up the project or its usage? + - name: New Feature / Enhancement Request + url: https://github.com/ietf-tools/datatracker/discussions/categories/ideas + about: Submit ideas for new features or improvements. diff --git a/.github/ISSUE_TEMPLATE/report-a-bug.yml b/.github/ISSUE_TEMPLATE/report-a-bug.yml new file mode 100644 index 000000000..d911d8e2e --- /dev/null +++ b/.github/ISSUE_TEMPLATE/report-a-bug.yml @@ -0,0 +1,34 @@ +name: Report a Bug +description: Something isn't right? File a bug report +labels: ["bug"] +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to fill out this bug report! + - type: textarea + id: what-happened + attributes: + label: What happened? + description: Also tell us, what did you expect to happen? + placeholder: Tell us what you see! + validations: + required: true + - type: dropdown + id: browsers + attributes: + label: What browser(s) are you seeing the problem on? + multiple: true + options: + - Chrome / Edge + - Firefox + - Safari + - Not Applicable + - type: checkboxes + id: terms + attributes: + label: Code of Conduct + description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/ietf-tools/.github/blob/main/CODE_OF_CONDUCT.md) + options: + - label: I agree to follow the IETF's Code of Conduct + required: true diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 0b7bb0566..2ed7034d6 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -3,8 +3,8 @@ name: CodeQL Analysis on: # push: # branches: [ main ] - pull_request: - branches: [ main ] + # pull_request: + # branches: [ main ] schedule: - cron: '23 1 * * 1' diff --git a/README.md b/README.md index f4580904a..e1e999846 100644 --- a/README.md +++ b/README.md @@ -18,13 +18,8 @@ - [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) + - [Docker Dev Environment](docker/README.md) - [Database & Assets](#database--assets) - [Old Datatracker Branches](https://github.com/ietf-tools/old-datatracker-branches/branches/all) - [Bootstrap 5 Upgrade](#bootstrap-5-upgrade) @@ -39,112 +34,31 @@ This project is following the standard **Git Feature Workflow** development mode 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: +As outlined in the [Contributing](https://github.com/ietf-tools/.github/blob/main/CONTRIBUTING.md) guide, you will first want to create a fork of the datatracker project in your personal GitHub account before cloning it. + +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 *(replace `USERNAME` with your GitHub username)*: - To fetch only up to the 10 latest commits: ```sh - git clone --depth=10 https://github.com/ietf-tools/datatracker.git + git clone --depth=10 https://github.com/USERNAME/datatracker.git ``` - To fetch only up to a specific date: ```sh - git clone --shallow-since=DATE https://github.com/ietf-tools/datatracker.git + git clone --shallow-since=DATE https://github.com/USERNAME/datatracker.git ``` -#### Code Tree Overview +#### Overview of the datatracker models -The `ietf/templates/` directory contains Django templates used to generate web pages for the datatracker, mailing list, wgcharter and other things. +A beginning of a [walkthrough of the datatracker models](https://notes.ietf.org/iab-aid-datatracker-database-overview) was prepared for the IAB AID workshop. -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 %} -
A failure report with details about what happened has been sent to the - server administrators. It would be helpful if you would file a bug - report with additional information at the - IETF database issue tracker, too. + server administrators. It would be helpful if you would create an issue + providing additional information at + GitHub, too.
{% endblock %} \ No newline at end of file diff --git a/ietf/templates/api/index.html b/ietf/templates/api/index.html index 299d700e8..ba3401115 100644 --- a/ietf/templates/api/index.html +++ b/ietf/templates/api/index.html @@ -19,26 +19,10 @@ to generate an API which mirrors the Django ORM (Object Relational Mapping) for the database. Each Django model class maps down to the SQL database tables and up to the API. The Django models classes are defined in the -models.py
files of the datatracker:
+ models.py files of the datatracker. Browse the code tree
+ for the models file in each app (such as ietf/doc/models.py,
+ ietf/group/models.py, …).
- The API top endpoint is at https://datatracker.ietf.org/api/v1/. @@ -53,8 +37,8 @@ https://datatracker.ietf.org/api/v1/group/group/