mirror of
https://github.com/daniviga/django-ram.git
synced 2025-08-03 20:57:50 +02:00
Make purchase date a private field as well
This commit is contained in:
@@ -26,7 +26,7 @@ class BookSerializer(serializers.ModelSerializer):
|
||||
|
||||
class Meta:
|
||||
model = Book
|
||||
exclude = ("price",)
|
||||
exclude = ("purchase_date", "price",)
|
||||
read_only_fields = ("creation_time", "updated_time")
|
||||
|
||||
|
||||
@@ -37,5 +37,5 @@ class CatalogSerializer(serializers.ModelSerializer):
|
||||
|
||||
class Meta:
|
||||
model = Catalog
|
||||
exclude = ("price",)
|
||||
exclude = ("purchase_date", "price",)
|
||||
read_only_fields = ("creation_time", "updated_time")
|
||||
|
@@ -108,11 +108,11 @@
|
||||
<th scope="row">Publication year</th>
|
||||
<td>{{ book.publication_year|default:"-" }}</td>
|
||||
</tr>
|
||||
{% if request.user.is_staff %}
|
||||
<tr>
|
||||
<th scope="row">Purchase date</th>
|
||||
<td>{{ book.purchase_date|default:"-" }}</td>
|
||||
</tr>
|
||||
{% if request.user.is_staff %}
|
||||
<tr>
|
||||
<th scope="row">Price ({{ site_conf.currency }})</th>
|
||||
<td>{{ book.price|default:"-" }}</td>
|
||||
|
@@ -182,11 +182,11 @@
|
||||
<th scope="row">Production year</th>
|
||||
<td>{{ rolling_stock.production_year|default:"-" }}</td>
|
||||
</tr>
|
||||
{% if request.user.is_staff %}
|
||||
<tr>
|
||||
<th scope="row">Purchase date</th>
|
||||
<td>{{ rolling_stock.purchase_date|default:"-" }}</td>
|
||||
</tr>
|
||||
{% if request.user.is_staff %}
|
||||
<tr>
|
||||
<th scope="row">Price ({{ site_conf.currency }})</th>
|
||||
<td>{{ rolling_stock.price|default:"-" }}</td>
|
||||
|
@@ -1,4 +1,4 @@
|
||||
from ram.utils import git_suffix
|
||||
|
||||
__version__ = "0.15.2"
|
||||
__version__ = "0.15.3"
|
||||
__version__ += git_suffix(__file__)
|
||||
|
@@ -28,5 +28,5 @@ class RollingStockSerializer(serializers.ModelSerializer):
|
||||
|
||||
class Meta:
|
||||
model = RollingStock
|
||||
exclude = ("price",)
|
||||
exclude = ("purchase_date", "price",)
|
||||
read_only_fields = ("creation_time", "updated_time")
|
||||
|
Reference in New Issue
Block a user