|
|
|
@ -16,15 +16,15 @@ from django.template import RequestContext
|
|
|
|
|
from buyable.models import Purchase, Buyable, BuyableType
|
|
|
|
|
from main.helper import getUserFromAuthblob
|
|
|
|
|
from main.models import Plugin, PluginPermission
|
|
|
|
|
|
|
|
|
|
from settings import SNACK_TYPE_ID, DRINK_TYPE_ID
|
|
|
|
|
|
|
|
|
|
@login_required
|
|
|
|
|
def startpage(request):
|
|
|
|
|
''' Diese Funktion wird wahrscheinlich viel Last erzeugen, da
|
|
|
|
|
sie ueber mehrere Tabellen joined,filtered und wieder reduced.
|
|
|
|
|
'''
|
|
|
|
|
drinks = BuyableType.objects.get(name="Getränk").buyable_set.all()
|
|
|
|
|
snacks = BuyableType.objects.get(name="Snack").buyable_set.all()
|
|
|
|
|
drinks = BuyableType.objects.get(pk=DRINK_TYPE_ID).buyable_set.all()
|
|
|
|
|
snacks = BuyableType.objects.get(pk=SNACK_TYPE_ID).buyable_set.all()
|
|
|
|
|
|
|
|
|
|
context = {}
|
|
|
|
|
|
|
|
|
@ -163,7 +163,6 @@ def pluginAuthblob(request, pluginId):
|
|
|
|
|
if p.plugin.uniqueAuthblob:
|
|
|
|
|
print authblob.split("\n")
|
|
|
|
|
for line in authblob.split("\n"):
|
|
|
|
|
print "'%s'" % (line,), " <-- "
|
|
|
|
|
usr = getUserFromAuthblob(line, plugin)
|
|
|
|
|
if usr:
|
|
|
|
|
if usr == request.user:
|
|
|
|
|