-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a shortlinks Django app. #2167
Conversation
[ch7644] |
This pull request has been linked to Clubhouse Story #7644: Consider hosting our own short URLs or using an expensive short URL service. |
Hey @samaratrilling any idea when you might be able to review this? I think Steph might need its functionality soon-ish for the NYCx work, but I don't think there's an urgent rush. |
Ah shoot, I missed that I was even on this! So sorry, will do today
…On Mon, Aug 9, 2021, 9:23 AM Atul Varma ***@***.***> wrote:
Hey @samaratrilling <https://github.com/samaratrilling> any idea when you
might be able to review this? I think Steph might need its functionality
soon-ish for the NYCx work, but I don't think there's an urgent rush.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2167 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAMFSRLVUCDCDJFSLA2HR2LT37JE7ANCNFSM5AXXE5LQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email>
.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good! Might be worth setting the max length of the slug to something a little lower than 200 chars, but that's not a big deal.
So outreach coordinators will be able to edit these on the django admin dashboard?
Awesome, thanks! Yeah, 200 characters is a kind of weird max but I prefer to over-estimate unless there are significant drawbacks to not doing so, but we can always make it shorter later if needed too. Correct, outreach coordinators will be able to add/edit these. Come to think of it, though, the "Tenant Resource Editors" group should also probably have access to add/edit these, since these shortlinks are basically used as tenant resources... hmm. I guess we can always add that permission later, though. |
During our latest NYCx meeting we discussed the possibility of using a short URL service like bit.ly to provide branded short URLs, to make links to external resources provided on the textbot take up less precious characters.
Unfortunately, using bit.ly to create URLs with custom domains isn't very cheap (about $40 per month) and they don't have any kind of nonprofit discount.
As an alternative, I figured it shouldn't be too hard to roll-our-own extremely simplistic short URL service as a feature on the tenant platform. Admins could log into our Django admin backend and use a basic UI to create urls that would be of the form
https://app.justfix.nyc/s/<some short id>
.Aside from being useful to shorten URLs though, creating a layer of redirection has some other advantages:
We have the ability to update where our short URLs point. This means, for example, if we send a text message that says "go here to learn more about rent reductions" and points to a URL on a government website, it that URL eventually 404's and the user is going through their SMS text history and taps the link, it will 404 too. However, if the link points to a short URL we've provided, and we change the link's target once it 404's, then tapping that link won't 404 anymore.
We can change our external URLs in just one place. For instance, if we have a single short URL that points to a government page on obtaining rent reductions, and we link to our short URL in our learning center articles and our tenant platform and our text bot, then if the target of that URL ever changes, we can just update the short URL target, instead of having to manually update the content of all our properties.
We could regularly sweep through our short URLs and be alerted of any that 404. To figure out which links have rotted, we can simply iterate through all the short URLs in our database and regularly check which ones 404.
This adds the feature via a new Django app called
shortlinks
, which Outreach Coordinators have the ability to create and modify.Limitations
app.justfix.nyc/s/boop
could be further shortened to something likejf.nyc/boop
, but that would take more work.