Comments (10)
@dalberto I wait when it will be native in Django (or any alternative) because it is simple and covers 90% of user cases, but anyway, it is small, clear and integrated very well into Django, so I start all my projects from installing macros library :)
from django-macros-url.
Hi Darlin,
I think it is not good idea because for search engines "/page/" and "/page" are different (and for example better is to have 301 redirect from "/page" to "/page/"). This can be added only as option, better is to use append slash django feature (https://docs.djangoproject.com/en/1.9/ref/settings/#append-slash).
But anyway it is good idea, I will think (and will read django source code) about it.
Thanks!
from django-macros-url.
Thanks for the speedy reply.
On second thought, I suppose this is unnecessary because a macro can be written for the optional trailing slash. I'm not sure if this will have unknown side-effects.
from django-macros-url.
@dalberto yes it can of course. But I am not sure it is good way, please check APPEND_SLASH django feature.
from django-macros-url.
https://github.com/django/django/blob/master/django/middleware/common.py#L69
from django-macros-url.
Django handles this best way I think ;)
https://github.com/django/django/blob/master/django/middleware/common.py#L39
from django-macros-url.
Oh, thanks! Sorry for the extraneous request, feel free to close this issue.
from django-macros-url.
Only one stuff can be done - auto trailing slash (strict, all urls ends with "/") to make all urls more elegant and allow developer forget about trailing slashes at all. I mean force "/" without "?".
from django-macros-url.
I double checked source code, looks like force add slash to end of rule is bad idea because user will not have any chance to remove it, only hacks like str(url(..))
but it is ugly for me and I don't want to do it. So I close the issue.
Anyway thanks for your ideas.
from django-macros-url.
Thanks for your help nevertheless. This library has proven very useful!
from django-macros-url.
Related Issues (3)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-macros-url.