def index(request):
    if request.user.is_authenticated:
        projects = list(request.profile.projects())
        ctx = {'page': 'projects', 'projects': projects, 'last_project_id': request.session.get('last_project_id')}
        return render(request, 'front/projects.html', ctx)
    check = Check()
    ctx = {'page': 'welcome', 'check': check, 'ping_url': check.url(), 'enable_apprise': (settings.APPRISE_ENABLED is True), 'enable_call': (settings.TWILIO_AUTH is not None), 'enable_discord': (settings.DISCORD_CLIENT_ID is not None), 'enable_linenotify': (settings.LINENOTIFY_CLIENT_ID is not None), 'enable_matrix': (settings.MATRIX_ACCESS_TOKEN is not None), 'enable_pdc': (settings.PD_VENDOR_KEY is not None), 'enable_pushbullet': (settings.PUSHBULLET_CLIENT_ID is not None), 'enable_pushover': (settings.PUSHOVER_API_TOKEN is not None), 'enable_shell': (settings.SHELL_ENABLED is True), 'enable_slack_btn': (settings.SLACK_CLIENT_ID is not None), 'enable_sms': (settings.TWILIO_AUTH is not None), 'enable_telegram': (settings.TELEGRAM_TOKEN is not None), 'enable_trello': (settings.TRELLO_APP_KEY is not None), 'enable_whatsapp': settings.TWILIO_USE_WHATSAPP, 'registration_open': settings.REGISTRATION_OPEN}
    return render(request, 'front/welcome.html', ctx)
def index(request):
    if request.user.is_authenticated:
        projects = list(request.profile.projects())
        ctx = {'page': 'projects', 'projects': projects, 'last_project_id': request.session.get('last_project_id')}
        return render(request, 'front/projects.html', ctx)
    check = Check()
    ctx = {'page': 'welcome', 'check': check, 'ping_url': check.url(), 'enable_apprise': (settings.APPRISE_ENABLED is True), 'enable_call': (settings.TWILIO_AUTH is not None), 'enable_discord': (settings.DISCORD_CLIENT_ID is not None), 'enable_linenotify': (settings.LINENOTIFY_CLIENT_ID is not None), 'enable_matrix': (settings.MATRIX_ACCESS_TOKEN is not None), 'enable_pdc': (settings.PD_VENDOR_KEY is not None), 'enable_pushbullet': (settings.PUSHBULLET_CLIENT_ID is not None), 'enable_pushover': (settings.PUSHOVER_API_TOKEN is not None), 'enable_shell': (settings.SHELL_ENABLED is True), 'enable_slack_btn': (settings.SLACK_CLIENT_ID is not None), 'enable_sms': (settings.TWILIO_AUTH is not None), 'enable_telegram': (settings.TELEGRAM_TOKEN is not None), 'enable_trello': (settings.TRELLO_APP_KEY is not None), 'enable_whatsapp': settings.TWILIO_USE_WHATSAPP, 'registration_open': settings.REGISTRATION_OPEN}
    return render(request, 'front/welcome.html', ctx)