Skip to main content

UNKNOWN

Project description

# MP-Articles

Django articles app.

### Installation

Install with pip:

```sh
$ pip install -e git://github.com/pmaigutyak/mp-articles.git#egg=mp-articles
```

Add articles to urls.py:

```
urlpatterns += i18n_patterns(
url(r'^articles/', include('articles.urls', namespace='articles')),
)
```

Add articles to settings.py:
```
INSTALLED_APPS = [
'articles',
]

# Default: ('news', _('News')),
ARTICLE_TYPE_CHOICES = (
('example', _('Example')),
('example2', _('Example 2')),
)

# Default: None
DEFAULT_ARTICLE_TYPE = 'example'
```

Run migrations:
```
$ python manage.py migrate
```

### Template tags

To get latest articles in template you should load 'articles' tags and add 'get_latest_articles' template tag into your template.
Examples:

```
{% load articles %}

{% get_latest_articles article_type='example' %}

{% get_latest_articles article_type='example' count=3 %}

{% get_latest_articles article_type='example' as latest_articles %}
```

### Requirements

App require this packages:

* django-modeltranslation
* -e git://github.com/pmaigutyak/mp-pagination.git#egg=mp-pagination
* django-ckeditor

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-mp-articles-1.0.0.tar.gz (3.4 kB view details)

Uploaded Source

File details

Details for the file django-mp-articles-1.0.0.tar.gz.

File metadata

File hashes

Hashes for django-mp-articles-1.0.0.tar.gz
Algorithm Hash digest
SHA256 f6aea09bd8b733356376f4d17223003019336ecc7563efeebfaa7f78148766f4
MD5 6d06318b50340eabf6528e91ce922991
BLAKE2b-256 f1836ca692742012fd423832f6628fcccbd4b5cd6cf3817d49daa4308e55f0bc

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page