This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- read data.json with FILTERS --- | |
DEBUG:root:my desktop: xfce | |
DEBUG:root:filter : | |
DEBUG:root:groups : * | |
DEBUG:root: filter app: Epiphany ['advanced'] < | |
DEBUG:root: filter app: Falkon ['advanced'] < | |
DEBUG:root: filter app: Konqueror ['advanced'] < | |
DEBUG:root: filter app: Midori ['advanced'] < | |
DEBUG:root: filter app: Netsurf ['advanced'] < |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<input class="btn btn-login btn-success btn-float" type="submit" value="Login"> | |
<a href="" class="btn btn-login btn-success btn-float"><i class="zmdi zmdi-arrow-forward"></i></a> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ng-template #content let-modal> | |
<div class="modal-header"> | |
<h4 class="modal-title" id="modal-basic-title">{{title}}</h4> | |
<button type="button" class="close" aria-label="Close" (click)="modal.dismiss('Cross click')"> | |
<span aria-hidden="true">×</span> | |
</button> | |
</div> | |
<div class="modal-body"> | |
<form name="formData"> | |
<div class="form-group"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.db import models | |
class LookUpAirport(models.Model): | |
code = models.CharField(max_length=4) | |
fullname = models.CharField(max_length=20) | |
# Create your models here. | |
class FlightCo(models.Model): | |
ff_company_name = models.CharField(max_length=20) | |
ff_company_short = models.CharField(max_length=4,default="AAL") | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class FlightFilter(django_filters.FilterSet): | |
class Meta: | |
model = Flight | |
fields = ['ff_from'] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class FlightTable(tables.Table): | |
class Meta: | |
model = Flight | |
class FlightFilter(django_filters.FilterSet): | |
class Meta: | |
model = Flight | |
fields = ['ff_from__fullname'] | |
class FlightTableView(SingleTableMixin, FilterView): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class FlightFilter(django_filters.FilterSet): | |
class Meta: | |
model = Flight | |
fields = {"ff_from__fullname": ["icontains"]} | |
label = "Search location or flight number" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class FlightTable(tables.Table): | |
class Meta: | |
model = Flight | |
class FlightFilter(django_filters.FilterSet): | |
class Meta: | |
model = Flight | |
fields = {"ff_from__fullname": ["icontains"]} | |
label = "Search location or flight number" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Flight(models.Model): | |
ff_number = models.CharField(max_length=10,verbose_name="Flight Number") | |
ff_company = models.ForeignKey(FlightCo, on_delete=models.CASCADE, verbose_name="Flight Company") | |
ff_from = models.ForeignKey(Airport, on_delete=models.CASCADE, related_name="airport_from", verbose_name="From") | |
ff_to = models.ForeignKey(Airport, on_delete=models.CASCADE, related_name="airport_to", verbose_name="To") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Airport(models.Model): | |
code = models.CharField(max_length=4) | |
fullname = models.CharField(max_length=50) | |
def __str__(self): | |
return self.fullname |