Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

changed admin allocation html #44

Merged
merged 1 commit into from
Dec 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions home/schedulers.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@

def start():
scheduler = BackgroundScheduler()
scheduler.add_jobstore(DjangoJobStore(), "default")
scheduler.add_job(__send__rebate__email__, 'cron', hour=23, minute=59, second=0)
register_events(scheduler)
scheduler.start()
print, "scheduler started"
if scheduler is None:
scheduler.add_jobstore(DjangoJobStore(), "default")
scheduler.add_job(__send__rebate__email__, 'cron', hour=23, minute=59, second=0)
register_events(scheduler)
scheduler.start()
print(scheduler)
4 changes: 1 addition & 3 deletions templates/admin/allocation.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,13 @@ <h1>Allocation CSV uploader</h1>
{{ user.email}}</span><br>
{% for caterer in list%}
<span></span>
<span>{{caterer.0}} Caterer has been alloted {{caterer.2}} students out of which {{caterer.1}} have taken the high tea.
{{caterer.3}} more students can be attocated to {{caterer.0}} caterer</span><br>
<span>{{caterer.0}} Caterer has been alloted {{caterer.2}} students, {{caterer.3}} more students can be attocated to {{caterer.0}} caterer</span><br>
{% endfor %}
<form action="." method="post" class="px-5 pt-2 mx-md-5" enctype="multipart/form-data">
{% csrf_token %}
<input type="file" class="custom-file-input" id="customFile" name="csv" required accept=".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel" size="60">
<button type="submit" class="btn btn-primary p-2 mb-3" style="background-color: rgb(30, 55, 146);">Submit</button>
</form>
<div> {{messages}}</div>
{% else %}
<h1 class="text-decoration-none">Access to this page is only for Administration. Please login to continue.</h1>
{% endif %}
Expand Down
Loading