-
Notifications
You must be signed in to change notification settings - Fork 0
Permanent URLs #183
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
Permanent URLs #183
Conversation
| ('created_by', models.ForeignKey(on_delete=django.db.models.deletion.RESTRICT, to=settings.AUTH_USER_MODEL)), | ||
| ], | ||
| options={ | ||
| 'indexes': [models.Index(fields=['content_type', 'object_id'], name='core_perman_content_aa1d0b_idx')], |
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.
Was this index intentional ? If we do want it to make URL lookups fast, wouldn't it be to the URL instead of the object ID?
Together with the unusual dependencies, not just 'core' in the dependencies list above, I wonder if this is necessary?
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.
NM I get it, because it's using the generic foreign key
Closes #175.
Adds Permanent URLs.
Overview
PermanentURLmodel with fields forurl(which stores the full URL) and for linking to either aSchemaor aSchemaRefusing Django's contenttypes framework.PERMANENT_URL_HOSTsetting (so we can useid.schemas.pubin production without completely* breaking other environments./o/anything, redirect them to the appropriate object if a matchingPermanentURLexists, or 404 otherwiseAssumptions/limitations/future work
Profile page showing links to permanent URL management form




Permanent URL management form with no existing links
Permanent URL management form with existing links
Permanent links displayed on detail page