unt-libraries / django-nomination

A Django application for nominating URLs by project.
BSD 3-Clause "New" or "Revised" License
2 stars 1 forks source link

Archive access point #71

Closed somexpert closed 8 years ago

somexpert commented 8 years ago

This purpose of this PR is to add an access point to archived URLs from within the app. fixes #1

ldko commented 8 years ago

In this PR we could include a change to url_listing.html where if the project's archive_url has been given a value, we display under the "URL" (url entity) an "Archived URL" heading and a link to what should allow access to the url in the archive.

somexpert commented 8 years ago

@ldko, @vphill, @jason-ellis, @jthomale, this is ready for review

ldko commented 8 years ago

We should probably support both base urls entered with the slash on the end or not.

somexpert commented 8 years ago

will do

ldko commented 8 years ago

I think we could do something with the logic of:

    def clean(self):
        if self.archive_url and not self.archive_url.endswith('/'):
            self.archive_url = '{}{}'.format(self.archive_url, '/')

Also, I think we need blank=True for the archive_url field assignment in the model either way.

somexpert commented 8 years ago

Ok, I'll add that in there and test it out. And do we need the blank=True since we have the null=True?

ldko commented 8 years ago

I believe we need the blank=True in order to make it not a required input in forms (including the admin).

somexpert commented 8 years ago

alright, I'll add that in there too

ldko commented 8 years ago

:+1:

jason-ellis commented 8 years ago

:+1: