Saravanan666/pypi-org huggingface dataset:
Package: django-owghatapi
=====owghat-api=====owghat-api is a django app for Islamic times (owghat e shar'ee)Quick start-----------pip install django-owghatapirequirements: sqlparse,djangorestframework,pytz1. Add "owghatapi" to your INSTALLED_APPS setting like this::INSTALLED_APPS = [...'owghatapi',]2. Include the owghatapi URLconf in your project urls.py like this::path('owghatapi/', include('owghatapi.urls')),3. Run `python manage.py migrate` to create the owghat models and seed the DB .5. Visit http://127.0.0.1:8000/owghatapi/<str:city-name>/ to get the times for more than 400 selected cities of iran (city name in Farsi),http://127.0.0.1:8000/owghatapi/35.69439/51.42151 to get the times for today and specific location(latitude/longitude) in iran,and http://127.0.0.1:8000/<int:year>/<int:month>/<int:day>/<str:lat>/<str:long>/<str:tz>/ for specific time,location,and timezone
Package: django-owm-legacy
Legacy features of OpenWISP Manager reimplemented in django forOpenWISP2.Install stable version from pypiInstall from pypi:pipinstalldjango-owm-legacyInstall development versionInstall tarball:pipinstallhttps://github.com/openwisp/django-owm-legacy/tarball/masterAlternatively you can install via pip using git:pipinstall-egit+git://github.com/openwisp/django-owm-legacy#egg=django-owm-legacyIf you want to contribute, install your cloned fork:gitclonegit@github.com:<your_fork>/django-owm-legacy.gitcddjango-owm-legacypythonsetup.pydevelopSetup (integrate in an existing django project)Addopenwisp_controllerandowm_legacytoINSTALLED_APPSas follow:INSTALLED_APPS=[# ...'django.contrib.sites',# allauth'allauth','allauth.account','django_extensions',# openwisp2 modules'openwisp_controller.config','openwisp_controller.pki','openwisp_controller.geo','openwisp_controller.connection','openwisp_users','openwisp_notifications','openwisp_ipam',# openwisp2 admin theme# (must be loaded here)'openwisp_utils.admin_theme','django.contrib.admin','django.forms',# other dependencies'sortedm2m','reversion','leaflet','flat_json_widget','owm_legacy',# ...]Other settings needed insettings.py:EXTENDED_APPS=('django_x509','django_loci')AUTH_USER_MODEL='openwisp_users.User'SITE_ID=1Yoururls.pyshould look like the following:fromdjango.urlsimportinclude,pathfromdjango.contribimportadminfromdjango.contrib.staticfiles.urlsimportstaticfiles_urlpatternsadmin.autodiscover()urlpatterns=[path('admin/',include(admin.site.urls)),path('',include('openwisp_controller.urls',namespace='controller')),path('',include('owm_legacy.urls',namespace='owm_legacy')),]urlpatterns+=staticfiles_urlpatterns()Installing for developmentInstall sqlite:sudoaptinstall-ysqlite3libsqlite3-devopenssllibssl-devsudoaptinstall-ygdal-binlibproj-devlibgeos-devlibspatialite-devlibsqlite3-mod-spatialiteLaunch Redis:docker-composeup-dredisInstall your forked repo:gitclonegit://github.com/<your_fork>/django-owm-legacycddjango-owm-legacy/pythonsetup.pydevelopInstall test requirements:pipinstall-rrequirements-test.txtCreate database:cdtests/./manage.pymigrate./manage.pycreatesuperuserLaunch celery worker (for background jobs):celery-Aopenwisp2worker-linfoLaunch development server:./manage.pyrunserverYou can access the admin interface athttp://127.0.0.1:8000/admin/.Run tests with:./runtests.pySettingsOWM_LEGACY_ALLOWED_SUBNETStype:listdefault:['10.8.0.0/16', '127.0.0.1/32']List of strings representing ip networks allowed to retrieve
checksums and download configuration archives.ContributingPlease refer to theOpenWISP contributing guidelines.ChangelogSeeCHANGES.LicenseSeeLICENSE.SupportSeeOpenWISP Support Channels.
Package: django-owntracks
django-owntracksdjango-owntracksadd basic support for viewingowntracksdata in the context of django application.UsageAdd"owntracks"and"dmqtt"to yourINSTALLED_APPSINSTALLED_APPS=["owntracks",# Third Party"dmqtt",# Core Django"django.contrib.admin","django.contrib.auth","django.contrib.contenttypes","django.contrib.sessions","django.contrib.messages","django.contrib.staticfiles",]AddMQTT_HOST,MQTT_USER,MQTT_PASS,MQTT_PORT
Package: django-ows-lib
django-ows-libWell layered ows lib with a client implementation to communicate with ogc services with django based objects,
including xml mapper classes to serialize and deserialize ows xml files, such as capabilities.FeaturesWMSclientWFSclientCSWclientQuick-StartInstall it as any other django app to your project:$pipinstalldjango-ows-libWarningAs pre requirement you will need to install thegdal and geos binarieson your system first.See thedocumentationfor details.
Package: django-p3p
About Django P3PIf your webpage uses sessions you willl lose your session in Internet Explorer when your page gets embedded into in iFrame. This problem can be solved by setting application specificP3P headers.Django P3P is an application which makes it easier to set those specific headers for your Django application. You can use an editor like IBM’s P3P Policy Editor to configure your website policy to its needs.RequirementsDjango 1.8.x or greater, Python 2.7 or greater.InstallationInstall django-p3p with pip:$ pip install django-p3pConfigurationConfiguring django-p3pAdd the following to your settings file:Addp3ptoINSTALLED_APPSAddp3p.middleware.P3PMiddlewaretoMIDDLEWARE_CLASSESURL ConfigurationYou need to include thep3p.urlsurlpatterns in your root url configuration, for e.g.:(r'^w3c/', include('p3p.urls', namespace='p3p')),
...
(r'^admin/', include(admin.site.urls)),Overriding templatesYou need to override at least 2 templates to configure your project specific HTTP headers and policy:templates/p3p/headers.txtContains the actual HTTP headers which are sent to the browser. For e.g.:CP="NOICURa ADMa DEVa TAIa CONa OUR DELa BUS IND PHY ONL UNI PUR COM NAV DEM STA"templates/p3p/policy.p3pContains the policy as required for the application. You can generate one by using the IBM P3P Policy Editor.NoteI left the initial templates mostly blank to prevent default usage. Mainly because every application has its own specific policies and it requires you toTHINKabout what policy fits your website.
Package: django-pablo
pabloa mediocre fixture generator for djangoInstallationpip install django-pabloSetupAddpabloinsettings.pyof your django projectINSTALLED_APPS = (
    'django_prometheus',
    'rest_framework',
    'django.contrib.contenttypes',
    'django.contrib.auth',
    'pablo'
)just runpython manage.py pablo app_name.ModelName --limit 1 -v 1Usageusage: manage.py pablo [-h] [-l LIMIT] [-e EXCLUDE] [--debug] [--version] [-v {0,1,2,3}] [--settings SETTINGS] [--pythonpath PYTHONPATH] [--traceback] [--no-color]
                       [--force-color]
                       [app_label[.ModelName] ...]

Generate (sometimes)meaningful fixtures for your django project

positional arguments:
  app_label[.ModelName]
                        Restricts fixture to the specified app_label or app_label.ModelName

optional arguments:
  -h, --help            show this help message and exit
  -l LIMIT, --limit LIMIT
                        Limit number of fixtures generated for a model
  -e EXCLUDE, --exclude EXCLUDE
                        An app_label or app_label.ModelName to exclude (use multiple --exclude to exclude multiple apps/models)
  --debug               Enable verbosity with --debug flag
  --version             show program's version number and exit
  -v {0,1,2,3}, --verbosity {0,1,2,3}
                        Verbosity level; 0=minimal output, 1=normal output, 2=verbose output, 3=very verbose outputSample
Package: django-package-skeleton
Django Application Package SkeletonThe following features existsTesting demo django test project withsetup.pyAdd Django apps required to execute test dynamicallyAutomatically update the version number with gitHow to useFalk this project in your githubRenamepackagedirectory as your app name and fixsetup.pyas you wantAdd your app inINSTALL_APPSintests/settings.pyTesting demo django test project withsetup.pyThere is a simple blog django project intestsdirectory so just modify the project as you want
and add:$ python setup.py testwill run the project testsAdd Django apps required to execute test dynamicallyIf your Django app required apps just for testing then you can useapp_testcase.AppTestCaseto add
any django app dynamically in testIf you create some django field app and you want to test the field with simpleBookmodel then you
canCreate an simple app calledyourfieldname/tests/apps/booksCreate simple book models inyourfieldname/tests/apps/books/models.pyUseyourfieldname.tests.app_testcase.AppTestCaseinsted ofdjango.test.TestCaseand addyourfieldname.tests.apps.books` in ``install_appsfield of test case:from app_testcase import AppTestCase

class YourFieldTestCase(AppTestCase):
    install_apps = [
        'yourfieldname.tests.apps.books',
    ]
    # write your testsAutomatically update the version number with gitThe original idea came fromhttp://dcreager.net/2010/02/10/setuptools-git-version-numbers/What you need to do isAdd annotated or signed tag with the following command:$ git tag -a 0.1Then yourgit describeshows the tag name andpython setup.py sdistcreate the tag named version packageIf you change anything and commit, yourgit describemay change and that
is used as new version number and it become miner version upAdd new annotated or signed tag when you release stable version.
Package: django-packages-search
Imagine that you are in the middle of a project, and would like to search for a third-party django app that suits your current need. You live in Terminal and do all of your stuff within your favorite editor like Vim or Emacs.One way to search for such apps is to fire your web browser and visitdjangopackages.comand browse the packages comprehensively. Another way is using this tool. You can search for alistof packages within a certain area likecmsandprofiles, or you can get the vital information about aspecificpackage. The details come later.This tool is under active development and lots of improvements could be added gradually.
Package: django-package-template
Django Package TemplateTemplate for creating packages.InstructionsClickUse this Templateon GitHubFill out your project name accordinglyClone your repositoryRuninitalize.pyAdditional RecommendationsRewrite thisREADME.mdGenerate a documentation foldersphinx quickstartEnable Travis on Github andmv .travis.yml.example .travis.yml(don't forget to changedjango_package_template)Travis will test your application, given that you have proper Django testsAdd required packages insetup.pyClean UpDeleteinitailize.py
Package: django-packageutils
This is a utility collection for packaging Django App. The following features
are available.Unittest utility for running with setup.pyUnittest utility for dynamically adding models only used in the testAutomatically create user within syncdb commandHow to installUse pip comand or easy_install:pip install django-packageutilsDirectory tree assumeddjango-packagename
    +- setup.py
    +- RELEASE-VERSION          # used for git versioning
    +- packagename              # your package
        +- __init__.py
        +- models.py            # or whatever
        +- tests
            +- __init__.py
            +- test_models.py   # or whatever
            +- testapp          # App only required in tests of this package
                +- __init__.py
                +- models.py
    +- test                     # django project for testing
        +- __init__.py
        +- settings.py
        +- manage.py
        +- urls.py
        +- runtests.py          # for running test with setup.pyUnittest utility for running with setup.pyWrite yourruntests.pyin your package directory as:import os
from packageutils.test import get_package_runner
from packageutils.test import run_tests

def runtests(verbosity=1, interactive=True):
    package_dir = os.path.dirname(__file__)
    test_runner = get_package_runner(package_dir, verbosity, interactive)
    run_tests(test_runner, ['some_application_name'])

if __name__ == '__main__':
    runtests()Add test suite to yoursetup.pyas:setup(
    # ... some configures
    install_requires = [
        'distribute',           # recommended
        'setuptools-git',       # recommended
        'django-packageutils',  # required
        # and some other requires
    ],
    test_suite = 'tests.runtests.runtests',
    test_require = [
        'django',
    ],
)Then execute the following command:python setup.py testUnittest utility for dynamically adding models only used in the testWith Django default TestCase, you cannot add required models within test. Sometime you need extra models for testing your django package
then you can useAppTestCaseas:from packageutils.testcase import AppTestCase
from testapp.models import Article

class TestAppTestCase(AppTestCase):
    # Apps only required in this test
    installed_apps = [
        'packagename.tests.testapp',
    ]
    # Middlewares only required in this test
    middleware_classes = [
        'testapp.middleware.SomeMiddlewareRequired',
    ]

    def test_creation(self):
        article = Article.objects.create(title='foo')
        assert Article.objects.filter(title='foo').exists()Automatically create user within syncdb commandAddpackageutils.syncdb.autouserinINSTALLED_APPSthen admin user is created automatically
within syncdb command (password will be set as ‘admin’)
Package: django-paddle-billing
Django Paddle BillingThis package provides an integration between Django, a high-level Python Web framework, and Paddle Billing, a platform for selling digital products and services.FeaturesEasy setup and configurationSeamless integration with Django projectsComprehensive handling of Paddle Billing features, including webhooksInstallationTo install the package, use pip:pipinstalldjango-paddle-billingUsageAfter installing the package, add it to yourINSTALLED_APPSin your Django settings:INSTALLED_APPS=[...'django_paddle_billing',...]Then, run migrations:pythonmanage.pymigrateYou can now use the package in your Django project.Local webhook testingIn order to test webhooks locally, you can user cloudflared tunnel:CloudflaredTemporary URLcloudflaredtunnel--urlhttp://localhost:8000/Permanent URLThen, you can create a tunnel for your webhook:cloudflaredtunnellogin
cloudflaredtunnelcreatesandbox.paddle# Create config file# ...cloudflaredtunnelroutednssandbox.paddlesandbox-paddle.example.com
cloudflaredtunnelrunsandbox.paddleNote: The deep level of DNS requires to be paid Advanced DNS (10$/month), so sandbox.paddle.example.com is not freeTestingThis package uses pytest for testing. To run the tests, use the following command:pytestContributingContributions are welcome! Please read ourcontributing guidelinesfor details.LicenseThis project is licensed under the MIT License. See theLICENSEfile for details.
Package: django-page
Django-PageDjango - Korean Style, Wordpress-like, Simplest, CMS (Content Management System)한.국.형. ㅋ- 문서 정리 중 -Featurespage code 기반 자동 url 매칭ckeditor 기반 admin 제공기타등등의존성Django (2.0+ 만 테스트)django-ckeditoreasy-thumbnailsdjango-user-agentsdjango-admin-sortable2권장 설치django-revisiondjango-revision-comparedjango-bootstrap4DEMO셈플 테스트를 위한 예제 사이트를 제공합니다.
sqlite3 기반의 셈플 데이터도 포함되어 있습니다.Run$gitclonehttps://github.com/bluedisk/django-page.git
$cdexample
$pipinstall-rrequirements.txt
$./manage.pyrunserver관리자 화면 로그인 계정과 비밀번호는 admin / 관리자 입니다.설치0. pip installpipinstalldjango-page1. app setupINSTALL_APPS에 'page'와 의존성 앱추가INSTALLED_APPS=[...# 필수 추가 앱'page','ckeditor','ckeditor_uploader',# 선택'easy_thumbnails','django_user_agents','adminsortable2',# 권장 설치 앱'reversion','reversion_compare',...2. URL setup메인 urls.py 파일 제일 하단에 page.urls 추가urlpatterns=[path('ckeditor/',include('ckeditor_uploader.urls')),...path('admin/',admin.site.urls),...path('',include('page.urls')),]3. Middleware 추가django-user-agents 의존성으로 미들웨어 추가 필요MIDDLEWARE=[...'django_user_agents.middleware.UserAgentMiddleware',]4. Custumize Templatetemplates/page/base.html 를 오버라이드해서 현 사이트 스타일과 일치하게 변경한다
필수적으로 필요한 블럭명은 css, leader, content, title, subtitle, bgimage 이다아래는 base.html 템플릿 예시<htmllang="ko"><head><title>{{ site.name }}</title>{% block css %}
    {% endblock %}</head><bodyclass="st-container st-effect-3"><divclass="wrapper">{% block leader %}<h1>{% block title %}Title{% endblock %}</h1><p>{% block subtitle %}Subtitle{% endblock %}</p>{% endblock %}

    {% block content %}
    {% endblock %}</div></body></html>Page Code영문으로 된 slug 타입 문자열로 바로 URL로 대응 된다.예를 들어 페이지 코드가 'test'인 경우 '/test' url로 연결시 표출된다.
따라서 admin등 다른 앱과 충돌이 되는 코드는 사용 하지말것!Build-in page code페이지 코드 'home'의 경우 루트 URL ('/')에 대해 예약 되어 있다.Shortcode등록된 키워드를 django template tag로 변환, 해석 해준다사용법page 컨텐츠 상에 다음과 같이 추가[커맨드매개변수1매개변수2...]Build-in 명령어페이지 넣기매개변수 : 페이지 코드 또는 페이지 ID등록된 페이지 내용을 컨텐츠 중간에 삽입반복 문구 넣기매개변수 : 반복문구 코드 또는 반목문구 ID등록된 반복 사용 문구를 컨텐츠 중간에 삽입포함하기 = 가져오기include커스텀 명령어 추가커스텀 명령어 선언
settings.py 상에 다음과 같이 선언PAGE_SHORTCODES={"연락처넣기":"contact","다운로드항목":"download","보기":"view",}파라메터 니모닉 선언
편의를 위해서 첫번째 매개변수는 복잡한 내용으로 맵핑 가능PAGE_TARGET_MAP={"공지사항":"widget/notice.html","FAQ":"widget/faq.html",}ex>
[보기 공지사항] 의 경우 {% view "widget/notice.html" %} 으로 변환됨.load 할 모듈 추가
커스텀 테그를 추가하기 위해서 사용 될 templatetags 모듈을 추가.
모든 shortcode 실행 시점 상단에서 load 됨PAGE_UNPACK_WITH=('home','contact_info',)다음과 같이 상단에 포함됨{%loadhome%}{%loadcontact_info%}
Package: django-page-cms
This Django CMS enables you to create and administrate hierarchical pages in a simple and powerful way.For a quick demo.$pip3install-Idjango-page-cms[full];gerbi--createmywebsiteOr with dockerdocker-composeupwebIf you are logged in with github docker repositorydockerlogindocker.pkg.github.com-uUSERNAME-pTOKENdocker-compose-fdocker-compose-fast.yamlupwebTo create a super user accountdockerexec-itdjango-page-cms_web_1pythonexample/manage.pycreatesuperuserTo create a demo websitedockerexec-itdjango-page-cms_web_1pythonexample/manage.pypages_demoTo run tests with dockerdocker-composeuprun-testMore informationsInstallFull documentationHow to contributeDjango page CMS is based around a placeholders concept. Placeholder is a special template tag that
you use in your page templates. Every time you add a placeholder in your template such field
dynamically appears in the page admin interface.Each page can have a different template with different placeholders.Those placeholder can also be edited inline
Package: django-page-components
django-page-components“Page component” is a unit of a user interface (think ReactJS components).django-page-componentsprovide
a minimalistic framework for creating page components and using them in your Django views and templates.To define a page component, you need to create a sub-class ofpage_components.PageComponentand implementrendermethod like so:importpage_componentsimportdjango.utils.htmlclassAddToCartButton(page_components.PageComponent):def__init__(self,product):self.product=productclassMedia:js=("add-to-cart.js",# this is where addToCart is defined)css={"all":("add-to-cart.css"# this is where `.add-to-card` styles are defined)}defrender(self):returndjango.utils.html.format_html("""<button class="add-to-cart" onclick="addToCart({ product_id })">Add to cart</button>""",product_id=self.product.id)You can also use aTemplatePageComponentbase class to implement page components based on templates.
In that case, you may want to implementget_context_datamethod:classAddToCartButton(page_components.TemplatePageComponent):template_name="add-to-cart-button.html"...defget_context_data(self,**kwargs):kwargs["product_id"]=self.product_idreturnsuper(AddToCartButton,self).get_context_data(**kwargs)Note that it’s up to you to decide how to implement therendermethod and what additional methods should be added
to your page components. One general recommendation is to keep the__init__method as lightweight as possible and do
all the heavy lifting in therendermethod.A proposed convention is to store your page components classes inpage_componentspackage/module inside your app:myapp.page_components.AddToCartButtonNow, when we have some page components defined, it is time to use them in views:importdjango.views.genericimportpage_componentsimportmyapp.modelsimportmyapp.page_componentsclassProductPage(page_components.PageComponentsView,django.views.generic.DetailView,):model=myapp.models.Producttemplate_name="product.html"defget_page_components(self):return{"add_to_cart_button":myapp.page_components.AddToCartButton(self.object)}and templates:<html><head>/* this will include CSS files for all page components on that page */
    {{ view.media.css.render }}</head><body><h1>{{ object.title }}</h1>{{ page_components.add_to_cart_button }}

    /* this will include JavaScript files for all page components on that page */
    {{ view.media.js.render }}</body></html>Note that page components are placed topage_componentsnamespace in template context by default. You can change
that namespace on per-view basis by addingpage_components_context_nameattribute to a view class or globally withPAGE_COMPONENTS_CONTEXT_NAMEsetting. If you setpage_components_context_nametoNone, it will disable
the namespace entirely.Changes1.0.0Add Django 3.x and 4.x compatibilityDrop support for Python 2Python 3.6 is the minimum requirement0.1Initial release
Package: django-pageguide
django-pageguide================Django integration with [pageguide](https://github.com/tracelytics/pageguide), an interactive guide for web page elementsInstallation============Put the `pageguide` app In your `settings.py`:----------------------------------------------INSTALLED_APPS = ('django.contrib.auth','django.contrib.contenttypes','django.contrib.sessions','django.contrib.sites','django.contrib.admin',#.....................#'pageguide',)Run the migrations:------------------->>> python manage.py syncdb --migrateCreate the pages into the admin interface-----------------------------------------Go to `/admin/pageguide/`Integrate in your base template:--------------------------------* Into the top page:{% load pageguide_tags %}{% pageguide_css %}* Into the bottom (near the `</body>` tag):{% pageguide %}{% pageguide_js %}Development===========You can get the last bleeding edge version of django-pageguide by doing a cloneof its git repositorygit clone https://github.com/msaelices/django-pageguide.git
Package: django-page-hits
Django page hitsA middleware which stores the records of page view countsFree software: MIT licenseDocumentation:https://django-page-hits.readthedocs.io.InstallationInstall from github or clone the repository:pip install django_page_hitsAdd‘django_page_hits’at the end ofINSTALLED_APPS.Add‘django_page_hits.middleware.PageHitsMiddleware’to end ofMIDDLEWARE_CLASSES.Runpython manage.py syncdborpython manage.py migrate.CreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.2.0 (2024-01-25)Fix import for more recent Python0.1.0 (2020-10-12)First release on PyPI.