Switch2Bill-Common provide a set of helpers built by Star2Billing (http://www.star2billing.com) which are used in a subset of their open source projects.
What can you find ?
This repository is full of goodies, some are useful snippets recompiled.
It contains the following helper mainly related to Django :
Model : intermediate_model_base_class
FilterPersistMiddleware
Common functions :
get_unique_code - Generate unique code
pass_gen - Unique password generator
comp_month_range - Prepare month range list to compare with selected month
comp_day_range - Prepare day range list to compare with selected day
date_range - Get date list between two dates
validate_days - Validate no of days in given month and year
get_news - Get news from news url
only_one - Decorator for distributed task locking in celery
ceil_strdate - Convert a string date to either a start or end day date
percentage - Get percentage value
unset_session_var - Unset settion variable
getvar - Check field in POST/GET request and return field value. if there is value you can also save a session variable
word_capital - Capitalizes the first character of each word
Common Template tags :
time_in_min - Convert value in min:sec or seconds format
conv_min - Convert value in min:sec format
month_name - Get month name from 1-12 int no
sort_link - Usage: {% sort_link “link text” “field_name” %} or {% sort_link “link text” “field_name” “Visible name” %}
- get_fieldset- Make group of fields for field-set
Usage: {% get_fieldset field1,field2 as list_field from xyz_form %}
groupby_rows - Returns a list of n lists. Each sub-list is the same length
groupby_rows - Returns a list of lists where each sub-list has n items.
listsort - Perform sorting on template list
convert_to_int - Convert value to interger
wordcap - Capitalizes the first character of each words.
percentage_tag - get percentage value.
build_test_suite_from : Returns a single or group of unittest test suite
LanguageField - Field to language list
AppLabelRenamer Class for django admin UI
export_as_csv_action - Admin custom action which returns an export csv
Installation
Install using the sources
pip install -r requirements.txt python setup.py install
Install with PIP
python install switch2bill-common
License
MPL V2.0 License Copyright (C) 2011-2014 Star2Billing S.L.
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
The Initial Developer is Arezqui Belaid <info@star2billing.com>
Metadata
Release files for switch2bill-common 2.8.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| switch2bill-common-2.8.5.tar.gz | 26.8 kB | Without provenance | Details |
Release files / switch2bill-common-2.8.5.tar.gz
| Download URL | switch2bill-common-2.8.5.tar.gz |
|---|---|
| Size | 26.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8ce5000cd029e49454422465a4602df451878a5aebf8851ccda5d13503f1ec51
|
|
BLAKE2b-256 checksum How to use checksums |
e63ce9da49f3d74bcd0b3c4924ef67a82c5434aa98f1293303028c31d8c55124
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for switch2bill-common 2.8.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.