creativecommons/legaldb

[Bug] Inconsistent Quotation Marks in Django Template {% url %} Tags

Closed this issue · 4 comments

Description

Inconsistent use of quotation marks in Django template {% url %} tags. Some tags use single quotes (') and others use double quotes ("), which can lead to readability issues or potential template rendering problems. Standardizing to single quotes ensures consistency and avoids confusion.

Reproduction

  1. Open any Django template file.
  2. Open scholarship folder
  3. Navigate to index.html
  4. Locate instances where the {% url %} template tag is used.
  5. Observe that some tags use single quotes and others use double quotes (check other files).
  6. The inconsistency can affect readability and may cause issues in template parsing in certain cases.

Expectation

All {% url %} tags should use single quotes (') for consistency across the codebase.

Examples

  • single quotes (')
    • <p class="hero-description body-bigger column is-9">This database includes <a href="{% url 'case_index' %}" class="has-text-weight-bold">case law</a> and <a href="{% url 'scholarship_index' %}" class="has-text-weight-bold">legal scholarship</a> that relates to Creative Commons legal tools.<br/>Please note that the database is not comprehensive, and CC does not necessarily endorse the views of the courts or scholars whose decisions and writings are referenced. The content provided is purely informational, designed for those seeking to better understand the legal ecosystem in which the CC legal tools operate.</p>
    • <a href="{% url 'case_index' %}" class="has-background-tomato">
    • <a href="{% url 'scholarship_index' %}" class="has-background-forest-green">
    • ...
  • double quotes (")

Additional context

This issue is primarily related to code style and readability, but maintaining consistency in quotation marks can also help prevent syntax issues in future updates or changes to the templates.

Resolution

  • I would be interested in resolving this bug.

All {% url %} tags should use single quotes (') for consistency across the codebase.

👍🏻 Agreed, especially given the prevalence of double quotes (") in the HTML

yes, @TimidRobot.
Thank you.

@rypptc please make a comment here so I can assign the issue to you

Ok, thank you