nobleascent / agrifoodit Goto Github PK
View Code? Open in Web Editor NEWBachelor's Thesis Project for Telekom Innovation Laboratories at ELTE University
Home Page: http://t-labs.elte.hu/
Bachelor's Thesis Project for Telekom Innovation Laboratories at ELTE University
Home Page: http://t-labs.elte.hu/
GET /presence -> 200
GET /presence/ -> 404
Database Table PresenceFile
was changed from:
class PresenceFile(models.Model):
file_name = models.CharField(max_length=200)
comments = models.CharField(max_length=200)
upload_date = models.DateTimeField('date uploaded')
processing_status = models.BooleanField()
to
class PresenceFile(models.Model):
file_name = models.CharField(max_length=200)
comments = models.CharField(max_length=200)
upload_date = models.DateTimeField('date uploaded')
processing_status = models.BooleanField()
# The primary_key argument isn’t supported and will raise an error if used.
# https://docs.djangoproject.com/en/3.1/ref/models/fields/#filefield
# file will be uploaded to MEDIA_ROOT/uploads/presence/
upload = models.FileField(upload_to='uploads/presence/')
After running python manage.py makemigrations
the following error is returned.
Django then provides the following options:
(venv) E:\Git\AgrifoodIT>python manage.py makemigrations
You are trying to add a non-nullable field 'upload' to presencefile without a default; we can't do that (the database needs something to populate existing rows).
Please select a fix:
1) Provide a one-off default now (will be set on all existing rows with a null value for this column)
2) Quit, and let me add a default in models.py
Select an option: 1
Please enter the default value now, as valid Python
The datetime and django.utils.timezone modules are available, so you can do e.g. timezone.now
Type 'exit' to exit this prompt
>>> 123
Migrations for 'dashboard':
dashboard\migrations\0002_presencefile_upload.py
- Add field upload to presencefile
Example file attached:
20210216_presence.txt
Direction |
Reader # 📶 | RFID # | Timestamp ⏲️ |
---|---|---|---|
+ | 2 | 8B320885DB9AF197101FA02988C06432850058E0A2266D97C0C880E0 | 2021-02-16T02:03:37.453 |
- | 2 | 8B320885DB9AF197101FA02988C06432850058E0A2266D97C0C880E0 | 2021-02-16T02:03:42.454 |
+ | 1 | E2000019520602651540EA7C | 2021-02-16T05:48:03.540 |
- | 1 | E2000019520602651540EA7C | 2021-02-16T05:48:08.541 |
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.