Published: 22 Jan 2018 › Updated: 22 Jan 2018
Add Helper function to generate random slug
PR link: https://github.com/QuorumUS/walawala/pull/9
New Features
- What feature(s) did you add / how I implemented?
Added a helper function to generate a random slug of the formdkfiedk59dlskdjfiwith the ability to choose a length and a charset. The function uses therandomlibrary, andrandom.SystemRandom()guarantees a random slug. We need to generate urls to access certain pages in our applications, and we wanted urls of the form/url/thing/dkaldkdfoielai29fj/.This PR allows us to import our function anywhere in our Django codebase.
This is the important line: https://github.com/QuorumUS/walawala/pull/9/files/d68a5c78a9cd5d6d4934272dc159e206521fe075#diff-91adb49ec779b8abb9a0c129bdf2146aR121
New Projects
- What is the project about?
This project is a collection of mostly string helper functions that reduce code duplication and localizes logic. We do a lot of string parsing and processing, and we found that over time we were writing a lot of little helper functions to do our jobs. Abstracting out that logic into a seperate repo is a more maintainable long term solution. - Technology Stack
Briefly list the used technologies and languages and other technical requirements.
The only technology here is Python - Roadmap
I'd like to make this repo more accessible to the rest of the open source community by adding more docstrings and general documentation, which would include a list of all helper functions available in the library. - How to contribute?
Anyone can reach out to me via github, twitter (@jmares93), or jmares93@gmail.com.
Note: I know this PR is a little older than 7 days, but its my first contribution so I wanted to try and post it!
Posted on Utopian.io - Rewarding Open Source Contributors
Leave Add Helper function to generate random slug to:
Read more #utopian-io posts
Best Posts From Jonathan
We have not curated any of jmares's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.