Skip to content

Commit

Permalink
Changes:
Browse files Browse the repository at this point in the history
- updated `pyproject.toml`
- Added `dashboard` app
  • Loading branch information
ece-mohammad committed Jul 22, 2023
1 parent 44431ef commit 4982568
Show file tree
Hide file tree
Showing 10 changed files with 69 additions and 4 deletions.
Empty file added dashboard/__init__.py
Empty file.
3 changes: 3 additions & 0 deletions dashboard/admin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.contrib import admin

# Register your models here.
6 changes: 6 additions & 0 deletions dashboard/apps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from django.apps import AppConfig


class DashboardConfig(AppConfig):
default_auto_field = "django.db.models.BigAutoField"
name = "dashboard"
3 changes: 3 additions & 0 deletions dashboard/models.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.db import models

# Create your models here.
22 changes: 22 additions & 0 deletions dashboard/templates/dashboard/dashboard.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{% extends 'base/base_page.html' %}

{% comment %} dashboard/dashboard.html {% endcomment %}

{% block title %}Dashboard{% endblock title %}


{% block body %}

<h1>Dashboard</h1>

<br>
<div>
<a href="{% url 'devices:group_list' %}">My Device Groups</a>
</div>

<br>
<div>
<a href="{% url 'devices:device_list' %}">My Devices</a>
</div>

{% endblock body %}
3 changes: 3 additions & 0 deletions dashboard/tests.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.test import TestCase

# Create your tests here.
11 changes: 11 additions & 0 deletions dashboard/urls.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from django.urls import path


from . import views


app_name = "dashboard"

urlpatterns = [
path("", views.DashboardView.as_view(), name="dashboard"),
]
9 changes: 9 additions & 0 deletions dashboard/views.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

from django.shortcuts import render
from django.views.generic import TemplateView

# Create your views here.


class DashboardView(TemplateView):
template_name = "dashboard/dashboard.html"
9 changes: 9 additions & 0 deletions dashboard/views.py,cover
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

> from django.shortcuts import render
> from django.views.generic import TemplateView

# Create your views here.


> class DashboardView(TemplateView):
> template_name = "dashboard/dashboard.html"
7 changes: 3 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,14 @@ django-debug-toolbar = "^4.1.0"
pytest-skip-slow = "^0.0.5"

[tool.pytest.ini_options]
addopts = "-x -n 8 -v --cov --cov-report html --cov-report term-missing --cov-report lcov --cov-report xml --cov-report json"
# addopts = "-n 8 -v"
addopts = "-x -n 4 -v --cov --cov-report html --cov-report term-missing --cov-report lcov --cov-report xml --cov-report json"
# addopts = "-x -n 4 -v"
console_output_style = "count"
required_plugins = "pytest-django pytest-xdist pytest-cov"
DJANGO_SETTINGS_MODULE = "sia.settings"
python_files = [
"accounts/tests/test_*.py",
"devices/tests/group/test_*.py",
"devices/tests/device/test_*.py",
"devices/tests/*/test_*.py",
"dashboard/tests/test_*.py",
"mqtt/tests/test_*.py",
"tests/utils/tests/test_*.py",
Expand Down

0 comments on commit 4982568

Please sign in to comment.