5 ms·
Django Template Tag to protect E-mail addresses on your website
- slig 17y agoWhy bother? Gmail's spam protection is good enough.
- vorador 17y agoNot everyone has (or wants) gmail.
- maurycy 17y agoThat's one of the reason why I can't stand Django anymore, being Rails programmer for few years. FYI, Rails' mail_to supports similar mechanism for years.
- theone 17y agoits a personal choice though.... There are a lot of things in Django which Rails doesn't have. Anyways it isn't hard to write such plugins.
- maurycy 17y agoIt is not a matter of choice. There are better web frameworks, as well as there are better tools for some tasks. Seriously, I'm not saying that Rails is better than Django. I'm sure there's a set of tasks where Django is much more better at than Rails. I'm just saying that I can't stand it that I have to write plugins for pretty standard stuff.
- theone 17y agoI won't consider this trick as an "standard stuff". There could be various techniques for preventing bots, and this implementation is just one of them. In my opinion framework should include stuff which is really standard, and best practice.
- maurycy 17y agoThe framework is its ecosystem, too. I agree that Rails shouldn't include this in the core. Regardless, I don't have to write this code, core or not core. That's the problem. It really adds up if you have to spend time on such small stuff.
- ghiotion 17y agoWhat's one of the reasons? That Django makes it incredibly easy to write functional, interesting template tags?
- maurycy 17y agoThe reason is that such thing not existed. It had to be written, and it's really standard stuff. Also, by the way, but I'm unable to download this, and there are no tests for this, as well as it clearly breaks the XHTML/JavaScript convention. Thus, even if it's easy to write, it's not easy enough to pluginize it, make accessible for other developers, write tests and keep XHTML/JavaScript separation.
- samueladam 17y agoI can't believe harvesting spiders don't execute javascript.
- sorbits 17y agoThat would (to some degree) open them up to DoS attacks. E.g. place a bunch of hidden links on your site that spiders will follow and have them do long JavaScript computation — perhaps these computations could actually do useful stuff :)
- patio11 17y agoGoogle couldn't do that reliably until, hmm, two years ago, ish? (GoogleBot still doesn't execute all Javascript, but it is getting smarter about both heuristic evaluation and limited execution. Test if you're skeptical, for example, by linking to pages "obviously" from within Javascript, linking to them using something a wee bit tricky like Prototype -> AJAX load a static file with the link in it, and then try with something where you need full execution to evaluate the link URL. Then see which pages Googlebot visits. For best results do this from a well-loved page.)