-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from OmarMAshour/contoller
Contoller
- Loading branch information
Showing
85 changed files
with
57,986 additions
and
200 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
<html> | ||
|
||
<head> | ||
<title>FREE QRCode & BarCode Scanner Using Webcam & Image File Online Tool - Coding Shiksha</title> | ||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script> | ||
<body> | ||
<h1 style="text-align:center;">QRCode & BarCode Scanner Online Tool</h1> | ||
<br><br> | ||
<div id="qr-reader" style="width:auto;text-align: center;"></div> | ||
<div id="qr-reader-results"></div> | ||
</body> | ||
<style> | ||
body{ | ||
margin-top:50px; | ||
margin-bottom: 100px; | ||
} | ||
</style> | ||
|
||
<script> | ||
function docReady(fn) { | ||
// see if DOM is already available | ||
if (document.readyState === "complete" | ||
|| document.readyState === "interactive") { | ||
// call on next available tick | ||
setTimeout(fn, 1); | ||
} else { | ||
document.addEventListener("DOMContentLoaded", fn); | ||
} | ||
} | ||
|
||
docReady(function () { | ||
var resultContainer = document.getElementById('qr-reader-results'); | ||
var lastResult, countResults = 0; | ||
function onScanSuccess(decodedText, decodedResult) { | ||
if (decodedText !== lastResult) { | ||
++countResults; | ||
lastResult = decodedText; | ||
// Handle on success condition with the decoded message. | ||
$("#qr-reader-results").html(` | ||
<table> | ||
<thead> | ||
<tr> | ||
<th>No</th> | ||
<th>Result</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr> | ||
<td>1</td> | ||
<td>${decodedText}</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
`) | ||
console.log(`Scan result ${decodedText}`, decodedResult); | ||
} | ||
} | ||
|
||
var html5QrcodeScanner = new Html5QrcodeScanner( | ||
"qr-reader", { fps: 10, qrbox: 250 }); | ||
html5QrcodeScanner.render(onScanSuccess); | ||
}); | ||
</script> | ||
</head> | ||
|
||
</html> |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
from django.contrib import admin | ||
|
||
from .models import ScannedWine | ||
# Register your models here. | ||
admin.site.register(ScannedWine) | ||
admin.site.site_header = 'Coop Wine Manager Administration' |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Generated by Django 4.1.2 on 2022-10-22 17:46 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
initial = True | ||
|
||
dependencies = [ | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='Scanned_Wine', | ||
fields=[ | ||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('name', models.TextField()), | ||
('article_id', models.TextField()), | ||
('alcohol', models.TextField()), | ||
('sellPrice', models.TextField()), | ||
('averageRating', models.TextField()), | ||
('maturity', models.TextField()), | ||
('goesWithText', models.TextField()), | ||
('goesWithText_de', models.TextField()), | ||
('goesWithText_en', models.TextField()), | ||
('goesWithText_fr', models.TextField()), | ||
('goesWithText_it', models.TextField()), | ||
('servingTemperature', models.TextField()), | ||
('wineCharacter', models.TextField()), | ||
('wineMaker', models.TextField()), | ||
('wineOrigin', models.TextField()), | ||
('yearOfVintage', models.TextField()), | ||
('json', models.TextField()), | ||
], | ||
), | ||
] |
17 changes: 17 additions & 0 deletions
17
coop_challenge/migrations/0002_rename_scanned_wine_scannedwine.py
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Generated by Django 4.1.2 on 2022-10-22 17:48 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('coop_challenge', '0001_initial'), | ||
] | ||
|
||
operations = [ | ||
migrations.RenameModel( | ||
old_name='Scanned_Wine', | ||
new_name='ScannedWine', | ||
), | ||
] |
23 changes: 23 additions & 0 deletions
23
coop_challenge/migrations/0003_scannedwine_label_file_scannedwine_pdf_file.py
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Generated by Django 4.1.2 on 2022-10-22 18:57 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('coop_challenge', '0002_rename_scanned_wine_scannedwine'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='scannedwine', | ||
name='label_file', | ||
field=models.FileField(blank=True, upload_to='media/label'), | ||
), | ||
migrations.AddField( | ||
model_name='scannedwine', | ||
name='pdf_file', | ||
field=models.FileField(blank=True, upload_to='media/pdfs'), | ||
), | ||
] |
98 changes: 98 additions & 0 deletions
98
coop_challenge/migrations/0004_alter_scannedwine_alcohol_and_more.py
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
# Generated by Django 4.1.2 on 2022-10-22 18:58 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('coop_challenge', '0003_scannedwine_label_file_scannedwine_pdf_file'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='scannedwine', | ||
name='alcohol', | ||
field=models.TextField(blank=True), | ||
), | ||
migrations.AlterField( | ||
model_name='scannedwine', | ||
name='article_id', | ||
field=models.TextField(blank=True), | ||
), | ||
migrations.AlterField( | ||
model_name='scannedwine', | ||
name='averageRating', | ||
field=models.TextField(blank=True), | ||
), | ||
migrations.AlterField( | ||
model_name='scannedwine', | ||
name='goesWithText', | ||
field=models.TextField(blank=True), | ||
), | ||
migrations.AlterField( | ||
model_name='scannedwine', | ||
name='goesWithText_de', | ||
field=models.TextField(blank=True), | ||
), | ||
migrations.AlterField( | ||
model_name='scannedwine', | ||
name='goesWithText_en', | ||
field=models.TextField(blank=True), | ||
), | ||
migrations.AlterField( | ||
model_name='scannedwine', | ||
name='goesWithText_fr', | ||
field=models.TextField(blank=True), | ||
), | ||
migrations.AlterField( | ||
model_name='scannedwine', | ||
name='goesWithText_it', | ||
field=models.TextField(blank=True), | ||
), | ||
migrations.AlterField( | ||
model_name='scannedwine', | ||
name='json', | ||
field=models.TextField(blank=True), | ||
), | ||
migrations.AlterField( | ||
model_name='scannedwine', | ||
name='maturity', | ||
field=models.TextField(blank=True), | ||
), | ||
migrations.AlterField( | ||
model_name='scannedwine', | ||
name='name', | ||
field=models.TextField(blank=True), | ||
), | ||
migrations.AlterField( | ||
model_name='scannedwine', | ||
name='sellPrice', | ||
field=models.TextField(blank=True), | ||
), | ||
migrations.AlterField( | ||
model_name='scannedwine', | ||
name='servingTemperature', | ||
field=models.TextField(blank=True), | ||
), | ||
migrations.AlterField( | ||
model_name='scannedwine', | ||
name='wineCharacter', | ||
field=models.TextField(blank=True), | ||
), | ||
migrations.AlterField( | ||
model_name='scannedwine', | ||
name='wineMaker', | ||
field=models.TextField(blank=True), | ||
), | ||
migrations.AlterField( | ||
model_name='scannedwine', | ||
name='wineOrigin', | ||
field=models.TextField(blank=True), | ||
), | ||
migrations.AlterField( | ||
model_name='scannedwine', | ||
name='yearOfVintage', | ||
field=models.TextField(blank=True), | ||
), | ||
] |
Binary file not shown.
Binary file added
BIN
+568 Bytes
coop_challenge/migrations/__pycache__/0002_rename_scanned_wine_scannedwine.cpython-310.pyc
Binary file not shown.
Binary file added
BIN
+741 Bytes
...e/migrations/__pycache__/0003_scannedwine_label_file_scannedwine_pdf_file.cpython-310.pyc
Binary file not shown.
Binary file added
BIN
+1.35 KB
..._challenge/migrations/__pycache__/0004_alter_scannedwine_alcohol_and_more.cpython-310.pyc
Binary file not shown.
Binary file not shown.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,27 @@ | ||
from distutils.command.upload import upload | ||
from pyexpat import model | ||
from django.db import models | ||
|
||
# Create your models here. | ||
class ScannedWine(models.Model): | ||
name = models.TextField(blank = True) | ||
article_id = models.TextField(blank = True) | ||
alcohol = models.TextField(blank = True) | ||
sellPrice = models.TextField(blank = True) | ||
averageRating = models.TextField(blank = True) | ||
maturity = models.TextField(blank = True) | ||
goesWithText = models.TextField(blank = True) | ||
goesWithText_de = models.TextField(blank = True) | ||
goesWithText_en = models.TextField(blank = True) | ||
goesWithText_fr = models.TextField(blank = True) | ||
goesWithText_it = models.TextField(blank = True) | ||
servingTemperature = models.TextField(blank = True) | ||
wineCharacter = models.TextField(blank = True) | ||
wineMaker = models.TextField(blank = True) | ||
wineOrigin = models.TextField(blank = True) | ||
yearOfVintage = models.TextField(blank = True) | ||
json = models.TextField(blank = True) | ||
pdf_file = models.FileField(upload_to='media/pdfs', blank = True) | ||
label_file = models.FileField(upload_to='media/label', blank=True) | ||
def __str__(self) -> str: | ||
return self.name |
Oops, something went wrong.