Skip to content

Commit 4d7fc77

Browse files
authored
Merge pull request #17 from NYU-ITS/coupling_approval_with_school_cleanup
Coupling approval with school cleanup
2 parents 5f8ea8e + 00d2605 commit 4d7fc77

File tree

5 files changed

+531
-21
lines changed

5 files changed

+531
-21
lines changed

Dockerfile

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM python:3.8
1+
FROM python:3.12
22

33
RUN apt-get update \
44
&& apt-get install -y --no-install-recommends \
@@ -7,12 +7,15 @@ RUN apt-get update \
77
WORKDIR /usr/src/app
88
COPY requirements.txt ./
99
RUN pip3 install -r requirements.txt
10+
RUN pip3 install setuptools
11+
RUN pip3 install debugpy
1012
COPY . .
1113

12-
RUN python3 ./manage.py initial_setup
14+
RUN echo "yes" | python3 ./manage.py initial_setup
1315
RUN python3 ./manage.py load_test_data
1416

1517
ENV DEBUG=True
16-
18+
ENV DJANGO_DEBUG=True
19+
ENV PYTHONUNBUFFERED=1
1720
EXPOSE 8000
1821
CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"]

coldfront/core/allocation/templates/allocation/allocation_detail.html

+7-7
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ <h3><i class="fas fa-list" aria-hidden="true"></i> Allocation Information</h3>
7878
<tr>
7979
<th scope="row" class="text-nowrap">Status:</th>
8080
<td>
81-
{% if request.user.is_superuser %}
81+
{% if request.user.is_superuser or request.user.is_staff%}
8282
{{ form.status }}
8383
{% else %}
8484
{{ allocation.status }}
@@ -88,7 +88,7 @@ <h3><i class="fas fa-list" aria-hidden="true"></i> Allocation Information</h3>
8888
<tr>
8989
<th scope="row" class="text-nowrap">Start Date:</th>
9090
<td>
91-
{% if request.user.is_superuser %}
91+
{% if request.user.is_superuser or request.user.is_staff%}
9292
{{ form.start_date }}
9393
{% else %}
9494
{{ allocation.start_date }}
@@ -98,7 +98,7 @@ <h3><i class="fas fa-list" aria-hidden="true"></i> Allocation Information</h3>
9898
<tr>
9999
<th scope="row" class="text-nowrap">End Date:</th>
100100
<td>
101-
{% if request.user.is_superuser %}
101+
{% if request.user.is_superuser or request.user.is_staff%}
102102
{{ form.end_date }}
103103
{% else %}
104104
{{ allocation.end_date }}
@@ -119,7 +119,7 @@ <h3><i class="fas fa-list" aria-hidden="true"></i> Allocation Information</h3>
119119
<tr>
120120
<th scope="row" class="text-nowrap">Description:</th>
121121
<td>
122-
{% if request.user.is_superuser %}
122+
{% if request.user.is_superuser or request.user.is_staff%}
123123
{{ form.description }}
124124
{% else %}
125125
{{ allocation.description|default_if_none:"" }}
@@ -160,7 +160,7 @@ <h3><i class="fas fa-list" aria-hidden="true"></i> Allocation Information</h3>
160160
{% endif %}
161161
</table>
162162
</div>
163-
{% if request.user.is_superuser %}
163+
{% if request.user.is_superuser or request.user.is_staff %}
164164
<div class="float-right">
165165
{% if allocation.status.name == 'New' or allocation.status.name == 'Renewal Requested' %}
166166
<button type="submit" name="action" value="approve" class="btn btn-success mr-1 confirm-activate">Approve</button>
@@ -173,12 +173,12 @@ <h3><i class="fas fa-list" aria-hidden="true"></i> Allocation Information</h3>
173173
</div>
174174
</div>
175175

176-
{% if attributes or attributes_with_usage or request.user.is_superuser %}
176+
{% if attributes or attributes_with_usage or request.user.is_superuser or request.user.is_staff%}
177177
<div class="card mb-3">
178178
<div class="card-header">
179179
<h3 class="d-inline"><i class="fas fa-info-circle" aria-hidden="true"></i> Allocation Attributes</h3>
180180
<div class="float-right">
181-
{% if request.user.is_superuser %}
181+
{% if request.user.is_superuser or request.user.is_staff%}
182182
<a class="btn btn-success" href="{% url 'allocation-attribute-add' allocation.pk %}" role="button">
183183
<i class="fas fa-plus" aria-hidden="true"></i> Add Allocation Attribute
184184
</a>

0 commit comments

Comments
 (0)