semvec/pypi-packages huggingface dataset:
django-admin-rangefilter 0.13.5
django-admin-rangefilter app, add the filter by a custom date range on the admin UI.
License: MIT
Requires Python: !=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7

.. image:: https://github.com/silentsokolov/django-admin-rangefilter/actions/workflows/build.yml/badge.svg
   :target: https://github.com/silentsokolov/django-admin-rangefilter/actions/workflows/build.yml

.. image:: https://codecov.io/gh/silentsokolov/django-admin-rangefilter/branch/master/graph/badge.svg
   :target: https://codecov.io/gh/silentsokolov/django-admin-rangefilter

django-admin-rangefilter
========================

A Django app that adds a filter by date range and numeric range to the admin UI.

.. image:: https://raw.githubusercontent.com/silentsokolov/django-admin-rangefilter/master/docs/images/screenshot.png


Requirements
------------

* Python 3.6+
* Django 1.11+


Installation
------------

Use your favorite Python package manager to install the app from PyPI, e.g.

Example:

``pip install django-admin-rangefilter``


Add ``rangefilter`` to ``INSTALLED_APPS``:

Example:

.. code:: python

    INSTALLED_APPS = (
        ...
        'rangefilter',
        ...
    )


Example usage
-------------

In admin
~~~~~~~~

.. code:: python

    from datetime import datetime

    from django.contrib import admin
    from rangefilter.filters import (
        DateRangeFilterBuilder,
        DateTimeRangeFilterBuilder,
        NumericRangeFilterBuilder,
        DateRangeQuickSelectListFilterBuilder,
    )

    from .models import Post


    @admin.register(Post)
    class PostAdmin(admin.ModelAdmin):
        list_filter = (
            ("created_at", DateRangeFilterBuilder()),
            (
                "updated_at",
                DateTimeRangeFilterBuilder(
                    title="Custom title",
                    default_start=datetime(2020, 1, 1),
                    default_end=datetime(2030, 1, 1),
                ),
            ),
            ("num_value", NumericRangeFilterBuilder()),
            ("created_at", DateRangeQuickSelectListFilterBuilder()),  # Range + QuickSelect Filter
        )


Support Content-Security-Policy
-------------------------------

For Django 1.8+, if `django-csp <https://github.com/mozilla/django-csp>`_ is installed, nonces will be added to style and script tags.
cpca-linch 0.4.5
Chinese Province, City and Area Recognition Utilities (Updated 2025)
License: MIT
Keywords: Simplified Chinese, Chinese geographic information, Chinese province city area recognition

cpca-linch
==========

A Python module for extracting Chinese province, city, and district information from address strings.

Fork from `DQinYuan/chinese_province_city_area_mapper <https://github.com/DQinYuan/chinese_province_city_area_mapper>`_ with updated 2025 administrative division data.

Installation
------------

.. code-block:: bash

    pip install cpca-linch

Usage
-----

.. code-block:: python

    import cpca

    df = cpca.transform(["徐汇区虹漕路461号58号楼5楼", "广东省中山市沙溪镇云汉轻纺城"])
    print(df)

Output::

         省    市    区              地址
    0  上海市  上海市  徐汇区  虹漕路461号58号楼5楼
    1  广东省  中山市  沙溪镇       云汉轻纺城

Key Improvements
----------------

1. Updated administrative division data to 2025 (from `xiangyuecn/AreaCity-JsSpider-StatsGov <https://github.com/xiangyuecn/AreaCity-JsSpider-StatsGov>`_)
2. Support for towns in prefecture-level cities without districts (Dongguan, Zhongshan, Danzhou, Jiayuguan)
3. Removed latitude/longitude data for smaller package size

Full documentation: `https://github.com/laofahai/cpca-linch <https://github.com/laofahai/cpca-linch>`_

License
-------

MIT