Reset AssignmentCompletion data on reset action
This commit is contained in:
parent
d2f916bc79
commit
edc1eed60d
|
|
@ -1,5 +1,6 @@
|
|||
import djclick as click
|
||||
|
||||
from vbv_lernwelt.assignment.models import AssignmentCompletion
|
||||
from vbv_lernwelt.core.models import User
|
||||
from vbv_lernwelt.course.models import CourseCompletion
|
||||
from vbv_lernwelt.notify.models import Notification
|
||||
|
|
@ -10,4 +11,5 @@ def command():
|
|||
print("cypress reset data")
|
||||
CourseCompletion.objects.all().delete()
|
||||
Notification.objects.all().delete()
|
||||
AssignmentCompletion.objects.all().delete()
|
||||
User.objects.all().update(language="de")
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ def cypress_reset_view(request):
|
|||
if settings.APP_ENVIRONMENT != "production":
|
||||
call_command("cypress_reset")
|
||||
|
||||
return HttpResponseRedirect("/admin/")
|
||||
return HttpResponseRedirect("/server/admin/")
|
||||
|
||||
|
||||
@django_view_authentication_exempt
|
||||
|
|
|
|||
|
|
@ -9,10 +9,6 @@
|
|||
{% csrf_token %}
|
||||
<button class="btn" name="">Testdaten zurück setzen</button>
|
||||
</form>
|
||||
<form action="/api/core/schemareset/" method="post">
|
||||
{% csrf_token %}
|
||||
<button class="btn" name="">Datenbank zurück setzen</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue