Django Classified
Features
- Item groups, categories and areas (for ex. Cities ot Locations)
- Image
- upload multiple images per item
- generating preview (via sorl-thumbnail)
- display using Lightbox JS library
- Search ability
- SEO optimization
- SEO-friendly urls
- generating META description and meta keywords
- sitemap.xml
- robots.txt
- RSS feed
- Google Analytics integration
- Open Graph protocol support
- Caching
- Translation
- English
- Russian
- French (thanks to Teolemon)
- Turkish (thanks to Mirat Can Bayrak)
- Spanish (thanks to 4bimcad)
- Help translate to other languages at Transifex
Requirements
- Python >=3.8
- Django >=3.2
Design
Demo project
Demo project with user registration (via Email/Facebook) available here.
Installation
- Install app
pip install django-classified
- Add
django_classified
to theINSTALLED_APPS
:
INSTALLED_APPS = [
# Default Django applications
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.messages',
'django.contrib.sessions',
'django.contrib.staticfiles',
# Required by Django Classified
'django.contrib.sites',
'django.contrib.humanize',
'django.contrib.sitemaps',
# External applications required by Django Classified
'bootstrapform',
'sorl.thumbnail',
# Django Classified
'django_classified',
]
- Add
SITE_ID
tosettings.py
file:
python
SITE_ID = 1
- Import
include
in addition topath
and addurl(r'', include('django_classified.urls', namespace='django_classified')),
to the projecturls.py
file:
from django.urls import path, include
urlpatterns = patterns(
path(r'', include('django_classified.urls', namespace='django_classified')),
)
- Add
'django_classified.context_processors.common_values'
to the settingsTEMPLATES
context_processors
list:
TEMPLATES[0]['OPTIONS']['context_processors'].append('django_classified.context_processors.common_values')
Customization:
You can provide additional customization in settings.py
DCF_SITE_NAME
- Site titleDCF_SITE_DESCRIPTION
- Site descriptionDCF_ITEM_PER_USER_LIMIT
- Max Items allowed per userDCF_SITEMAP_LIMIT
- Sitemap items limitDCF_RSS_LIMIT
- RSS feed items limitDCF_RELATED_LIMIT
- Number of related items displayedDCF_ITEM_PER_PAGE
- Number of items per pageDCF_LOGIN_TO_CONTACT
- Hide contact information for unauthorized requestsDCF_DISPLAY_EMPTY_GROUPS
- Display groups without items in the groups list