Saravanan666/pypi-org huggingface dataset:
Package: django-ios-storekit
django-ios-storekitA Django plugin for iOS StoreKit server.Supported python versions3.6.x ~ 3.9.xSupported django versions2.xInstallation$pipinstalldjango-ios-storekitAddstorekitintoINSTALLED_APPSinsettings.pyfile.INSTALLED_APPS+=('storekit',)$pythonmanage.pymigrateLicenseThis software is licensed under the MIT License (SeeLICENSE).
Package: django-ip
Simple return user’s real IP address in DjangoInstallationpip install django-ipUsage# Need Setting
request.client_ip

# Not Need Setting
from ipaddr import client_ip
def xxx(request):
    ipaddr = client_ip(request)Settings.py# Use `MIDDLEWARE_CLASSES` prior to Django 1.10
MIDDLEWARE = (
    ...
    'ipaddr.middleware.IPAddrMiddleware',
    ...
)
Package: django-ip2language
Ip2Language===========This package provides an easy way to use maxmind's API to set an appropriate language code. This is useful, if we want to avoid using a language selector and cookies.------------Installation------------Firstly, install the package. Usage of pip is recommended:pip install ip2languageNext, add the package to the INSTALLED_APPS setting:INSTALLED_APPS = ('ip2language',...)Then we can add the middleware:MIDDLEWARE_CLASSES = ('ip2language.middleware.LanguagePreferenceMiddleware',...)And it's important to add a setting to specify what language codes should be mapped to what language codes. This allows us to arbitrarily assign different fallbacks for different languages:GEOIP_LANGUAGES = {'NL': 'nl','BE': 'fr',}The keys in this dictionary should be a subset of the country codes supported by maxmind. For reference, this list can be viewed here:http://dev.maxmind.com/geoip/codes/iso3166The corresponding values can be any language code that's valid in the django project. The middleware will end up using this code in the redirect url.Next, we will set a universal fallback:GEOIP_FALLBACK_LANGUAGE = 'en'This means that any visitor who is not in one of the specified countries, will view the content associated with the 'en' language code.* geoip dat file locLastly, we need to tell the module where it can find a valid geoip database:GEOIP_DATABASE = '/usr/share/GeoIP.dat'that's all folks!
Package: django-ip2location-timezone
Django IP2Location TimezoneDjango IP2Location Timezone is a Django package that can help you easily display your website visitor the time according to their location. This package usedIP2Location Web Serviceto get time zone information.RequirementsPython 2.7 and above.Django 1.11 and above.IP2Location Web ServiceAPI Key. You can get a trial API key fromIP2Location.Quick StartInstall this package by using PYPI:pipinstalldjango-ip2location-timezoneAdd "ip2location_timezone" to your INSTALLED_APPS setting in settings.py:INSTALLED_APPS=(...'ip2location_timezone',)Add "IP2locationTimezoneMiddleware" to your MIDDLEWARE_CLASSES in settings.py:MIDDLEWARE_CLASSES=(...'ip2location_timezone.middleware.IP2locationTimezoneMiddleware',)Add yourIP2Location Web ServiceAPI Key in settings.py:IP2LOCATION_API_KEY='YOUR_API_KEY'In your template, add the following code to display the user time zone and current time:{%loadtz%}{%localtimeon%}{%get_current_timezoneasTIME_ZONE%}Yourtimezoneis{{TIME_ZONE}}.<br/><br/>Itis{%now"DATETIME_FORMAT"%}{%endlocaltime%}SupportEmail:support@ip2location.com.URL:https://www.ip2location.com
Package: django-ipapi
Aboutdjango-ip-com is a django app forhttp://ip-api.com/WARNING: This is BETA app! See LICENSE.UsageInstall: pip install django-ipapiAdd ‘ipapi’ to INSTALLED_APPSAdd ‘ipapi.middleware.CheckCountryCodeMiddleware’ to MIDDLEWARE_CLASSESSet IPAPI_ALLOWED_COUNTRIES = [‘your iso-country-code’,]Test on localhost:http://localhost:8000/pl/?__ipapi__=208.80.152.201
Package: django-ipauth
IntroductionIP based authentication for Django. IP ranges are specified and tied to a user
account.InstallationInstall thedjango_ipauthpackage into your path either usingbuildout,easy_installorpip.Make the following changes to yoursettings.py* Add‘ipauth.backend.RangeBackend’to yourAUTHENTICATION_BACKENDS* Addipauthto yourINSTALLED_APPS* If it isn’t already, adddjango.contrib.authto yourINSTALLED_APPSChange your login url to use theipauth.views.loginview.Runmanage.py syncdbUsingIf you are using thecontrib.adminpackage from Django, you should have a
new section in your admin site calledIpauthwhere you can addRanges.0.4.1 (2012/12/03)Added logging to backend and login view0.4 (2012/11/27)Fixed validation bugs in RangeMade range collision validation errors more verbose0.3 (2012/10/22)Fixed a validation bug for IPAddressFormField0.2 (2011/06/23)Made the upper end of the range optionalFixed a bug in the Range model clean method if upper is null0.1 (2011/06/17)IPAddressFormField for inputting IP AddressesIPAddressModelField for storing IP addresses as integers (so math works)Range Model for storing IP Ranges tied to a user accountRange Authentication backendA login view wrapper that attempts to login via IP first
Package: django_ip_authn
To install add the middleware toMIDDLEWARE_CLASSES:'django_ip_authn.authentication.Middleware',You also need to add the authentication backend toAUTHENTICATION_BACKENDS. This will probably not already exist, in
which case you will want the entirety of this:AUTHENTICATION_BACKENDS = (
    'django.contrib.auth.backends.ModelBackend',
    'django_ip_authn.authentication.Authenticate',
)By default it will not authenticate until you also add in the IP numbers
that it should allow:VALID_IP_NUMBERS = [
    '127.0.0.1', '127.0.1.1', # Allow only localhost IP numbers
]Currently it will automatically allow the user with ID 1, this is the
user that you create during the initial database creation in Django.There is an optional header to determine whichrequest.METAheader
value to use to get the remote IP number. This defaults toREMOTE_ADDR. If you are behind a HTTP router you may need to set
this to something like the X-Forwarded-For:REMOTE_IP_HEADER='HTTP_X_FORWARDED_FOR'Make sure that your HTTP router always sets this or you will open the
possibility for a remote client to get around the IP number check by
just setting a header on the request.
Package: django-ipfs-storage
StoreDjango
file-uploadson theInterplanetary File System.Uploads are added and pinned to the configured IPFS node, which returns
the IPFS Content ID (a hash of the contents). This hash is the name that
is saved to your database. Duplicate content will also have the same
address, saving disk space.Because of this only file creation and reading is supported.Other IPFS users access and reseed a piece of content through its unique
content ID. Differently-distributed (i.e. normal HTTP) users can access
the uploads through an HTTP→IPFS gateway.Installationpipinstalldjango-ipfs-storageConfigurationBy defaultipfs_storageadds and pins content to an IPFS daemon
running on localhost and returns URLs pointing to the publichttps://ipfs.io/ipfs/HTTP GatewayTo customise this, set the following variables in yoursettings.py:IPFS_STORAGE_API_URL: defaults to'http://localhost:5001/api/v0/'.IPFS_GATEWAY_API_URL: defaults to'https://ipfs.io/ipfs/'.SetIPFS_GATEWAY_API_URLto'http://localhost:8080/ipfs/'to
serve content through your local daemon’s HTTP gateway.UsageThere are two ways to use a Django storage backend.As default backendUse IPFS asDjango’s default file storage
backend:# settings.pyDEFAULT_FILE_STORAGE='ipfs_storage.InterPlanetaryFileSystemStorage'IPFS_STORAGE_API_URL='http://localhost:5001/api/v0/'IPFS_STORAGE_GATEWAY_URL='http://localhost:8080/ipfs/'For a specific FileFieldAlternatively, you may only want to use the IPFS storage backend for a
single field:fromdjango.dbimportmodelsfromipfs_storageimportInterPlanetaryFileSystemStorageclassMyModel(models.Model):# …file_stored_on_ipfs=models.FileField(storage=InterPlanetaryFileSystemStorage())other_file=models.FileField()# will still use DEFAULT_FILE_STORAGEDon’t forget the brackets to instantiateInterPlanetaryFileSystemStorage()with the default arguments!FAQWhy IPFS?Not my department. Seehttps://ipfs.io/#why.How do I ensure my uploads are always available?I don’t know. Maybe look into usingipfs-clusterto spread it
across a few nodes? Or perhaps you could integrateEternum’s hosted pinning service.How do I backup my uploads?See above.How do I delete an upload?Because of the distributed nature of IPFS, anyone who accesses a piece
of content keeps a copy, and reseeds it for you automatically until it’s
evicted from their node’s local cache. Yay bandwidth costs! Boo
censorship!Unfortunately, if you’re trying to censor yourself (often quite
necessary), this means the best we can do is unpin the piece of content
from your own IPFS node(s) and hope nobody else has pinned it.How do I securely expose my IPFS daemon’s API to connect remotely?Someone please tell me.How do I securely expose my own IPFS←HTTP Gateway?Again, see above.
Package: django-ipgeobase
django-ipgeobase - это приложение для определения региона (а также широты и долготы) в России по IP в DjangoУстановкаПроделываем в командной строке$ git clone git://github.com/satels/django-ipgeobase.git
$ cd django-ipgeobase
$ python setup.py installИли версионированно$ pip install django-ipgeobase==1.0.5Потом следует добавить ‘django_ipgeobase’ в INSTALLED_APPS и выполнить$ python manage.py syncdb  # Django < 1.7
$ python manage.py migrate django_ipgeobase  # Django >= 1.7НастройкаДобавить app в settings.pyINSTALLED_APPS = [
    ..
    'django_ipgeobase',
    ..
]Необязательные параметры (в settings.py):IPGEOBASE_CODING - кодировка этого файла (по-умолчанию windows-1251, можно не менять).IPGEOBASE_SOURCE_URL - ссылка на этот файл на сайте-источнике (по-умолчанию установлено, можно не менять)IPGEOBASE_SEND_MESSAGE_FOR_ERRORS - отправлять ли сообщения об ошибках на почту при обновлении (по-умолчание, True)ИспользованиеДля получения объекта ipgeobase (для определения региона)from __future__ import print_function, unicode_literals
from django_ipgeobase.models import IPGeoBase

ip = "212.49.98.48"

ipgeobases = IPGeoBase.objects.by_ip(ip)
if ipgeobases.exists():
    ipgeobase = ipgeobases[0]
    print(ipgeobase.country)  # 'RU' - Страна
    print(ipgeobase.district)  # Округ (для указанного ip - Уральский федеральный округ)
    print(ipgeobase.region)  # Регион (Свердловская область)
    print(ipgeobase.city)  # Населенный пункт (Екатеринбург)
    print(ipgeobase.ip_block)  # IP-блок, в который попали (212.49.96.0 - 212.49.127.255)
    print(ipgeobase.start_ip, ipgeobase.end_ip)  # (3560005632, 3560013823), IP-блок в числовом формате
    print(ipgeobase.latitude, ipgeobase.longitude)  # (56.837814, 60.596844), широта и долготаОбновления базыЧтобы обновить базу ipgeobase$ python manage.py ipgeobase_update
Package: django-ipghrms-contract
Add ‘contract’ to your INSTALLED_APPS settings like this:INSTALLED_APPS = [
    'contract'
]Include the contract to project URLS like this:path('contract/', include('contract.urls')),Runpython manage.py migrateto create contract modelAnother Apps Need for this Apps::4.1. custom::
4.2. employee::
4.3. user
Package: django-ipghrms-custom
Add ‘custom’ to your INSTALLED_APPS settings like this:INSTALLED_APPS = [
    'custom'
]Include the custom to project URLS like this:path('custom/', include('custom.urls')),Runpython manage.py migrateto create custom modelAnother Apps Need for this Apps::4.1. custom::
4.2. employee::
4.3. user
Package: django-ipghrms-employee
Add ‘employee’ to your INSTALLED_APPS settings like this:INSTALLED_APPS = [
    'employee'
]Include the employee to project URLS like this:path('employee/', include('employee.urls')),Runpython manage.py migrateto create employee modelAnother Apps Need for this Apps::4.1. custom::
4.2. employee::
4.3. user
Package: django-ipghrms-leave
Add ‘leave’ to your INSTALLED_APPS settings like this:INSTALLED_APPS = [
    'leave'
]Include the leave to project URLS like this:path('leave/', include('leave.urls')),Runpython manage.py migrateto create leave modelAnother Apps Need for this Apps::4.1. custom::
4.2. employee::
4.3. user
Package: django-ipghrms-log
Add ‘log’ to your INSTALLED_APPS settings like this:INSTALLED_APPS = [
    'log'
]Include the log to project URLS like this:path('log/', include('log.urls')),Runpython manage.py migrateto create log modelAnother Apps Need for this Apps::4.1. custom::
4.2. employee::
4.3. user
Package: django-ipghrms-main
Add ‘main’ to your INSTALLED_APPS settings like this:INSTALLED_APPS = [
    'main'
]Include the main to project URLS like this:path('main/', include('main.urls')),Runpython manage.py migrateto create main modelAnother Apps Need for this Apps::4.1. custom::
4.2. employee::
4.3. user
Package: django-ipghrms-notification
Add ‘notification’ to your INSTALLED_APPS settings like this:INSTALLED_APPS = [
    'notification'
]Include the notification to project URLS like this:path('notification/', include('notification.urls')),Runpython manage.py migrateto create notification modelAnother Apps Need for this Apps::4.1. custom::
4.2. employee::
4.3. user
Package: django-ipghrms-onboarding
Add ‘onboarding’ to your INSTALLED_APPS settings like this:INSTALLED_APPS = [
    'onboarding'
]Include the onboarding to project URLS like this:path('onboarding/', include('onboarding.urls')),Runpython manage.py migrateto create onboarding modelAnother Apps Need for this Apps::4.1. custom::
4.2. employee::
4.3. user
Package: django-ipghrms-payroll
Add ‘payroll’ to your INSTALLED_APPS settings like this:INSTALLED_APPS = [
    'payroll'
]Include the payroll to project URLS like this:path('payroll/', include('payroll.urls')),Runpython manage.py migrateto create payroll modelAnother Apps Need for this Apps::4.1. custom::
4.2. employee::
4.3. user
Package: django-ipghrms-payslip
Add ‘payslip’ to your INSTALLED_APPS settings like this:INSTALLED_APPS = [
    'payslip'
]Include the payslip to project URLS like this:path('payslip/', include('payslip.urls')),Runpython manage.py migrateto create payslip modelAnother Apps Need for this Apps::4.1. custom::
4.2. employee::
4.3. user
Package: django-ipghrms-perform
Add ‘perform’ to your INSTALLED_APPS settings like this:INSTALLED_APPS = [
    'perform'
]Include the perform to project URLS like this:path('perform/', include('perform.urls')),Runpython manage.py migrateto create perform modelAnother Apps Need for this Apps::4.1. custom::
4.2. employee::
4.3. user
Package: django-ipghrms-recruitment2
Add ‘recruitment2’ to your INSTALLED_APPS settings like this:INSTALLED_APPS = [
    'recruitment2'
]Include the recruitment2 to project URLS like this:path('recruitment2/', include('recruitment2.urls')),Runpython manage.py migrateto create recruitment2 modelAnother Apps Need for this Apps::4.1. custom::
4.2. employee::
4.3. user
Package: django-ipghrms-settingsapp
Add ‘settings_app’ to your INSTALLED_APPS settings like this:INSTALLED_APPS = [
    'settings_app'
]Include the settings_app to project URLS like this:path('settings_app/', include('settings_app.urls')),Runpython manage.py migrateto create settings_app modelAnother Apps Need for this Apps::4.1. custom::
4.2. employee::
4.3. user
Package: django-ipghrms-training
Add ‘training’ to your INSTALLED_APPS settings like this:INSTALLED_APPS = [
    'training'
]Include the training to project URLS like this:path('training/', include('training.urls')),Runpython manage.py migrateto create training modelAnother Apps Need for this Apps::4.1. custom::
4.2. employee::
4.3. user
Package: django-ipghrms-trip
Add ‘trip’ to your INSTALLED_APPS settings like this:INSTALLED_APPS = [
    'trip'
]Include the trip to project URLS like this:path('trip/', include('trip.urls')),Runpython manage.py migrateto create trip modelAnother Apps Need for this Apps::4.1. custom::
4.2. employee::
4.3. user
Package: django-ipghrms-users
Add ‘users’ to your INSTALLED_APPS settings like this:INSTALLED_APPS = [
    'users'
]Include the users to project URLS like this:path('users/', include('users.urls')),Runpython manage.py migrateto create users modelAnother Apps Need for this Apps::4.1. custom::
4.2. employee::
4.3. user
Package: django-ip-guard
Django IP Guard (DIG) is a Django app to protect your django website from spammers, bots and bad peoples by their IP addresses. You can block specific ip addresses for specific urls or the entire site. You can allow only specific ip addresses for specific urls or the entire site.Installation GuideAdd “django_ip_guard” to your INSTALLED_APPS setting like this:INSTALLED_APPS = [
    ...
    'django_ip_guard', # new
]Include the‘django_ip_guard.middleware.DjangoIpGuardMiddleware’URLconf in your project urls.py like this:MIDDLEWARE = [
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django_ip_guard.middleware.DjangoIpGuardMiddleware', # new
]AddDIG_ENABLED = Truein your settings.pyAddDIG_STORAGE = 'db'in your settings.py if you want to use your database for storing Rules. If you want to use environment variables then addDIG_STORAGE = ‘env’.Now migrate databasepython manage.py migrate.If you want to detect users IP addressfrom django_ip_guard.utils import get_client_ip
...
get_client_ip(request)
...If you choose ‘db’ you don’t need to add anymore variables in settings.py.You need to login to admin panel and addDig Rules(Only the first row is counted).When you addDig rulesyou can seeBlocker url patternsandBlocker ip patterns. By using these two fields you can actually block some ip addresses to get access of certain page or the entire website. Common use cases:Blocking bots from accessing entire site.Blocking some ip address to access your contact form page etc.You can also seeAllower url patternsandAllower ip patterns. By using these two fields you can actually allow certain ip addresses to get access of certain pages or the entire website. Common use cases:Allow only / Restrict few ip address to access your django admin panel.You may have multiple URLs or IPs in a single field. You just need to separate them with a new line.and each URL and IP or a line will support Regex (Regular expression)Example of blocker:Blocker url patterns^/blog/
^contact-us/$Blocker ip patterns175.38.89.10[0-9]
98.981.98.98So this will block mentioned ip addresses to access blog and contact page. For entire site add^/example of blocker:Blocker url patterns^admin/Blocker ip patterns76.88.12.10[0-9]So this will only allow mentioned ip addresses to access admin panel. For entire site add^/If you choose ‘env’ then you don’t need to add rules in database. You need to add more variables in settings.py:BLOCKER_URL_PATTERNS="^/blog/,^contact-us/$"
BLOCKER_IP_PATTERNS="175.38.89.10[0-9],98.981.98.98"
ALLOWER_URL_PATTERNS="^admin/"
ALLOWER_IP_PATTERNS="76.88.12.10[0-9]"You see the difference? Yes it’s comma. If you don’t want to use database you need to separate those URLs and IPs with commas. But in database you need to separate by new lines.Finally we recommend you to use this app from env/settings file in production. Because database interaction might be a bit heavier. which can slower your website performance.Requirements / DependenciesPython >=3.6, <4.0Django >= 3.0, <4.0
Package: django-ip-logger
Django IP loggerDjango application for saving IP adresses visiting a web application.IntroAs your web application scales, you will often encounter different reasons to keep track of IP Addresses. Perhaps, you just rolled out an Advert application and need to track visits and interactions in the back-end; perhaps, an 'evil' IP address continously pesters your endpoints without provocation and you'd like to implement a blacklist; better still, you need to track visitors across web pages on a 'IP' basis rather than just sessions.Or perhaps, you have this biting need to have fun and fill production DBs with IP adresses whether you need it or not.This application is a quite simple and effective solution to that.How to do?It's quite simple to use. Install with:pip install django-ip-loggerNext step is to  addip_loggerto your INSTALLED_APPS like so:INSTALLED_APPS = [
    #... apps I don't care about here
    'ip_logger',
]Next is to addip_logger.middleware.LogIPMiddlewareto the top of the list of MIDDLEWARES:MIDDLEWARE = [
    'ip_logger.middleware.LogIPMiddleware',
    # ... stuffs that's not my business
]Working?To test it's working, visit a random URL on your webapp and check that your IP has been added to the list.FAQsWhy don't you save other stuffs like requests, responses, response time, queries, url paths and the sorts?
For the sake of generalization and to prevent bloating, I've decided to save only IPs, first visit and recent visit time. This is to ensure your DB is not populated with lots of rows for the sake of 'robust-ness'. Most web apps won't need it. If you do, implement it yourself, you've got theIPAdressmodel there for you.Do I need additional configurations?
No, boss... You don't.Nothing's working, I've tried every possible option
Quit the project, it's not worth it.This stuff is too simple, why implement it?
Since you didn't implement it, I did.Why did you choose this name for the package?
Don't question my decisions. It took me 3 days to make this decision.Is this package needed?
Depends.Bugs?Raise an issue, I'll check it out.Contributions?Oh well... Make a PR
Package: django-iportfolio-ds
django-iportfolio_dsdjango-iportfolio_ds 는 iportfolio-pro v5.2.2을 장고에 맞게 포팅한 장고앱이다.프로젝트에 설치하기settings.py에 다음 설정을 추가한다.importos...INSTALLED_APPS=[...'demian_parts','iportfolio',]...# static 파일을 _static 폴더에 저장하도록 설정STATICFILES_DIRS=[os.path.join(BASE_DIR,'_static/'),]...# 팝업창 모듈에서 이미지를 업로드 하기 위해MEDIA_URL='/media/'MEDIA_ROOT=os.path.join(BASE_DIR,'media/')X_FRAME_OPTIONS='SAMEORIGIN'프로젝트의 urls.py에 다음을 추가한다.fromdjango.urlsimportpath,includefromdjango.confimportsettingsfromdjango.conf.urls.staticimportstatic...urlpatterns=[...path('',include('iportfolio.urls')),]# 팝업창 모듈에서 이미지를 업로드 하기 위해ifsettings.DEBUG:urlpatterns+=static(settings.MEDIA_URL,document_root=settings.MEDIA_ROOT)데이터 베이스를 생성한다.python manage.py makemigrations iportfolio demian_parts
python manage.py migrate
python manage.py createsuperuser프로젝트의 구조를 생성한다._data 폴더를 생성하고 contents.py내에 데이터를 형식에 맞게 입력한다.
_static 폴더를 생성하고 각종 이미지 등을 형식에 맞게 저장한다.
필요하면 admin으로 접속하여 팝업창을 생성한다.참고 : SCSS 설치하기 - 프로젝트에 SCSS를 설치해야 앱이 작동한다.https://www.accordbox.com/blog/how-use-scss-sass-your-django-project-python-way/django_compressor, django-libsass를 설치한다. (iportfolio 앱을 설치하면 자동 설치)pip install django_compressor django-libsasssettings.py에 다음 세팅을 추가하여 compressor가 캐시할 수 있도록한다.importosINSTALLED_APPS=[...'compressor',]COMPRESS_PRECOMPILERS=(('text/x-scss','django_libsass.SassCompiler'),)STATICFILES_FINDERS=['django.contrib.staticfiles.finders.FileSystemFinder','django.contrib.staticfiles.finders.AppDirectoriesFinder','compressor.finders.CompressorFinder',]# compressor 앱을 실행하기 위해서는 STATIC_ROOT가 설정되어 있어야 한다.STATIC_ROOT=os.path.join(BASE_DIR,'staticfiles')
Package: django-iprir
iprir is a simple Django app to store and query information about Regional
Internet Registries like Top Level Domains and IP adresses.Useful if you’d like to know where your visitors come from.Updated for Django2.0Updated for PostgreSQLQuick startAdd “iprir” to your INSTALLED_APPS setting like this:INSTALLED_APPS = (
    ...
    'iprir',
)Include the iprir URLconf in your project urls.py like this:url(r'^iprir/', include('iprir.urls')),Runpython manage.py migrateto create the iprir models.Runpython manage.py loadregistryto import data.UsageAny of the URL’sIn models.py:from iprir.models import TLDclass Country(models.Model):…
tld = models.ForeignKey(TLD, blank=True, null=True)In helpers.py / views.pyfrom iprir.helpers import ip_infoipremote = ip_info(request, request.META[‘REMOTE_ADDR’])