Skip to content

Commit

Permalink
Merge pull request #116 from unt-libraries/fix-surt-browse
Browse files Browse the repository at this point in the history
Fix surt browse
  • Loading branch information
ldko authored Sep 13, 2024
2 parents 421f2a9 + 0a3c71d commit 750b10e
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ Change Log
-----

* Upgraded to Django 4.2.
* Fixed nominating URLs of length 255-300 chars by ensuring `value` is big enough to hold the URL's SURT value. [#114](https://github.com/unt-libraries/django-nomination/issues/114)
* Fixed browsing from listing page to top-level domain SURT URLs. [#115](https://github.com/unt-libraries/django-nomination/issues/115)


4.0.0
Expand Down
18 changes: 18 additions & 0 deletions nomination/migrations/0006_alter_url_value.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 4.1.3 on 2024-09-13 16:21

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('nomination', '0005_auto_20210429_2207'),
]

operations = [
migrations.AlterField(
model_name='url',
name='value',
field=models.CharField(help_text='The value of the associated attribute.', max_length=305),
),
]
2 changes: 1 addition & 1 deletion nomination/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ class URL(models.Model):
entity = models.CharField(max_length=300, help_text='The URL to nominate for capture.')
attribute = models.CharField(max_length=255,
help_text='A property of the URL you wish to describe.')
value = models.CharField(max_length=255, help_text='The value of the associated attribute.')
value = models.CharField(max_length=305, help_text='The value of the associated attribute.')
date = models.DateTimeField(auto_now=True)

def __str__(self):
Expand Down
4 changes: 2 additions & 2 deletions nomination/templates/nomination/project_urls.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ <h4 class="panel-title">Browse URLs</h4>
</a>
</div>
<ul class="list-group">
{% for top_domain,domain_list in browse_tup %}
{% for top_domain, domain_list in browse_tup %}
<li class="list-group-item">
<h3>
<a href="/nomination/{{ project.project_slug }}/surt/({{ top_domain }}/">
<a href="/nomination/{{ project.project_slug }}/surt/({{ top_domain }},/">
{{ top_domain }}
</a>
</h3>
Expand Down

0 comments on commit 750b10e

Please sign in to comment.