Anki

Aus ahrensburg.city

Anki

Installation und Starten

Django

Grundaufbau einer Django Anwendung und Installieren von Django

python -m venv .venv
source .venv/bin/activate
pip install django
django-admin startproject Projekt

asp net core

Grundaufbau einer asp net core Anwendung und Installieren von asp net core mvc

dotnet new mvc -au Individual -o Projekt

Django App erstellen

Erstellen einer Django App innerhalb eines Django Projekts namens App
{{c1::python manage.py startapp App}}

Spring Boot Controller erstellen in mvc

Erstellen eines Controllers in Spring Boot MVC namens Start.
Mit der URL /start und der Methode index wird das Template index.html ausgegeben.

{{c1::@Controller}}
{{c1::public class Start {}}
    {{c1::@GetMapping("/start")}}
    {{c1::public String index() {}}
        {{c1::return "index";}}
   {{c1::}}}
{{c1::}}}

views.py

Funktion namens home erstellen und das Template home.html ohne Parameter in der Datei views.py in Django verwenden.
{{c1::def home(request):}}
    {{c1::return render(request,'home.html')}}

Asp net core Controller

Erstellen eines Controllers in ASP.NET Core MVC namens StartController. Die Methode Index gibt das Template Index aus.   
{{c1::public class StartController : Controller}}
    {{c1::{ }}
        {{c1::public IActionResult Index()}}
        {{c1::{ }}
            {{c1::return View();}}
        {{c1::} }}
    {{c1::} }}