Skip to main content

DjangoCMS CZ.NIC Auctions

Project description

DjangoCMS CZ.NIC Auctions

A group of Django CMS plugins for displaying a table with a list of domains in an auction. The data source is set in the website administration in the Constance config section. The default value is https://auctions-master.nic.cz/v1/public/auctions/.

Install

pip install djangocms-cznic-auctions

Add into settings.py:

INSTALLED_APPS = [
    "constance",
    "cznic_auctions",
    ...
]

AUCTIONS_CONFIG = (
    ("AUCTIONS_LIST_URL", ("https://auctions-master.nic.cz/v1/public/auctions/", "Auctions list URL.", str)),
    ("AUCTIONS_NOT_VERIFY_CERTIFICATE", (False, "Do not verify certificate.", bool)),
)

CONSTANCE_CONFIG = OrderedDict(
    AUCTIONS_CONFIG,
)
CONSTANCE_CONFIG_FIELDSETS = {
    "CZ.NIC Auctions": dict(AUCTIONS_CONFIG).keys(),
}

Add into urls.py:

urlpatterns = i18n_patterns(
    ...
    path("auctions/", include(("cznic_auctions.urls", "auctions"), namespace="auctions")),
)

Custom templates

You can define your own template for the domain list.

Add into settings.py:

from cznic_auctions.constants import LIST_TEMPLATES

CZNIC_AUCTIONS_TEMPLATES = LIST_TEMPLATES + [
    ("my-awesome-template/list.html", "My awesome template"),
]

Site example

Along with the program, an example is stored in the repository that you can run in the docker.

Download the example:

curl https://gitlab.nic.cz/djangocms-apps/djangocms-cznic-auctions/-/archive/main/djangocms-cznic-auctions-main.zip?path=example --output example.zip

Extract the archive and go to the folder:

unzip example.zip
cd djangocms-cznic-auctions-main-example/example/

Build the image:

docker build -t auctions .

Run the site:

docker run --rm -d -p 8000:8000 --name auctions_example auctions

Open the site in your browser: http://localhost:8000/. You'll see what's in the screenshots.

Login to the administration: http://localhost:8000/admin with username admin and password admin.

Stop the site:

docker stop auctions_example

Auctions example

License

BSD License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

djangocms_cznic_auctions-1.2.0.tar.gz (21.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

djangocms_cznic_auctions-1.2.0-py3-none-any.whl (26.2 kB view details)

Uploaded Python 3

File details

Details for the file djangocms_cznic_auctions-1.2.0.tar.gz.

File metadata

File hashes

Hashes for djangocms_cznic_auctions-1.2.0.tar.gz
Algorithm Hash digest
SHA256 2d5cbb3a66a04e32c82a71e82be361b15f6d68000862aec8d3b51e5af965d538
MD5 a021323fb043adb64f32ae4825f263de
BLAKE2b-256 ffecfa0778f89913d1b161a2710e60097438d03ce44509ed5622240a8d59051f

See more details on using hashes here.

File details

Details for the file djangocms_cznic_auctions-1.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for djangocms_cznic_auctions-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 47bba38f6957523e8cbcead3b2e887184497439e47a3ba7d418ba2852553721b
MD5 4e2312a72999aaaf3091c000ef0697f0
BLAKE2b-256 b58721a93a373808c185407cde5b03dd422f488c8565a5175f4a858da5c1299d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page