diff --git a/.github/workflows/assign-issues.yml b/.github/workflows/assign-issues.yml index 4e37f7257..58f4746fb 100644 --- a/.github/workflows/assign-issues.yml +++ b/.github/workflows/assign-issues.yml @@ -14,4 +14,4 @@ jobs: - name: Assign Issues uses: OWASP/BLT-Action@main with: - repo-token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + repo-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index aec383cb0..4ff757727 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -23,4 +23,9 @@ repos: hooks: - id: ruff args: [--fix] - - id: ruff-format + - repo: https://github.com/djlint/djLint + rev: v1.34.1 + hooks: + - id: djlint-reformat-django + files: ^company/templates/|^website/templates/ + - id: djlint-django diff --git a/.profile b/.profile index 78b3e4f2a..4453f2fa0 100644 --- a/.profile +++ b/.profile @@ -2,4 +2,4 @@ export PATH=$PATH:/usr/local/bin:/usr/bin:/bin:/app/vendor/firefox export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib:/usr/lib:/lib:/app/vendor/firefox xvfb :99 -ac export DISPLAY=:99 -echo ${GOOGLE_CREDENTIALS} > /app/google-credentials.json \ No newline at end of file +echo ${GOOGLE_CREDENTIALS} > /app/google-credentials.json diff --git a/blt/urls.py b/blt/urls.py index 1b275f219..1c08156eb 100644 --- a/blt/urls.py +++ b/blt/urls.py @@ -288,7 +288,7 @@ re_path(r"^issue2/(?P\w+)/$", IssueView2.as_view(), name="issue_view2"), re_path(r"^follow/(?P[^/]+)/", website.views.follow_user, name="follow_user"), re_path(r"^all_activity/$", AllIssuesView.as_view(), name="all_activity"), - re_path(r"^label_activity/$", SpecificIssuesView.as_view(), name="all_activity"), + re_path(r"^label_activity/$", SpecificIssuesView.as_view(), name="all_activitys"), re_path(r"^leaderboard/$", GlobalLeaderboardView.as_view(), name="leaderboard_global"), re_path( r"^leaderboard/monthly/$", @@ -329,17 +329,17 @@ re_path(r"^start/$", TemplateView.as_view(template_name="hunt.html"), name="start_hunt"), re_path(r"^hunt/$", login_required(HuntCreate.as_view()), name="hunt"), re_path(r"^hunts/$", ListHunts.as_view(), name="hunts"), - re_path(r"^invite/$", InviteCreate.as_view(template_name="invite.html")), + re_path(r"^invite/$", InviteCreate.as_view(template_name="invite.html"), name="invite"), re_path(r"^terms/$", TemplateView.as_view(template_name="terms.html"), name="terms"), - re_path(r"^about/$", TemplateView.as_view(template_name="about.html")), - re_path(r"^teams/$", TemplateView.as_view(template_name="teams.html")), - re_path(r"^projects/$", TemplateView.as_view(template_name="projects.html")), - re_path(r"^apps/$", TemplateView.as_view(template_name="apps.html")), - re_path(r"^deletions/$", TemplateView.as_view(template_name="deletions.html")), - re_path(r"^trademarks/$", TemplateView.as_view(template_name="trademarks.html")), - re_path(r"^bacon/$", TemplateView.as_view(template_name="bacon.html")), - re_path(r"^bltv/$", TemplateView.as_view(template_name="bltv.html")), - re_path(r"^privacypolicy/$", TemplateView.as_view(template_name="privacy.html")), + re_path(r"^about/$", TemplateView.as_view(template_name="about.html"), name="about"), + re_path(r"^teams/$", TemplateView.as_view(template_name="teams.html"), name="teams"), + re_path(r"^projects/$", TemplateView.as_view(template_name="projects.html"), name="projects"), + re_path(r"^apps/$", TemplateView.as_view(template_name="apps.html"), name="apps"), + re_path(r"^deletions/$", TemplateView.as_view(template_name="deletions.html"), name="deletions"), + re_path(r"^trademarks/$", TemplateView.as_view(template_name="trademarks.html"), name="trademarks"), + re_path(r"^bacon/$", TemplateView.as_view(template_name="bacon.html"), name="bacon"), + re_path(r"^bltv/$", TemplateView.as_view(template_name="bltv.html"), name="bltv"), + re_path(r"^privacypolicy/$", TemplateView.as_view(template_name="privacy.html"), name="privacy"), re_path(r"^stats/$", StatsDetailView.as_view(), name="stats"), re_path(r"^favicon\.ico$", favicon_view), re_path( @@ -360,8 +360,8 @@ comments.views.reply_comment, name="reply_comment", ), - re_path(r"^social/$", TemplateView.as_view(template_name="social.html")), - re_path(r"^search/$", website.views.search), + re_path(r"^social/$", TemplateView.as_view(template_name="social.html"), name="social"), + re_path(r"^search/$", website.views.search, name="search"), re_path(r"^report/$", IssueCreate.as_view(), name="report"), re_path(r"^i18n/", include("django.conf.urls.i18n")), re_path(r"^api/v1/", include(router.urls)), @@ -415,7 +415,7 @@ re_path(r"^contributors/$", contributors_view, name="contributors"), path("company/", include("company.urls")), path("sponsor/", website.views.sponsor_view, name="sponsor"), - path("companies/", DomainListView.as_view(), name="domain_list"), + path("companies/", DomainListView.as_view(), name="domain_lists"), ] if settings.DEBUG: diff --git a/company/static/company/css/md_editor.css b/company/static/company/css/md_editor.css index 2d7d83d34..1434f11e7 100644 --- a/company/static/company/css/md_editor.css +++ b/company/static/company/css/md_editor.css @@ -92,4 +92,4 @@ #markdown-editor #input-output .show { display: block !important; -} \ No newline at end of file +} diff --git a/company/static/company/js/md_editor.js b/company/static/company/js/md_editor.js index 11ad345de..b4096a9ea 100644 --- a/company/static/company/js/md_editor.js +++ b/company/static/company/js/md_editor.js @@ -313,4 +313,4 @@ function escapeHTML(unsafeText) { let div = document.createElement('div'); div.textContent = unsafeText; return div.innerHTML; -} \ No newline at end of file +} diff --git a/company/templates/company/add_domain.html b/company/templates/company/add_domain.html index 7b9caa533..9eef078a2 100644 --- a/company/templates/company/add_domain.html +++ b/company/templates/company/add_domain.html @@ -1,326 +1,217 @@ -{% extends 'company/company_dashboard_base.html' %} - -{% block title %} Add Domain {% endblock title %} - +{% extends "company/company_dashboard_base.html" %} +{% block title %} + Add Domain +{% endblock title %} {% block body %} -
-

- Add Domain -

+

Add Domain

- -
+ {% csrf_token %}
-

- Domain Information -

-

- Use a permanent address where you can receive mail. -

- +

Domain Information

+

Use a permanent address where you can receive mail.

- +
- +
-
- +
- +
- -
- -
- +
+ +
+ +
-
- - -
- -
- +
+ +
+ +
-
- -
- -
- +
+ +
+ +
-
- -
- -
- +
+ +
+ +
-
-
-
- -
- - -
-{% endblock %} - +{% endblock body %} {% block js %} - -{% endblock %} \ No newline at end of file +{% endblock js %} diff --git a/company/templates/company/bughunt/add_bughunt.html b/company/templates/company/bughunt/add_bughunt.html index ba88041c2..746ce3014 100644 --- a/company/templates/company/bughunt/add_bughunt.html +++ b/company/templates/company/bughunt/add_bughunt.html @@ -1,230 +1,194 @@ -{% extends 'company/company_dashboard_base.html' %} +{% extends "company/company_dashboard_base.html" %} {% load static %} - -{% block title %} Add Bughunt {% endblock title %} - +{% block title %} + Add Bughunt +{% endblock title %} {% block body %} -
-

- Add Bughunt -

+

Add Bughunt

- -
+ {% csrf_token %}
-

- Create new online Bughunt -

- - +

Create new online Bughunt

- +
- +
-
- +
- +
- - - -
- -
- -
-
- - -
- -
-
-
- -
- -
- to -
-
- +
+ +
+
-
-
-
-
- -
-
- -
- -