django-oscar

django Cache only gets set on page reload

江枫思渺然 提交于 2019-12-25 07:46:15
问题 I am trying my hands around using memcache with django on per-view cache. The trouble is cache only gets set if i refresh a page,clicking on same link does not sets the cache.(that is if i set cache_view on dispatch and reload page, i see the number of queries fall down to 3-4 queries otherwise on clicking the same link, cache is not set, and i get the same number of queries even after hitting the same url again and again) Here is my views: class ProductCategoryView(TemplateView): """ Browse

Disable order email in Django-oscar [closed]

妖精的绣舞 提交于 2019-12-25 07:05:41
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 3 years ago . I built a simple e-commerce site with django-oscar. After a successful order placement an email is sent to client regardless of settings. I found the code located at oscar/apps/customer/utils.py:Dispatcher.dispatch_order_messages Is it possible to turn this behavior off? 回答1: You should fork the checkout app (as

Newly added fields not showing in Profile Edit form in Django Oscar?

我们两清 提交于 2019-12-24 17:24:22
问题 I want to extend the User model. I followed the steps mentioned in this doc. I made a new app extended_user whose models.py reads as : from django.db import models from oscar.apps.customer.abstract_models import AbstractUser from django.utils.translation import ugettext_lazy as _ class User(AbstractUser): nickname = models.CharField(_("nick_name"), max_length=50, null=True, blank=True) def get_full_name(self): full_name = '%s %s' % (self.last_name.upper(), self.first_name) return full_name

show price and rating in facet search

北慕城南 提交于 2019-12-24 14:42:58
问题 I want to show rating and price range in facet search however the rating is not displayed and price range is displayed but is disabled. What else should i have to do to show them in facet search? This is the source code of django-oscar. Here is the configuration FURNITURE_SEARCH_FACETS = { 'fields': OrderedDict([ ('product_class', {'name': _('Type'), 'field': 'product_class'}), ('rating', {'name': _('Rating'), 'field': 'rating'}), ]), 'queries': OrderedDict([ ('price_range', { 'name': _(

Store Credit / Virtual Currency app for Django Oscar?

雨燕双飞 提交于 2019-12-23 13:32:58
问题 I want to have a store credit model for customers where the virtual currency is stored. This store credit app will store points(added on return or some scheme) that can be used to pay for products. Is django-oscar-accounts the right app for that ? Or is there any other way or I have to code myself ? 回答1: For anyone reading this question has 4 years old at the moment I'm writing this answer, but this question deserves an answer. My opinion Is django-oscar-accounts the right app for that ? Or

How to integrate Stripe payments gateway with Django Oscar?

旧街凉风 提交于 2019-12-22 08:48:13
问题 I am trying to integrate the Stripe payment gateway to Django oscar for an e-commerce site which sells physical goods like groceries online.I use python 3.6.3, Django 2.0, Django-oscar 1.6, stripe 1.82.2. Method 1 : So I followed this link in django-oscar groups: https://groups.google.com/forum/#!searchin/django-oscar/handle_payment$20override%7Csort:date/django-oscar/Cr8sBI0GBu0/PHRdXX2uFQAJ I have signed up for a stripe account and used my publishable key and test key to configure stripe

RuntimeError: Conflicting 'product_product_options' models in application 'catalogue'

我的梦境 提交于 2019-12-21 20:08:12
问题 Version Info: Python 3.4, Django 1.8, Oscar Commerce - VERSION = (1, 2, 1, 'final') I am trying to customize Products in the catalogue app following the documentation. Having forked the catalogue app, I have defined models.py as follows: from django.db import models from oscar.apps.catalogue.abstract_models import AbstractProduct class Product(AbstractProduct): is_active = models.BooleanField(default=False) from oscar.apps.catalogue.models import * I have already included the modified

Bootstrap Dropdown Active open on hover and link on click

旧时模样 提交于 2019-12-13 18:37:39
问题 I have been trying to modify django-oscar's navbar menu. http://latest.oscarcommerce.com/en-gb/ What I can't figure out is that the menu 'browse store' remains open on page load on homepage but opens on click on all other pages. I can't figure out why that would happen. Is there a way to to make it open on hover and to add an <a> tag on click? This is the html template concerning the related part in oscar's documentation - <div class="navbar-collapse primary-collapse collapse"> {% block nav

Extending django-oscarapi API ROOT to custom API class

这一生的挚爱 提交于 2019-12-13 15:45:01
问题 I have a django oscar application and I use django-oscarapi for my custom APIs. Some things are missing from the oscarapi like category and promotions but I have been able to use django-restframework to create the category API but the challenge I am facing now is how to add it to the API-ROOT. This is my code for rendering categories customapi serializer class class CategorySerializer(serializers.ModelSerializer): class Meta: model = Category fields = ('id', 'numchild', 'name', 'description',

Django Oscar change URL pattern

不打扰是莪最后的温柔 提交于 2019-12-13 12:17:52
问题 I have setup a django-oscar project and I'm trying to configure the URLs. My goal is to change /catalogue to /catalog . As per the documentation I've added app.py in myproject/app.py myproject/app.py from django.conf.urls import url, include from oscar import app class MyShop(app.Shop): # Override get_urls method def get_urls(self): urlpatterns = [ url(r'^catalog/', include(self.catalogue_app.urls)), # all the remaining URLs, removed for simplicity # ... ] return urlpatterns application =