Advertisement
dzocesrce

[DNICK] Balloon Flights

Jun 7th, 2024
241
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 23.65 KB | None | 0 0
  1. # LightyNicole, a balloon flight company owned by one and only, comedian Vlatco Spasev!
  2. # managed to create both index and flights.html, as well as the unnecessary edit functionality for every listed flight, just to make sure I am on track with Djangosrce.
  3. #although, it might have made more sense if it showed details when you click on a flight rather than editing it.
  4.  
  5. ----------------------------models.py------------------------------------
  6.  
  7. from django.db import models
  8. from django.contrib.auth.models import User
  9. # Create your models here.
  10.  
  11. class Pilot(models.Model):
  12.     name = models.CharField(max_length=50)
  13.     surname = models.CharField(max_length=50)
  14.     year_of_birth = models.IntegerField()
  15.     hours_in_air = models.IntegerField()
  16.     role = models.CharField(max_length=50)
  17.  
  18. class Balloon(models.Model):
  19.     type = models.CharField(max_length=50)
  20.     manifactor_name = models.CharField(max_length=50)
  21.     max_attendees = models.IntegerField()
  22.  
  23. class Aerocompany(models.Model):
  24.     name = models.CharField(max_length=50)
  25.     year = models.IntegerField()
  26.     flyOutOfEU = models.BooleanField(default=False)
  27.  
  28. class Flight(models.Model):
  29.     code = models.CharField(max_length=50)
  30.     airport_from = models.CharField(max_length=50)
  31.     airport_to = models.CharField(max_length=50)
  32.     user = models.ForeignKey(User, on_delete=models.CASCADE)
  33.     image = models.ImageField(upload_to='sliki/', null=True, blank=True)
  34.     balloon = models.ForeignKey(Balloon,models.CASCADE)
  35.     aerocompany = models.ForeignKey(Aerocompany,models.CASCADE)
  36.  
  37. class AerocompanyPilot(models.Model):
  38.     aerocompany = models.ForeignKey(Aerocompany, models.CASCADE)
  39.     pilot = models.ForeignKey(Pilot,models.CASCADE)
  40.  
  41. ----------------------------admin.py------------------------------------
  42.  
  43. from django.contrib import admin
  44. from .models import Aerocompany,Balloon,Flight,Pilot,AerocompanyPilot
  45. # Register your models here.
  46.  
  47. class AerocompanyPilotInline(admin.TabularInline):
  48.     model = AerocompanyPilot
  49.     extra = 1
  50. class PilotAdmin(admin.ModelAdmin):
  51.     list_display = ('name', 'surname',)
  52. class AerocompanyAdmin(admin.ModelAdmin):
  53.     inlines = [AerocompanyPilotInline]
  54.     list_display = ('name',)
  55. class FlightAdmin(admin.ModelAdmin):
  56.     exclude = ("user",)
  57.     def save_model(self, request, obj, form, change):
  58.         obj.user = request.user
  59.         super().save_model(request, obj, form, change)
  60.     def has_change_permission(self, request, obj=None):
  61.         if obj and obj.user==request.user:
  62.             return True
  63.         return False
  64.     def has_delete_permission(self, request, obj=None):
  65.         return False
  66.  
  67. admin.site.register(Flight, FlightAdmin)
  68. admin.site.register(Aerocompany, AerocompanyAdmin)
  69. admin.site.register(Pilot, PilotAdmin)
  70. admin.site.register(Balloon)
  71.  
  72. ----------------------------settings.py------------------------------------
  73.  
  74. import os
  75. from pathlib import Path
  76.  
  77. INSTALLED_APPS = [
  78.     'django.contrib.admin',
  79.     'django.contrib.auth',
  80.     'django.contrib.contenttypes',
  81.     'django.contrib.sessions',
  82.     'django.contrib.messages',
  83.     'django.contrib.staticfiles',
  84.     'BalloonApp'
  85. ]
  86.  
  87. STATIC_URL = 'static/'
  88. MEDIA_ROOT = os.path.join(BASE_DIR,'media/')
  89. MEDIA_URL = '/media/'
  90.  
  91. ----------------------------urls.py------------------------------------
  92.  
  93. from django.contrib import admin
  94. from django.urls import path
  95. from django.conf.urls.static import static
  96. from django.conf import settings
  97. from BaloonApp.views import flights, index, edit_flight
  98. urlpatterns = [
  99.     path('admin/', admin.site.urls),
  100.     path('index/', index, name='index.html',),
  101.     path('flights/', flights, name='flights.html'),
  102.     # path('details/<int:pk>/',details, name='details.html' ),
  103.     path('edit_flight/<int:pk>/', edit_flight, name='edit_flight.html'),
  104.     # path('deleteProduct/<int:pk>/', deleteProduct, name='deleteProduct.html'),
  105. ] + static(settings.MEDIA_URL, document_root = settings.MEDIA_ROOT)
  106.  
  107.  
  108. ----------------------------views.py------------------------------------
  109.  
  110. from django.shortcuts import render, redirect
  111. from .models import Flight
  112. from .forms import FlightForm
  113. from django.shortcuts import get_object_or_404
  114. # Create your views here.
  115.  
  116. def flights(request):
  117.     if request.method=="POST":
  118.         form = FlightForm(request.POST, request.FILES)
  119.         if form.is_valid():
  120.             flight = form.save(commit=False)
  121.             flight.user= request.user
  122.             flight.image = form.cleaned_data['image']
  123.             flight.save()
  124.             return redirect("flights.html")
  125.     queryset = Flight.objects.filter(airport_from="Skopje").all()
  126.     context = {'flights': queryset, 'form': FlightForm}
  127.     return render(request,'flights.html',context = context)
  128.  
  129.  
  130. def index(request):
  131.     return render(request,'index.html')
  132.  
  133.  
  134. def edit_flight(request,pk):
  135.     flight = get_object_or_404(Flight, pk=pk)
  136.     if request.method=="POST":
  137.         form = FlightForm(request.POST, request.FILES, instance=flight)
  138.         if form.is_valid():
  139.             form.save()
  140.             return redirect("flights.html")
  141.     form = FlightForm(instance=flight)
  142.     return render(request, 'edit_flight.html', {'form': form})
  143.  
  144. ----------------------------forms.py------------------------------------
  145.  
  146. from django import forms
  147. from .models import Flight
  148.  
  149.  
  150. class FlightForm(forms.ModelForm):
  151.     def __init__(self, *args, **kwargs):
  152.         super(FlightForm, self).__init__(*args, **kwargs)
  153.         for field in self.visible_fields():
  154.             field.field.widget.attrs['class'] = "form-control"
  155.  
  156.     class Meta:
  157.         model = Flight
  158.         exclude = ['user', ]
  159.  
  160. ----------------------------templates------------------------------------
  161. #import the bootstrap framework in each .html file's head tag:
  162. <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
  163.     <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz" crossorigin="anonymous"></script>
  164.  
  165. ----------------------------index.html------------------------------------
  166.  
  167. <body>
  168.  
  169. <div style="background-image: url('https://static.mycity.travel/manage/uploads/8/59/67650/1/vols-en-montgolfiere_1080.jpg'); background-blend-mode: darken">
  170.     <ul class="nav justify-content-center ">
  171.        
  172.   <li class="nav-item" >
  173.     <a style="color: white" class="nav-link active" style="justify-self: left" aria-current="page" href="#">Home</a>
  174.   </li>
  175.   <li class="nav-item dropdown">
  176.       <a style="color: white" class="nav-link dropdown-toggle" data-bs-toggle="dropdown" href="#" role="button" aria-expanded="false">Flights</a>
  177.         <ul class="dropdown-menu">
  178.           <li><a class="dropdown-item" href="{% url 'flights.html' %}">Action</a></li>
  179.           <li><a class="dropdown-item" href="#">Another action</a></li>
  180.           <li><a class="dropdown-item" href="#">Something else here</a></li>
  181.           <li><hr class="dropdown-divider"></li>
  182.           <li><a class="dropdown-item" href="#">Separated link</a></li>
  183.         </ul>
  184.   <li class="nav-item dropdown">
  185.       <a style="color: white" class="nav-link dropdown-toggle" data-bs-toggle="dropdown" href="#" role="button" aria-expanded="false">Planes</a>
  186.         <ul class="dropdown-menu">
  187.           <li><a class="dropdown-item" href="#">Action</a></li>
  188.           <li><a class="dropdown-item" href="#">Another action</a></li>
  189.           <li><a class="dropdown-item" href="#">Something else here</a></li>
  190.           <li><hr class="dropdown-divider"></li>
  191.           <li><a class="dropdown-item" href="#">Separated link</a></li>
  192.         </ul>
  193.   </li>
  194.           <li class="nav-item dropdown">
  195.       <a style="color: white" class="nav-link dropdown-toggle" data-bs-toggle="dropdown" href="#" role="button" aria-expanded="false">About Us</a>
  196.         <ul class="dropdown-menu">
  197.           <li><a class="dropdown-item" href="#">Action</a></li>
  198.           <li><a class="dropdown-item" href="#">Another action</a></li>
  199.           <li><a class="dropdown-item" href="#">Something else here</a></li>
  200.           <li><hr class="dropdown-divider"></li>
  201.           <li><a class="dropdown-item" href="#">Separated link</a></li>
  202.         </ul>
  203.   </li>
  204.           <li class="nav-item dropdown">
  205.       <a style="color: white" class="nav-link dropdown-toggle" data-bs-toggle="dropdown" href="#" role="button" aria-expanded="false">Contact</a>
  206.         <ul class="dropdown-menu">
  207.           <li><a class="dropdown-item" href="#">Action</a></li>
  208.           <li><a class="dropdown-item" href="#">Another action</a></li>
  209.           <li><a class="dropdown-item" href="#">Something else here</a></li>
  210.           <li><hr class="dropdown-divider"></li>
  211.           <li><a class="dropdown-item" href="#">Separated link</a></li>
  212.         </ul>
  213.   </li>
  214. </ul>
  215.     <p class="display-6" style="text-align: center; color: white; padding-top: 200px" >Best Airline Company</p>
  216.     <hr style="width: 20px; color: white">
  217.     <h1 class="display-1" style="text-align: center; color: white">Hot Air Balloon Rides</h1>
  218.     <div style="text-align: center; margin-top: 20px; padding-bottom: 80px">
  219.                 <button class="btn btn-primary">Get Your Ticket</button></div>
  220.     </div>
  221.    
  222.  
  223. <div class="container" style="padding-top: 10px; margin-top: 100px" >
  224.     <div class="row" style="justify-content: center">
  225.         <div class="col-md-6">
  226.             <h4 class="display-6" style="text-align: center; margin: 10px"><b>Safety First</b></h4>
  227.             <p style="margin-top: 20px; text-align: center">Panoramic view of Sv. Nikole Panoramic view of Sv. Nikole Panoramic view of Sv.
  228.                 Nikole Panoramic view of Sv. Nikole Panoramic view of Sv. Nikole Panoramic view of Sv. Nikole
  229.             Panoramic view of Sv. Nikole Panoramic view of Sv. Nikole Panoramic view of Sv. Nikole Panoramic view of Sv. Nikole
  230.             Panoramic view of Sv. Nikole Panoramic view of Sv. Nikole Panoramic view of Sv. Nikole Panoramic view of Sv. Nikole
  231.             Panoramic view of Sv. Nikole Panoramic view of Sv. Nikole Panoramic view of Sv. Nikole Panoramic view of Sv. Nikole
  232.             Panoramic view of Sv. Nikole Panoramic view of Sv. Nikole Panoramic view of Sv. Nikole Panoramic view of Sv. Nikole </p>
  233.             <div style="text-align: center; margin-top: 20px">
  234.                 <button class="btn btn-primary">Read More</button>
  235.             </div>
  236.    
  237.         </div>
  238.         <div class="col-md-6">
  239.             <img src="https://mobirise.com/bootstrap-template/best-bootstrap-templates/assets/images/ian-dooley-407846-unsplash-1110x740.jpg" style="height: 350px"; width="500px">
  240.         </div>
  241.     </div>
  242. </div>
  243.  
  244.  
  245.  
  246.  
  247. <div class="container" style="padding-top: 10px; margin-top: 100px" >
  248.     <div class="row" style="justify-content: center">
  249.         <div class="col-md-6">
  250.             <img src="https://mobirise.com/bootstrap-template/best-bootstrap-templates/assets/images/ravali-yan-96009-unsplash-1110x740.jpg" style="height: 350px"; width="500px">
  251.         </div>
  252.    
  253.    
  254.         <div class="col-md-6">
  255.             <h4 class="display-6" style="text-align: center; margin: 10px"><b>More Fun</b></h4>
  256.             <p style="margin-top: 20px; text-align: center">Panoramic view of Sv. Nikole Panoramic view of Sv. Nikole Panoramic view of Sv.
  257.                 Nikole Panoramic view of Sv. Nikole Panoramic view of Sv. Nikole Panoramic view of Sv. Nikole
  258.             Panoramic view of Sv. Nikole Panoramic view of Sv. Nikole Panoramic view of Sv. Nikole Panoramic view of Sv. Nikole
  259.             Panoramic view of Sv. Nikole Panoramic view of Sv. Nikole Panoramic view of Sv. Nikole Panoramic view of Sv. Nikole
  260.             Panoramic view of Sv. Nikole Panoramic view of Sv. Nikole Panoramic view of Sv. Nikole Panoramic view of Sv. Nikole
  261.             Panoramic view of Sv. Nikole Panoramic view of Sv. Nikole Panoramic view of Sv. Nikole Panoramic view of Sv. Nikole </p>
  262.             <div style="text-align: center; margin-top: 20px">
  263.                 <button class="btn btn-primary">Read More</button>
  264.             </div>
  265.    
  266.         </div>
  267.     </div>
  268. </div>
  269.  
  270.  
  271.  
  272.  
  273.  
  274.  
  275. <h2 class="display-5" style="text-align: center; margin-top: 40px"><b>Tickets</b></h2>
  276.  
  277. <div class="container" style="padding-top: 10px; margin-top: 40px">
  278.     <div class="row" style="justify-content: center">
  279.          
  280.        
  281.         <div class="col-md-4 card mb-4" >
  282.             <div class="card"  >
  283.                 <div style="text-align: center; background-color: deepskyblue; color: white" >
  284.                     <h4 style="padding-top: 20px">For Children(6-22 years old)</h4>
  285.                     <h6 class="display-6" style="padding-bottom: 20px">20$</h6>
  286.                 </div>
  287.        
  288.                 <div class="card-body" style="text-align: center; background-color: lightgray; color: black">
  289.                     <p>Visit Sv. Nikole</p>
  290.                     <hr>
  291.                     <p>Everywhere beauty</p>
  292.                     <hr>
  293.                     <p>Games with no frontiers</p>
  294.                     <button><a class="btn btn">Book Now</a></button>
  295.                 </div>
  296.             </div>
  297.         </div>
  298.        
  299.        
  300.                
  301.         <div class="col-md-4 card mb-4" >
  302.             <div class="card"  >
  303.                 <div style="text-align: center; background-color: deepskyblue; color: white" >
  304.                     <h4 style="padding-top: 20px">For Children(6-22 years old)</h4>
  305.                     <h6 class="display-6" style="padding-bottom: 20px">20$</h6>
  306.                 </div>
  307.        
  308.                 <div class="card-body" style="text-align: center; background-color: lightgray; color: black">
  309.                     <p>Visit Sv. Nikole</p>
  310.                     <hr>
  311.                     <p>Everywhere beauty</p>
  312.                     <hr>
  313.                     <p>Games with no frontiers</p>
  314.                     <button><a class="btn btn">Book Now</a></button>
  315.                 </div>
  316.             </div>
  317.         </div>
  318.        
  319.        
  320.                
  321.         <div class="col-md-4 card mb-4" >
  322.             <div class="card" >
  323.                 <div style="text-align: center; background-color: deepskyblue; color: white" >
  324.                     <h4 style="padding-top: 20px">For Children(6-22 years old)</h4>
  325.                     <h6 class="display-6" style="padding-bottom: 20px">20$</h6>
  326.                 </div>
  327.        
  328.                 <div class="card-body" style="text-align: center; background-color: lightgray; color: black">
  329.                     <p>Visit Sv. Nikole</p>
  330.                     <hr>
  331.                     <p>Everywhere beauty</p>
  332.                     <hr>
  333.                     <p>Games with no frontiers</p>
  334.                     <button><a class="btn btn">Book Now</a></button>
  335.                 </div>
  336.             </div>
  337.         </div>
  338.        
  339.        
  340.  
  341.        
  342.        
  343.     </div>
  344. </div>
  345.  
  346.  
  347.  
  348. <footer class="bg-primary" data-bs-theme="dark" style="padding-top: 20px; padding-bottom: 20px; margin-top: 40px">
  349.   <div class="container-fluid" style="text-align: center; color: white">
  350.     <h6 href="#">Copyright 2022 FINKI DNIC All Rights Reserved</h6>
  351.   </div>
  352. </footer>
  353.  
  354. </body>
  355.  
  356. ----------------------------flights.html------------------------------------
  357.  
  358. <body>
  359.  
  360. <div style="background-image: url('https://static.mycity.travel/manage/uploads/8/59/67650/1/vols-en-montgolfiere_1080.jpg'); background-blend-mode: darken">
  361.     <ul class="nav justify-content-center ">
  362.        
  363.   <li class="nav-item" >
  364.     <a style="color: white" class="nav-link active" style="justify-self: left" aria-current="page" href="{% url 'index.html' %}">Home</a>
  365.   </li>
  366.   <li class="nav-item dropdown">
  367.       <a style="color: white" class="nav-link dropdown-toggle" data-bs-toggle="dropdown" href="#" role="button" aria-expanded="false">Flights</a>
  368.         <ul class="dropdown-menu">
  369.           <li><a class="dropdown-item" href="#">Action</a></li>
  370.           <li><a class="dropdown-item" href="#">Another action</a></li>
  371.           <li><a class="dropdown-item" href="#">Something else here</a></li>
  372.           <li><hr class="dropdown-divider"></li>
  373.           <li><a class="dropdown-item" href="#">Separated link</a></li>
  374.         </ul>
  375.   <li class="nav-item dropdown">
  376.       <a style="color: white" class="nav-link dropdown-toggle" data-bs-toggle="dropdown" href="#" role="button" aria-expanded="false">Planes</a>
  377.         <ul class="dropdown-menu">
  378.           <li><a class="dropdown-item" href="#">Action</a></li>
  379.           <li><a class="dropdown-item" href="#">Another action</a></li>
  380.           <li><a class="dropdown-item" href="#">Something else here</a></li>
  381.           <li><hr class="dropdown-divider"></li>
  382.           <li><a class="dropdown-item" href="#">Separated link</a></li>
  383.         </ul>
  384.   </li>
  385.           <li class="nav-item dropdown">
  386.       <a style="color: white" class="nav-link dropdown-toggle" data-bs-toggle="dropdown" href="#" role="button" aria-expanded="false">About Us</a>
  387.         <ul class="dropdown-menu">
  388.           <li><a class="dropdown-item" href="#">Action</a></li>
  389.           <li><a class="dropdown-item" href="#">Another action</a></li>
  390.           <li><a class="dropdown-item" href="#">Something else here</a></li>
  391.           <li><hr class="dropdown-divider"></li>
  392.           <li><a class="dropdown-item" href="#">Separated link</a></li>
  393.         </ul>
  394.   </li>
  395.           <li class="nav-item dropdown">
  396.       <a style="color: white" class="nav-link dropdown-toggle" data-bs-toggle="dropdown" href="#" role="button" aria-expanded="false">Contact</a>
  397.         <ul class="dropdown-menu">
  398.           <li><a class="dropdown-item" href="#">Action</a></li>
  399.           <li><a class="dropdown-item" href="#">Another action</a></li>
  400.           <li><a class="dropdown-item" href="#">Something else here</a></li>
  401.           <li><hr class="dropdown-divider"></li>
  402.           <li><a class="dropdown-item" href="#">Separated link</a></li>
  403.         </ul>
  404.   </li>
  405. </ul>
  406.     <p class="display-6" style="text-align: center; color: white; padding-top: 200px" >Best Airline Company</p>
  407.     <hr style="width: 20px; color: white">
  408.     <h1 class="display-1" style="text-align: center; color: white">Hot Air Balloon Rides</h1>
  409.         <div style="text-align: center; margin-top: 20px; padding-bottom: 80px">
  410.                 <button class="btn btn-primary">Get Your Ticket</button></div>
  411.         </div>
  412. </div>
  413.  
  414.  
  415.  
  416.  
  417. <div class="container" style="padding-top: 40px;">
  418.     <div class="row" style="justify-content: center">
  419.         {% for flight in flights %}
  420.          <div class="col-md-4 card mb-4" style="max-width: 18rem;">
  421.              <div class="card" style="width: 18rem;"  style="border-color: red">
  422.   <img src= "{{ MEDIA_URL }} {{ flight.image.url }}" alt="...">
  423.   <div class="card-body text-bg-dark">
  424.       <h4 class="card-title"><b> {{flight.code}}</b></h4>
  425.     <h5 class="card-title">{{flight.airport_from}} - {{flight.airport_to}}</h5>
  426.     <p>Some quick example text to build on the card title and make up the bulk of the card's content.</p>
  427.    <button><a href="{% url 'edit_flight.html' flight.pk %}" class="btn btn" >Book Now</a></button>
  428.  </div>
  429. </div>
  430.         </div>
  431.  
  432.        {% endfor %}
  433.    </div>
  434. </div>
  435.  
  436.  
  437. <div class="container" style="padding: 20px; background-color: whitesmoke; box-shadow: black; margin-top: 40px">
  438.    <form method="post" enctype="multipart/form-data">
  439.        {% csrf_token %}
  440.        {{ form.as_p }}
  441.        <button class="btn btn-primary" type="submit">Submit</button>
  442.    </form>
  443. </div>
  444.  
  445.  
  446.  
  447. <footer class="bg-primary" data-bs-theme="dark" style="padding-top: 20px; padding-bottom: 20px; margin-top: 40px">
  448.  <div class="container-fluid" style="text-align: center; color: white">
  449.    <h6 href="#">Copyright 2022 FINKI DNIC All Rights Reserved</h6>
  450.  </div>
  451. </footer>
  452. </body>
  453.  
  454. ----------------------------edit_flight.py------------------------------------
  455.  
  456. <body>
  457.  
  458. <div style="background-image: url('https://static.mycity.travel/manage/uploads/8/59/67650/1/vols-en-montgolfiere_1080.jpg'); background-blend-mode: darken">
  459.    <ul class="nav justify-content-center ">
  460.        
  461.  <li class="nav-item" >
  462.    <a style="color: white" class="nav-link active" style="justify-self: left" aria-current="page" href="{% url 'index.html' %}">Home</a>
  463.  </li>
  464.  <li class="nav-item dropdown">
  465.      <a style="color: white" class="nav-link dropdown-toggle" data-bs-toggle="dropdown" href="#" role="button" aria-expanded="false">Flights</a>
  466.        <ul class="dropdown-menu">
  467.          <li><a class="dropdown-item" href="#">Action</a></li>
  468.          <li><a class="dropdown-item" href="#">Another action</a></li>
  469.          <li><a class="dropdown-item" href="#">Something else here</a></li>
  470.          <li><hr class="dropdown-divider"></li>
  471.          <li><a class="dropdown-item" href="#">Separated link</a></li>
  472.        </ul>
  473.  <li class="nav-item dropdown">
  474.      <a style="color: white" class="nav-link dropdown-toggle" data-bs-toggle="dropdown" href="#" role="button" aria-expanded="false">Planes</a>
  475.        <ul class="dropdown-menu">
  476.          <li><a class="dropdown-item" href="#">Action</a></li>
  477.          <li><a class="dropdown-item" href="#">Another action</a></li>
  478.          <li><a class="dropdown-item" href="#">Something else here</a></li>
  479.          <li><hr class="dropdown-divider"></li>
  480.          <li><a class="dropdown-item" href="#">Separated link</a></li>
  481.        </ul>
  482.  </li>
  483.          <li class="nav-item dropdown">
  484.      <a style="color: white" class="nav-link dropdown-toggle" data-bs-toggle="dropdown" href="#" role="button" aria-expanded="false">About Us</a>
  485.        <ul class="dropdown-menu">
  486.          <li><a class="dropdown-item" href="#">Action</a></li>
  487.          <li><a class="dropdown-item" href="#">Another action</a></li>
  488.          <li><a class="dropdown-item" href="#">Something else here</a></li>
  489.          <li><hr class="dropdown-divider"></li>
  490.          <li><a class="dropdown-item" href="#">Separated link</a></li>
  491.        </ul>
  492.  </li>
  493.          <li class="nav-item dropdown">
  494.      <a style="color: white" class="nav-link dropdown-toggle" data-bs-toggle="dropdown" href="#" role="button" aria-expanded="false">Contact</a>
  495.        <ul class="dropdown-menu">
  496.          <li><a class="dropdown-item" href="#">Action</a></li>
  497.          <li><a class="dropdown-item" href="#">Another action</a></li>
  498.          <li><a class="dropdown-item" href="#">Something else here</a></li>
  499.          <li><hr class="dropdown-divider"></li>
  500.          <li><a class="dropdown-item" href="#">Separated link</a></li>
  501.        </ul>
  502.  </li>
  503. </ul>
  504.    <p class="display-6" style="text-align: center; color: white; padding-top: 200px" >Best Airline Company</p>
  505.    <hr style="width: 20px; color: white">
  506.    <h1 class="display-1" style="text-align: center; color: white">Hot Air Balloon Rides</h1>
  507.        <div style="text-align: center; margin-top: 20px; padding-bottom: 80px">
  508.                <button class="btn btn-primary">Get Your Ticket</button></div>
  509.        </div>
  510. </div>
  511.  
  512.  
  513. <h2 style="text-align: center; margin-top: 40px">Edit the Flight {{ flight.pk }}</h2>
  514. <div class="container" style="padding-top: 40px; background-color: whitesmoke; box-shadow: black;">
  515.    <form method="post" enctype="multipart/form-data">
  516.        {% csrf_token %}
  517.        {{ form.as_p }}
  518.        <button class="btn btn-primary" type="submit">Submit</button>
  519.    </form>
  520. </div>
  521.  
  522.  
  523. <footer class="bg-primary" data-bs-theme="dark" style="padding-top: 20px; padding-bottom: 20px; margin-top: 40px">
  524.  <div class="container-fluid" style="text-align: center; color: white">
  525.    <h6 href="#">Copyright 2022 FINKI DNIC All Rights Reserved</h6>
  526.  </div>
  527. </footer>
  528.  
  529. </body>
  530.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement