<commit_before><commit_msg>Create views to display a list of servers, and server details<commit_after>from django.shortcuts import get_object_or_404, render
from .models import Server


def index(request):
    '''
    Display a list of any and all servers in the Minecrunch network
    '''

    servers = Server.objects.all()

    return render(request, 'servers/servers.html', {'servers': servers}))


def server(request, slug):
    '''
    A detailed description of a single server, including a dynmap window
    '''

    server = get_object_or_404(Server, slug=slug)

    return render(request, 'servers/server.html', {'server': server}))

{'fraction_non_alphanumeric': 0.1059190031152648, 'fraction_numerical': 0.009345794392523364, 'mean_word_length': 4.144, 'pattern_counts': {'":': 0, '<': 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': '3908471', 'n_tokens_mistral': 187, 'n_tokens_neox': 179, 'n_words': 62}