# MP-Articles
Django articles app.
### Installation
Install with pip:
```sh
$ pip install django-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
* django-pure-pagination
* django-ckeditor
Django articles app.
### Installation
Install with pip:
```sh
$ pip install django-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
* django-pure-pagination
* django-ckeditor
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file django-mp-articles-3.0.tar.gz.
File metadata
- Download URL: django-mp-articles-3.0.tar.gz
- Upload date:
- Size: 6.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
68515a78f2c5c1722e5dde5cae163d2415f26d6b07a7a048314e10f0ef531313
|
|
| MD5 |
5167e84b7673fff703ea8cf1c5eb96d6
|
|
| BLAKE2b-256 |
25bea09f647a68732e7f09066c7159726b454f5b513eb22cb384406a73142f9b
|