<commit_before>import os

from django.http import HttpResponse
from django.shortcuts import render
from django.template import Context
from .models import Photo
from imagersite.settings import MEDIA_URL
# Create your views here.


def album_view(request):
    return HttpResponse('Fuck You! I\'m a web page!')

def library_view(request):
    return HttpResponse('Fuck You! I\'m a web page!')

def image_view(request, uuid=None):
    my_photo = Photo.objects.get(photo_id=uuid)
    context = Context({
        "file_name": my_photo.upload,
        "file": os.path.join(MEDIA_URL, str(my_photo.upload))
    })
    return render(request, 'photo.html', context)<commit_msg>stuff2<commit_after>import os

from django.http import HttpResponse
from django.shortcuts import render
from django.template import Context
from .models import Photo
from imagersite.settings import BASE_DIR, MEDIA_ROOT
# Create your views here.


def album_view(request):
    return HttpResponse('Fuck You! I\'m a web page!')

def library_view(request):
    return HttpResponse('Fuck You! I\'m a web page!')

def image_view(request, uuid=None):
    import pdb; pdb.set_trace()
    my_photo = Photo.objects.filter(photo_id=uuid)
    context = Context({
        "file_name": my_photo[0].upload,
        "file": os.path.join(MEDIA_ROOT, str(my_photo[0].upload))
    })
    return render(request, 'photo.html', context)
{'fraction_non_alphanumeric': 0.10910404624277456, 'fraction_numerical': 0.002167630057803468, 'mean_word_length': 4.41015625, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5916470', 'n_tokens_mistral': 439, 'n_tokens_neox': 428, 'n_words': 123}