Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install switch2bill-common

How to install switch2bill-common

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install switch2bill-common
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
Windows (64-bit)
Mac OS X (10.5+)
Linux (32-bit)
2.2.3
2.8.1Never BuiltWhy not?
2.2.3 Available View build log
2.2.1 Available View build log
2.1.2 Available View build log
Linux (64-bit)
2.8.1 Available View build log
2.2.3 Available View build log
2.2.1 Available View build log
2.1.2 Available View build log
 
License
MPL 2.0 License
Lastest release
version 2.8.1 on Jan 9th, 2014

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 :

  1. Model : intermediate_model_base_class

  2. FilterPersistMiddleware

  3. 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

  4. 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

  5. build_test_suite_from : Returns a single or group of unittest test suite

  6. LanguageField - Field to language list

  7. AppLabelRenamer Class for django admin UI

  8. export_as_csv_action - Admin custom action which returns an export csv

Installation

  1. Install using the sources

    pip install -r requirements.txt
    python setup.py install
    
  2. Install with PIP

    python install switch2bill-common
    

License

MPL V2.0 License Copyright (C) 2011-2013 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>

Subscribe to package updates

Last updated Jan 9th, 2014

Download Stats

Last month:1

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.