Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mini update #28

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions api/views.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from django.http import JsonResponse, HttpResponse
from django.views.decorators.csrf import csrf_exempt
from shopdeck import settings
from datetime import datetime
from shopdeckdb.models import *
from django.core.exceptions import ObjectDoesNotExist
import time, random, string, os
Expand Down Expand Up @@ -340,8 +341,17 @@ def transactions(request):

ownedtitles = ownedTitle.objects.filter(owner=ds)

transactions = []
index = 1
transactions = [{
"date": datetime.now().strftime('%d-%m-%y'),
"type": "Register Key",
"description": "Here Is Your Key:" + ds.uniquekey,
"receipt": False,
"index": 1,
"id": 6
}]

ownedtitles = ownedTitle.objects.filter(owner=ds)
index = 2
for transaction in ownedtitles:
transactions.append({
"date": "14.04.2024",
Expand Down
9 changes: 1 addition & 8 deletions webtemplates/title.html
Original file line number Diff line number Diff line change
Expand Up @@ -114,14 +114,7 @@ <h3>Details</h3>
<p>Platform: {{ app.platform.name }}</p>
<p>Release date: {{ app.date }}</p>
<p>Title ID: {{ app.tid }}</p>
<h3>Screenshots</h3>
<div>
{% for screenshot in screenshots %}
<a href="{{ screenshot }}" data-fancybox="gallery">
<img src="{{ screenshot }}" alt="Screenshot">
</a>
{% endfor %}
</div>

</div>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.5.7/jquery.fancybox.min.js"></script>
Expand Down
4 changes: 2 additions & 2 deletions webtemplates/welcome.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ <h2>Please login to use the web interface.</h2>
<a href="/signup" class="btn btn-outline-light btn-lg px-5">Sign Up</a>
<br>
<br>
<p>Note: if you wanna get your 3DS Key, go to "Transactions" on Nintendo eShop Settings, while connected to {{ WEBUI_NAME }}.</p>
<p>Note: if you wanna get your 3DS Key, go to "Transactions" on Nintendo eShop Settings, while connected to {{ WEBUI_NAME }} and there in the list you will find the key.</p>
</div>
</div>
</body>
</html>
</html>