This project is currently under development and not ready for production use. Please Star/Watch it for future updates.
Version: 0.0.1
Lindshop is a Django application that handles all the basic features of an ecommerce websites such as Products, Carts, Orders, Payments and so on. Lindshop is made to be easy to extend and customize to the type of ecommerce website that you're looking to build, no matter if it's a normal store with a few categories and products, or if it's an online subscription service with a single product.
- Author: Marcus Lind ([email protected])
- Github: https://github.com/marcuslind90/lindshop
- Read-The-Docs: http://lindshop.readthedocs.org/en/latest/
- Install the application using
pip
in the following way:
pip install lindshop
This is currently on the to-do list and will supported when the project go into Beta. Currently you have to manually download the source from Github and add it to your project.
To add Lindshop to your project just navigate to it and run git clone https://github.com/marcuslind90/lindshop
.
- Add all the mandatory applications to your
INSTALLED_APPS
directory in thesettings.py
file of your Django project.
INSTALLED_APPS = (
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'lindshop', # REQUIRED
'lindshop.core.attribute', # REQUIRED
'lindshop.core.cart', # REQUIRED
'lindshop.core.category', # REQUIRED
'lindshop.core.checkout', # REQUIRED
'lindshop.core.customer', # REQUIRED
'lindshop.core.dashboard', # REQUIRED
'lindshop.core.order', # REQUIRED
'lindshop.core.payment', # REQUIRED
'lindshop.core.pricing', # REQUIRED
'lindshop.core.product', # REQUIRED
'lindshop.core.shipping', # REQUIRED
'lindshop.core.stock', # REQUIRED
'lindshop.core.subscription', # REQUIRED
'lindshop.core.menu', # REQUIRED
'lindshop.core.breadcrumbs', # REQUIRED
'lindshop.core.slideshow', # REQUIRED
'sorl.thumbnail', # REQUIRED
'rest_framework', # REQUIRED
)
- To be able to handle overrides of Templates in Lindshop you need to import the
LINDSHOP_TEMPLATE_DIR
and add it to yourDIRS[]
in theTEMPLATES
directory of yoursettings.py
file. You also need to add theshop_processor
to yourcontext_processors
setting. Theshop_processor
makes sure that all your Lindshop Settings are always included in every context of your shop.
from lindshop import LINDSHOP_TEMPLATE_DIR
location = lambda x: os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', x)
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [
os.path.join(BASE_DIR, 'templates'), # Required
LINDSHOP_TEMPLATE_DIR # Required
],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
'lindshop.utils.context_processors.shop_processor', # Required
],
},
},
]
-
You also need to add
LINDSHOP = {}
andLINDSHOP_PAYMENTS = {}
to yoursettings.py
file that will handle any configuration of your store. -
Add URL routing to your projects main
urls.py
file. Remember that you need to import the Djangoinclude
function.
from django.conf.urls import include
urlpatterns = [
url(r'^admin/', include(admin.site.urls)),
url(r'^', include('lindshop.urls', namespace="shop")), # Required
]
-
Run
python manage.py migrate
to generate the MySQL Database and all required tables. -
You should now be able to run
python manage.py runserver
and visit your store and see an empty store front.
You can access Lindshop's custom dashboard by navigating to /dashboard/
when you're running your website. Any Django admin user can login to this dashboard.
There's a build in management command for importing demo data to your database if you want to demo and try out Lindshop.
python manage.py import_defaults
The command will import the following to your database:
- Categories
- Countries
- Currencies
- Tax rules
- Products
- Product Images
- Subscription Plans
- Prices
- Carriers
- Carrier Pricings
- Attributes (Color, Size etc) of products
- Attribute Choices (Red, Blue, Small, Large) of attributes