diff --git a/dhub/settings.py b/dhub/settings.py
index 6444f43..2baf522 100644
--- a/dhub/settings.py
+++ b/dhub/settings.py
@@ -47,7 +47,7 @@ INSTALLED_APPS = [
"login",
"user",
"device",
- "snapshot",
+ "evidence",
"action",
"tag",
"lot",
diff --git a/snapshot/__init__.py b/evidence/__init__.py
similarity index 100%
rename from snapshot/__init__.py
rename to evidence/__init__.py
diff --git a/snapshot/admin.py b/evidence/admin.py
similarity index 100%
rename from snapshot/admin.py
rename to evidence/admin.py
diff --git a/snapshot/apps.py b/evidence/apps.py
similarity index 84%
rename from snapshot/apps.py
rename to evidence/apps.py
index 5e9983e..af09568 100644
--- a/snapshot/apps.py
+++ b/evidence/apps.py
@@ -3,4 +3,4 @@ from django.apps import AppConfig
class ActionConfig(AppConfig):
default_auto_field = "django.db.models.BigAutoField"
- name = "snapshot"
+ name = "evidence"
diff --git a/snapshot/forms.py b/evidence/forms.py
similarity index 62%
rename from snapshot/forms.py
rename to evidence/forms.py
index 063c115..99abdb4 100644
--- a/snapshot/forms.py
+++ b/evidence/forms.py
@@ -2,7 +2,7 @@
class UploadForm(forms.Form):
- snapshot_file = forms.FileField(label=_("File"))
+ evidence_file = forms.FileField(label=_("File"))
def clean(self):
data = self.cleaned_data
diff --git a/snapshot/management/__init__.py b/evidence/management/__init__.py
similarity index 100%
rename from snapshot/management/__init__.py
rename to evidence/management/__init__.py
diff --git a/snapshot/management/commands/__init__.py b/evidence/management/commands/__init__.py
similarity index 100%
rename from snapshot/management/commands/__init__.py
rename to evidence/management/commands/__init__.py
diff --git a/snapshot/management/commands/up_snapshots.py b/evidence/management/commands/up_snapshots.py
similarity index 100%
rename from snapshot/management/commands/up_snapshots.py
rename to evidence/management/commands/up_snapshots.py
diff --git a/snapshot/migrations/0001_initial.py b/evidence/migrations/0001_initial.py
similarity index 100%
rename from snapshot/migrations/0001_initial.py
rename to evidence/migrations/0001_initial.py
diff --git a/snapshot/migrations/0002_remove_annotation_device.py b/evidence/migrations/0002_remove_annotation_device.py
similarity index 100%
rename from snapshot/migrations/0002_remove_annotation_device.py
rename to evidence/migrations/0002_remove_annotation_device.py
diff --git a/snapshot/migrations/__init__.py b/evidence/migrations/__init__.py
similarity index 100%
rename from snapshot/migrations/__init__.py
rename to evidence/migrations/__init__.py
diff --git a/snapshot/models.py b/evidence/models.py
similarity index 97%
rename from snapshot/models.py
rename to evidence/models.py
index 7c1a942..576c172 100644
--- a/snapshot/models.py
+++ b/evidence/models.py
@@ -3,11 +3,11 @@ import json
from django.db import models
from utils.constants import STR_SM_SIZE, STR_EXTEND_SIZE
-from snapshot.xapian import search
+from evidence.xapian import search
from user.models import User
-class Snapshot:
+class Evidence:
def __init__(self, uuid):
self.uuid = uuid
self.owner = None
diff --git a/snapshot/parse.py b/evidence/parse.py
similarity index 89%
rename from snapshot/parse.py
rename to evidence/parse.py
index ee0e8cc..f303b47 100644
--- a/snapshot/parse.py
+++ b/evidence/parse.py
@@ -4,14 +4,14 @@ import shutil
import hashlib
from datetime import datetime
-from snapshot.xapian import search, index
-from snapshot.models import Snapshot, Annotation
+from evidence.xapian import search, index
+from evidence.models import Evidence, Annotation
from utils.constants import ALGOS
class Build:
- def __init__(self, snapshot_json, user):
- self.json = snapshot_json
+ def __init__(self, evidence_json, user):
+ self.json = evidence_json
self.uuid = self.json['uuid']
self.user = user
self.hid = None
diff --git a/snapshot/serializers.py b/evidence/serializers.py
similarity index 88%
rename from snapshot/serializers.py
rename to evidence/serializers.py
index ef2662c..c9524b6 100644
--- a/snapshot/serializers.py
+++ b/evidence/serializers.py
@@ -1,15 +1,15 @@
from rest_framework import serializers
-from snapshot.models import SnapshotJson
+from evidence.models import EvidenceJson
import json
from django.views.decorators.csrf import csrf_exempt
from django.http import JsonResponse
-from snapshot.parse import Parse
+from evidence.parse import Parse
-class SnapshotSerializer(serializers.ModelSerializer):
+class EvidenceSerializer(serializers.ModelSerializer):
class Meta:
- model = SnapshotJson
+ model = EvidenceJson
fields = ['id', 'title', 'content']
@csrf_exempt
diff --git a/snapshot/templates/snapshots.html b/evidence/templates/evidences.html
similarity index 83%
rename from snapshot/templates/snapshots.html
rename to evidence/templates/evidences.html
index c1fdb39..3ce592d 100644
--- a/snapshot/templates/snapshots.html
+++ b/evidence/templates/evidences.html
@@ -19,14 +19,14 @@
- {% for snap in snapshots %}
+ {% for snap in evicendes %}
-
+
|
- {{ snap.uuid }} {{ snap.sid }} {{ snap.version }}
+ {{ snap.uuid }} {{ snap.sid }} {{ snap.version }}
|
{{ snap.computer.device.manufacturer }} {{ snap.computer.device.model }}
diff --git a/snapshot/tests.py b/evidence/tests.py
similarity index 100%
rename from snapshot/tests.py
rename to evidence/tests.py
diff --git a/snapshot/urls.py b/evidence/urls.py
similarity index 74%
rename from snapshot/urls.py
rename to evidence/urls.py
index b3e00f9..7a6e992 100644
--- a/snapshot/urls.py
+++ b/evidence/urls.py
@@ -9,10 +9,10 @@
# path('', include(router.urls)),
# ]
from django.urls import path
-from snapshot import views
+from evidence import views
-app_name = 'snapshot'
+app_name = 'evidence'
urlpatterns = [
- path("", views.ListSnapshotsView.as_view(), name="list"),
+ path("", views.ListEvidencesView.as_view(), name="list"),
]
diff --git a/snapshot/views.py b/evidence/views.py
similarity index 74%
rename from snapshot/views.py
rename to evidence/views.py
index 6a7f98b..543283b 100644
--- a/snapshot/views.py
+++ b/evidence/views.py
@@ -8,7 +8,7 @@ from django.views.generic.edit import (
)
from dashboard.mixins import DashboardView
-from snapshot.models import Snapshot, Annotation
+from evidence.models import Evidence, Annotation
# from snapshot.forms import UploadForm
# from django.shortcuts import render
# from rest_framework import viewsets
@@ -20,18 +20,18 @@ from snapshot.models import Snapshot, Annotation
# serializer_class = SnapshotSerializer
-class ListSnapshotsView(DashboardView, TemplateView):
- template_name = "snapshots.html"
- section = "snapshots"
- title = _("Snapshots")
- breadcrumb = "Snapshots"
+class ListEvidencesView(DashboardView, TemplateView):
+ template_name = "evidences.html"
+ section = "evidences"
+ title = _("Evidences")
+ breadcrumb = "Evidences"
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
- # snapshots = Snapshot.objects.filter(owner=self.request.user)
- snapshots = []
+ # evidences = Evidence.objects.filter(owner=self.request.user)
+ evidences = []
context.update({
- 'snapshots': snapshots,
+ 'evidences': evidences,
})
return context
diff --git a/snapshot/xapian.py b/evidence/xapian.py
similarity index 100%
rename from snapshot/xapian.py
rename to evidence/xapian.py
diff --git a/lot/models.py b/lot/models.py
index 9237a27..9940594 100644
--- a/lot/models.py
+++ b/lot/models.py
@@ -8,7 +8,7 @@ from utils.constants import (
from user.models import User
# from device.models import Device
-from snapshot.models import Annotation
+from evidence.models import Annotation
class LotTag(models.Model):
|