Skip to content

Commit

Permalink
Merge branch 'main' into notification-prompts
Browse files Browse the repository at this point in the history
  • Loading branch information
SahilDhillon21 authored Jan 19, 2025
2 parents 4d4c964 + 01b62f0 commit c68a9e1
Show file tree
Hide file tree
Showing 12 changed files with 962 additions and 22 deletions.
8 changes: 8 additions & 0 deletions blt/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
OrganizationDashboardManageBugsView,
OrganizationDashboardManageDomainsView,
OrganizationDashboardManageRolesView,
OrganizationDashboardTeamOverviewView,
RegisterOrganizationView,
ShowBughuntView,
SlackCallbackView,
Expand Down Expand Up @@ -185,6 +186,7 @@
distribute_bacon,
select_contribution,
)
from website.views.slack_handlers import slack_events
from website.views.teams import (
TeamOverview,
add_member,
Expand Down Expand Up @@ -696,6 +698,11 @@
OrganizationDashboardManageBugsView.as_view(),
name="organization_manage_bugs",
),
path(
"organization/<int:id>/dashboard/team-overview/",
OrganizationDashboardTeamOverviewView.as_view(),
name="organization_team_overview",
),
path(
"organization/<int:id>/dashboard/domains/",
OrganizationDashboardManageDomainsView.as_view(),
Expand Down Expand Up @@ -855,6 +862,7 @@
),
path("projects/create/", create_project, name="create_project"),
path("project/<slug:slug>/", ProjectsDetailView.as_view(), name="projects_detail"),
path("slack/events", slack_events, name="slack_events"),
]

if settings.DEBUG:
Expand Down
40 changes: 20 additions & 20 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ newrelic = "^10.4.0"
[tool.poetry.group.dev.dependencies]
black = "^24.8.0"
isort = "^5.13.2"
ruff = "^0.9.1"
ruff = "^0.9.2"
pre-commit = "^3.8.0"

[tool.isort]
Expand Down
23 changes: 23 additions & 0 deletions website/management/commands/run_daily.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import logging

from django.core.management.base import BaseCommand

# from django.core import management
from django.utils import timezone

logger = logging.getLogger(__name__)


class Command(BaseCommand):
help = "Runs commands scheduled to execute daily"

def handle(self, *args, **options):
try:
logger.info(f"Starting daily scheduled tasks at {timezone.now()}")

# Add commands to be executed daily
# management.call_command('daily_command1')
# management.call_command('daily_command2')
except Exception as e:
logger.error(f"Error in daily tasks: {str(e)}")
raise
23 changes: 23 additions & 0 deletions website/management/commands/run_hourly.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import logging

from django.core.management.base import BaseCommand

# from django.core import management
from django.utils import timezone

logger = logging.getLogger(__name__)


class Command(BaseCommand):
help = "Runs commands scheduled to execute hourly"

def handle(self, *args, **options):
try:
logger.info(f"Starting hourly scheduled tasks at {timezone.now()}")

# We can add hourly commands here
# management.call_command('hourly_command1')
# management.call_command('hourly_command2')
except Exception as e:
logger.error(f"Error in hourly tasks: {str(e)}")
raise
23 changes: 23 additions & 0 deletions website/management/commands/run_monthly.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import logging

from django.core.management.base import BaseCommand

# from django.core import management
from django.utils import timezone

logger = logging.getLogger(__name__)


class Command(BaseCommand):
help = "Runs commands scheduled to execute monthly"

def handle(self, *args, **options):
try:
logger.info(f"Starting monthly scheduled tasks at {timezone.now()}")

# Add commands to be executed monthly
# management.call_command('monthly_command1')
# management.call_command('monthly_command2')
except Exception as e:
logger.error(f"Error in monthly tasks: {str(e)}")
raise
23 changes: 23 additions & 0 deletions website/management/commands/run_weekly.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import logging

from django.core.management.base import BaseCommand

# from django.core import management
from django.utils import timezone

logger = logging.getLogger(__name__)


class Command(BaseCommand):
help = "Runs commands scheduled to execute weekly"

def handle(self, *args, **options):
try:
logger.info(f"Starting weekly scheduled tasks at {timezone.now()}")

# Add commands to be executed weekly
# management.call_command('weekly_command1')
# management.call_command('weekly_command2')
except Exception as e:
logger.error(f"Error in weekly tasks: {str(e)}")
raise
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ <h2 class="sidebar__logo-header font-bold">{{ organization_obj.name | slice:":15
<span>Analytics</span>
</li>
</a>
<a href="{% url 'organization_team_overview' organization %}">
<li id="team-overview" class="side-nav__item">
<i class="fa-sharp fa-solid fa-users fa-lg"></i>
<span>Team Overview</span>
</li>
</a>
<a href="{% url 'organization_manage_bugs' organization %}">
<li id="bugs" class="side-nav__item">
<i class="fa-sharp fa-solid fa-bug fa-lg"></i>
Expand All @@ -38,7 +44,7 @@ <h2 class="sidebar__logo-header font-bold">{{ organization_obj.name | slice:":15
</a>
<a href="{% url 'organization_manage_roles' organization %}">
<li id="domains" class="side-nav__item">
<i class="fa-sharp fa-solid fa-users fa-lg"></i>
<i class="fa-solid fa-network-wired fa-lg"></i>
<span>Roles</span>
</li>
</a>
Expand Down
Loading

0 comments on commit c68a9e1

Please sign in to comment.