8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-24 20:33:11 +00:00

Printer App a beginning.

This commit is contained in:
Maxime Bombar 2018-06-28 20:20:08 +02:00 committed by root
parent 6773575dc5
commit 4aa7b09db9
4 changed files with 6 additions and 1 deletions

View file

@ -43,6 +43,9 @@ import math
"""
def user_printing_path(instance, filename):
# File will be uploaded to MEDIA_ROOT/printings/user_<id>/<filename>
return 'printings/user_{0}/{1}'.format(instance.user.id, filename)
class JobWithOptions(RevMixin, models.Model):
"""

View file

@ -67,8 +67,8 @@
job.parentNode.removeChild(job);
document.getElementById('id_form-TOTAL_FORMS').value --;
}
function add_listener_for_btn(rmBtn){
rmBtn.addEventListener("click", function(event){del_job(rmBtn.parentNode, event)});

View file

@ -77,6 +77,7 @@ LOCAL_APPS = (
're2o',
'preferences',
'logs',
'printer',
)
INSTALLED_APPS = (
DJANGO_CONTRIB_APPS +

View file

@ -74,6 +74,7 @@ urlpatterns = [
r'^preferences/',
include('preferences.urls', namespace='preferences')
),
url(r'^printer/', include('printer.urls', namespace='printer')),
]
# Add debug_toolbar URLs if activated
if 'debug_toolbar' in settings.INSTALLED_APPS: