forked from djangopackages-zz/djangopackages
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into git-regex
* master: (40 commits) merging in some i18thn fun test update Adding improved stufdf tiny bits of change to accomodate Steve Holden's thing troubleshooting tweak nixing the sanitize reread edits of contrib docs about branching Docs cleanup Added the PyCon video to the FAQ Doc tweak MOAR wrestling with RTD [djangopackages-zz#79] I18n main templates Trying out the virtualenv action on RTD nixing reference.rst generation for now since it borks RTD. Will talk to Eric Holscher about this and get his help Factored out style_repo_description to use truncatewords filter instead of custom string parsing code. Commented out usage of grid_detail2.html and made note. Uncomment if you are working with grids and need to test with the @sontek new grids. [djangopackages-zz#79] I18n package templates Drop the version to 0.9.0 Tweaking docs generation to make it so it SHOULD run on read-the-docs Ignoring the rendered static and html directories in git to help everyone out ...
- Loading branch information
Showing
63 changed files
with
948 additions
and
299 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,6 @@ dev.db* | |
*.log | ||
local_settings.py | ||
lp-cache | ||
coverage | ||
docs/_build | ||
docs/_static |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
"""Module containing the django applications | ||
that together make up the packaginator site.""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
"""Restful api for the packaginator, based on `django-tastypie`_. | ||
.. _django-tastypie: http://pypi.python.org/pypi/django-tastypie/ | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
"""This application defines RSS and Atom feeds | ||
that are made available to the users of the | ||
packaginator""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,32 @@ | ||
"""Contains classes for the feeds""" | ||
|
||
from django.contrib.syndication.views import Feed | ||
from django.utils.feedgenerator import Atom1Feed | ||
from package.models import Package | ||
|
||
class RssLatestPackagesFeed(Feed): | ||
"""RSS Feed for the packages""" | ||
title = "Latest Django packages added" | ||
link = "/packages/latest/" | ||
description = "The last 15 packages added" | ||
|
||
def items(self): | ||
"""Returns 15 most recently created repositories""" | ||
return Package.objects.all().order_by("-created")[:15] | ||
|
||
def item_title(self, item): | ||
"""Get title of the repository""" | ||
return item.title | ||
|
||
def item_description(self, item): | ||
"""Get description of the repository""" | ||
return item.repo_description | ||
|
||
def item_pubdate(self, item): | ||
"""Get publication date""" | ||
return item.created | ||
|
||
class AtomLatestPackagesFeed(RssLatestPackagesFeed): | ||
"""Atom feed for the packages""" | ||
feed_type = Atom1Feed | ||
subtitle = RssLatestPackagesFeed.description | ||
subtitle = RssLatestPackagesFeed.description |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
"""url patterns for the feeds""" | ||
|
||
from django.conf.urls.defaults import * | ||
|
||
from feeds import * | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
"""Grid application - displays and | ||
manipulates the package grid""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,46 @@ | ||
"""Forms for the :mod:`grid` app | ||
""" | ||
|
||
from django.forms import ModelForm | ||
|
||
from grid.models import Element, Feature, Grid, GridPackage | ||
|
||
class GridForm(ModelForm): | ||
"""collects data for the new grid - a | ||
django ``ModelForm`` for :class:`grid.models.Grid` | ||
""" | ||
|
||
def clean_slug(self): | ||
"""returns lower-cased slug""" | ||
return self.cleaned_data['slug'].lower() | ||
|
||
class Meta: | ||
model = Grid | ||
fields = ['title', 'slug', 'description'] | ||
|
||
class ElementForm(ModelForm): | ||
"""collects data for a new grid element - | ||
a ``ModelForm`` for :class:`grid.models.Element` | ||
""" | ||
|
||
class Meta: | ||
model = Element | ||
fields = ['text',] | ||
|
||
class FeatureForm(ModelForm): | ||
"""collects data for the feature - | ||
a ``ModelForm`` for :class:`grid.models.Feature` | ||
""" | ||
|
||
class Meta: | ||
model = Feature | ||
fields = ['title', 'description',] | ||
|
||
class GridPackageForm(ModelForm): | ||
"""collects data for a new package - | ||
a ``ModelForm`` for :class:`grid.models.GridPackage` | ||
""" | ||
|
||
class Meta: | ||
model = GridPackage | ||
fields = ['package'] | ||
fields = ['package'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.