django-oscar

Django-Oscar Basket customization

六月ゝ 毕业季﹏ 提交于 2019-12-06 06:22:15
问题 I am using Djnago-oscar for Solar energy equipment based eCommerce site. I need to add an option to "Basket" model with "Battery Name", "Notes" and "Manufacturer". There is a reason I don't want to add it in subclass AbstractProduct. Rather I want to built it with subclass Basket model. Now I need help to understand my workflow to make this work with AddToBasket form. In Django-oscar/basket there are formsets.py using formset factory and a form. I am a bit confused and decided to get help

Integrating a redirection-included method of payment in django-oscar

别说谁变了你拦得住时间么 提交于 2019-12-06 05:51:31
问题 I am developing a shopping website using django-oscar framework, in fact I am using their sandbox site. I want to add payment to the checkout process, but the thing is, I am totally confused! I've read this link : "Oscar's payment integration docs" and I got the big picture stuff. I also read the file views.py in the checkout app, But I have a few questions which I couldn't find on the web. My question is what are the methods/classes I should override or create to handle the following process

Adding products in django-oscar homepage

半世苍凉 提交于 2019-12-05 19:49:54
I'm trying to figure out the best way to display products inside my homepage. I'm building my website using the sandbox that already comes with django-oscar (I cloned the project from Github). I discovered that the default homepage is controlled by 'promotions' app. However, my products are just being displayed inside ' http://localhost:8000/catalogue ' (controlled by 'catalogue' app). Is there a way to display the products in my homepage? Or will I have to change the default app that controls the homepage? (in this case, how can I do that?) EDIT 1: I believe that I found a solution. You can

How to integrate Stripe payments gateway with Django Oscar?

ε祈祈猫儿з 提交于 2019-12-05 19:25:52
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.The problem is, when I try to pay using the button provided with label "Pay with Card",it collects my

Filtering Objects in a View in Django - Oscar?

≡放荡痞女 提交于 2019-12-04 19:46:34
Trying to implement a simple ordering query on ProductCategoryView in Django-Oscar. It should be fairly simple to implement but it's taking too much time to understand. I'm having second thoughts to go forward with Oscar or not as it seems difficult to extend. The ProductCategoryView returns products of a certain category. I want to sort them according to certain field in product model say price . First I change the parent generic class from TemplateView to ListView so that I can use get_queryset method. Then I override the get_queryset method as below and write a simple queryset in that.

PyCharm - Unresolved library 'staticfiles'

谁说我不能喝 提交于 2019-12-04 17:47:10
问题 I'm working on a Django project with PyCharm. Unfortunately PyCharm does not resolve the template tags I would like to use in my templates. {% load staticfiles %} The project is running within an Ubuntu VM via vagrant. The run configuration knows about the virtualenv I am using in the VM (remote interpreter setup). My settings look like this: INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.humanize', 'django.contrib.sessions',

Django Oscar change URL pattern

冷暖自知 提交于 2019-12-04 15:19:08
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 = MyShop() myproject/urls.py from django.conf.urls import url, include from django.contrib import admin from

Django-Oscar Basket customization

北城余情 提交于 2019-12-04 12:58:30
I am using Djnago-oscar for Solar energy equipment based eCommerce site. I need to add an option to "Basket" model with "Battery Name", "Notes" and "Manufacturer". There is a reason I don't want to add it in subclass AbstractProduct. Rather I want to built it with subclass Basket model. Now I need help to understand my workflow to make this work with AddToBasket form. In Django-oscar/basket there are formsets.py using formset factory and a form. I am a bit confused and decided to get help from community. Following is the code: models.py MANUFACTURERS = ( ('UPS SYSTEMS', 'UPS SYSTEMS'), ('VOLTA

How to register a new Model in Django-Oscar Dashboard?

这一生的挚爱 提交于 2019-12-04 06:03:15
问题 I forked catalogue app and added a new model in the new app's models.py class BundleProductClass(Product): products = models.ManyToManyField(Product, related_name="bundle_products") class Meta: verbose_name = 'Bundle Product' In admin.py registered the new model admin.site.register(BundleProductClass) I can see the new model in /admin url but in /dashboard it is not registered. What do I have to do to register it in dashboard view? 回答1: The Oscar dashboard is not linked to the Django admin.

PyCharm - Unresolved library 'staticfiles'

北慕城南 提交于 2019-12-03 10:45:33
I'm working on a Django project with PyCharm. Unfortunately PyCharm does not resolve the template tags I would like to use in my templates. {% load staticfiles %} The project is running within an Ubuntu VM via vagrant. The run configuration knows about the virtualenv I am using in the VM (remote interpreter setup). My settings look like this: INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.humanize', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.sites', 'django.contrib