Skip to content

Instantly share code, notes, and snippets.

View BHushanRathod's full-sized avatar

BHushan Rathod BHushanRathod

  • Pune
View GitHub Profile
@ryantuck
ryantuck / gpg_test.py
Last active April 30, 2024 23:44
working example of using gnupg in python
# install:
# pip3 install python-gnupg
# note - gpg needs to be installed first:
# brew install gpg
# apt install gpg
# you may need to also:
# export GPG_TTY=$(tty)
from django.contrib.admin import ModelAdmin
class MyTableAdmin(ModelAdmin):
...
paginator = LargeTablePaginator
...
@marfire
marfire / models.py
Created February 17, 2017 00:12
Access the openfootball database from Django
# This file was originally auto-generated by Django's inspectdb command.
# The following changes were made manually:
#
# - Made the ids AutoFields (since they are defined as AUTOINCREMENT)
# - Renamed models to be singular
# - Added verbose_name_plural if necessary
# - Added ForeignKeys
# - Removed _id suffix on field name
# - Added target model
# - Added on_delete argument based on whether or not NULL is allowed