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 formdkfiedk59dlskdjfi
with the ability to choose a length and a charset. The function uses therandom
library, 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 [email protected].
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
Your contribution cannot be approved because it is not as informative as other contributions. It did not follow the Utopian Rules which says
I can see that the you have added a .gitignore file and added a Random function through the line
''.join(random.choice(string.ascii_uppercase + string.digits) for _ in range(N))
which is too common. Try to increase the number of features in one PR and submit a contribution in Utopian.You can contact us on Discord.
[utopian-moderator]
Oh i see, and this makes sense. Thanks for letting me know!