change urls behavior for base app
This commit is contained in:
parent
71e7ae9293
commit
e0021502e7
|
@ -123,3 +123,7 @@ USE_TZ = True
|
|||
# https://docs.djangoproject.com/en/1.11/howto/static-files/
|
||||
|
||||
STATIC_URL = '/static/'
|
||||
|
||||
STATICFILES_DIRS = [
|
||||
os.path.join(BASE_DIR, 'static'),
|
||||
]
|
||||
|
|
|
@ -16,10 +16,9 @@ Including another URLconf
|
|||
from django.conf.urls import url, include
|
||||
from django.contrib import admin
|
||||
|
||||
from evolus.views import documents_list
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^admin/', admin.site.urls),
|
||||
url(r'^docs/search', documents_list),
|
||||
url(r'^docs/', include('evolus.urls')),
|
||||
url(r'^jci/', include('jci.urls')),
|
||||
]
|
||||
|
|
BIN
db.sqlite3
BIN
db.sqlite3
Binary file not shown.
|
@ -16,12 +16,27 @@ class Process(models.Model):
|
|||
return 'Process on {}'.format(self.document_version)
|
||||
|
||||
def create_task(self, assigned_to):
|
||||
"""Create a new task associated to this process.
|
||||
|
||||
The new task has the following default values:
|
||||
1. Status = 1
|
||||
2. assigned_to = the user passed as a parameter
|
||||
3. process = self
|
||||
|
||||
:returns
|
||||
A new task if none existed before;
|
||||
The task with status = 1, assigned_to=User, process=self if it already exists.
|
||||
"""
|
||||
task, created = Task.objects.get_or_create(status=1, assigned_to=assigned_to, process=self)
|
||||
|
||||
if created:
|
||||
task.save()
|
||||
|
||||
def allow_tasks_delegation(self):
|
||||
"""By default, the user who should do the task can delegate to another user.
|
||||
|
||||
In case this functionality is not desired, this function should be overridden.
|
||||
"""
|
||||
return True
|
||||
|
||||
|
||||
|
@ -79,6 +94,7 @@ class Approval(Process, DraftProcessMixin):
|
|||
self.create_task(validator)
|
||||
|
||||
def finalize(self):
|
||||
super().finalize()
|
||||
self.document_version.is_published = True
|
||||
self.document_version.major = self.document_version.major + 1
|
||||
self.document_version.revision = 0
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
{% load static %}
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Evolus</title>
|
||||
<link rel="stylesheet" href="{% static 'css/bootstrap.min.css' %}">
|
||||
</head>
|
||||
<body>
|
||||
<!-- body suppressed for brevity ... -->
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue