{ "info": { "author": "", "author_email": "", "bugtrack_url": null, "classifiers": [ "Framework :: Django", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "\n\n[](https://pypi.org/project/django-github-user/)\n[](https://pypi.org/project/django-github-user/)\n[](https://travis-ci.org/looking-for-a-job/django-github-user.py/)\n\n#### Installation\n```bash\n$ [sudo] pip install django-github-user\n```\n\n#### `settings.py`\n```python\nINSTALLED_APPS = [\n 'django.contrib.contenttypes',\n \"taggit\",\n \"django_github_user\",\n]\n```\n\n#### Models\nmodel|`__doc__`\n-|-\n`django_github_user.models.Repo` |repo model. fields: `id`, `node_id`, `name`, `full_name`, `private`, `fork`, `description`, `homepage`, `language`, `forks_count`, `stargazers_count`, `watchers_count`, `open_issues_count`, `subscribers_count`, `network_count`, `size`, `has_issues`, `has_projects`, `has_wiki`, `has_pages`, `has_downloads`, `archived`, `disabled`, `pushed_at`, `created_at`, `updated_at`, `topics`\n`django_github_user.models.StarredRepo` |starred repo model. new fields: `starred_at`\n`django_github_user.models.Gist` |gist model. fields: `id`, `node_id`, `public`, `created_at`, `updated_at`, `description`, `comments`\n`django_github_user.models.StarredGist` |starred gists. same fields as `Gist` model\n\n#### Commands\ncommand|`help`\n-|-\n`python manage.py import-starred-repos` |import starred repos\n`python manage.py import-gists` |import my gists\n`python manage.py import-repos` |import my repos\n`python manage.py import-starred-gists` |import starred gists\n\n#### Examples\n```bash\n$ python -u manage.py import-repos\n$ python -u manage.py import-starred-repos\n$ python -u manage.py import-gists\n$ python -u manage.py import-starred-gists\n```\n\n`views.py`\n```python\nfrom django_github_user.models import Gist, Repo, StarredGist, StarredRepo\n\n\nclass View:\n def get_context_data(self, **kwargs):\n context = super().get_context_data(**kwargs)\n context[\"repos\"] = Repo.objects.filter(full_name__contains=settings.GITHUB_USERNAME).filter(fork=False).filter(private=False).all()\n context[\"starred_repos\"] = StarredRepo.objects.filter(private=False).all()\n context[\"gists\"] = Gist.objects.filter(public=True).all()\n context[\"starred_gists\"] = StarredGist.objects.filter(public=True).all()\n return context\n\n\n```\n\n`index.html`\n```html\n{% for repo in repos %}\n