Skip to content

Commit 1d2f32b

Browse files
committed
hack to repair non property collateral fixtures
1 parent af7a920 commit 1d2f32b

File tree

8 files changed

+14
-9
lines changed

8 files changed

+14
-9
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ particular the relevant counterparty and loan data that are important for the ma
5757

5858
## Code and User Documentation
5959

60-
The technical / user documentation is included in this distribution and is hosted online at [readthedocs](http://opennpl.readthedocs.io)
60+
The technical / user documentation is included in this distribution and is hosted online at [readthedocs](https://opennpl.readthedocs.io/en/latest/)
6161

6262
## Data Documentation
6363

docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
# -- Project information -----------------------------------------------------
2727

2828
project = 'openNPL'
29-
copyright = '2020 - 2025, Open Risk'
29+
copyright = '2020 - 2026, Open Risk'
3030
author = 'Open Risk'
3131

3232
# The short X.Y version

docs/source/installation.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ Dependencies / Requirements
6565
.. note:: A Linux based system is recommended but with minor tweaks it is in principle also possible to deploy in Windows systems
6666

6767
- openNPL requires a working Python 3 installation (including pip)
68-
- Python >= 3.10
69-
- Django >= 4.0
68+
- Python >= 3.14
69+
- Django >= 5.2
7070
- The precise python library dependencies are listed in the :doc:`requirements`.txt file.
7171
- openNPL may work with earlier versions of these packages but this has not been tested
7272
- A linux based system is recommended. Some tweaks are required for Windows but is in principle also possible to deploy there
@@ -100,7 +100,8 @@ Step 4. Make the required django migrations. The project is setup to use sqlite3
100100
.. code:: bash
101101
102102
cd openNPL
103-
python manage.py makemigrations
103+
python manage.py makemigrations npl_portfolio
104+
python manage.py makemigrations sflp_portfolio
104105
python manage.py migrate
105106
106107
Step 5. Create a superuser. Suggestion: Use admin/admin as login/password as a reminder that this instance of openNPL should NOT be used for anything remotely sensitive!
@@ -127,7 +128,7 @@ Step 8. Run the server. The default port is 8000 but if (by any chance) this por
127128
128129
python3 manage.py runserver
129130
130-
Step 9. Login with your browser. Finally in your favorite browser (e.g. Firefox from Mozilla), enter the url ``http://localhost:8001`` and login with admin/admin credentials.
131+
Step 9. Login with your browser. Finally in your favorite browser (e.g. Firefox from Mozilla), enter the url ``http://localhost:8000`` and login with admin/admin credentials.
131132

132133
.. note:: 8000 is the default port, if that is already in use, you can select an alternative one as follows:
133134

docs/source/requirements.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
Requirements
33
==============================
44

5-
List of python package requirements. At this point the main dependencies are related to django, sphinx and the scipy stack.
5+
List of the openNPL Python package requirements.
6+
7+
At this point the main dependencies are related to Django (as frontend to the NPL database), sphinx (for documentation) and the Python numerical stack (numpy, pandas, scipy) for quantitative analysis.
68

79
::
810

npl_portfolio/admin.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ class NonPropertyCollateralAdmin(admin.ModelAdmin):
111111
save_as = True
112112
view_on_site = False
113113
search_fields = ['protection_identifier']
114+
114115
list_display = ('protection_identifier', 'loan_identifier', 'collateral_type')
115116

116117
list_filter = ('collateral_type',)

npl_portfolio/non_property_collateral.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ class NonPropertyCollateral(models.Model):
165165
last_change_date = models.DateTimeField(auto_now=True)
166166

167167
def __str__(self):
168-
return self.protection_identifier
168+
return str(self.protection_identifier)
169169

170170
def get_absolute_url(self):
171171
return reverse('npl_portfolio:non_property_collateral_edit', kwargs={'pk': self.pk})

openNPL/urls.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
# SFLP Data URL's
5353
path(r'api/sflp_data/',
5454
include(('sflp_portfolio.urls', 'sflp_portfolio'), namespace='sflp_portfolio')),
55+
# API Documentation
5556
re_path(r'^api/swagger(?P<format>\.json|\.yaml)$', schema_view.without_ui(cache_timeout=0),
5657
name='schema-json'),
5758
re_path(r'^api/swagger/$', schema_view.with_ui('swagger', cache_timeout=0), name='schema-swagger-ui'),

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Django
1+
Django==5.2.1
22
djangorestframework
33
drf-yasg
44
numpy

0 commit comments

Comments
 (0)