n37r06u3 / django-cart Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/django-cart
License: GNU General Public License v3.0
Automatically exported from code.google.com/p/django-cart
License: GNU General Public License v3.0
What steps will reproduce the problem?
cart_manager = CartManager(request)
cart_manager.add(someitem)
item_manager = ItemManager()
item_manager.get(product=someitem)
What is the expected output? What do you see instead?
I would expect to have the item returned, instead I get:
'NoneType' object has no attribute '_meta'
which is traced back to this line of code:
return super(ItemManager, self).get(*args, **kwargs)
I get the same error on my Mac OSX or ArchLinux.
Original issue reported on code.google.com by [email protected]
on 14 Dec 2010 at 9:58
I would like to push some of my changes back, as I've managed to get the basic
functionality
working for updating and clearing the cart. I couldn't find a way to contact
the project owner or
request membership.
Original issue reported on code.google.com by [email protected]
on 14 Apr 2009 at 7:40
cart.py: Cart.update - so what exactly this method do ?
Original issue reported on code.google.com by [email protected]
on 26 Jun 2009 at 7:02
Hy, I have a very problem. When the User enters the site, django-cart create
a table cart in database, but if the User leave the site, the table cart is
still there. If a thousand users entering and leaving the site, the database
will be very polluted, this is a serious problem because as I do to remove
the table cart from the database when the User leave the site?
Original issue reported on code.google.com by [email protected]
on 1 Mar 2010 at 8:09
models.py:
class Item(models.Model):
cart = models.ForeignKey(Cart, verbose_name=_('cart'))
quantity = models.PositiveIntegerField(verbose_name=_('quantity'),
default=1)
....
cart.ry:
class Cart:
...
def add(self, product, unit_price, quantity=None):
try:
item = models.Item.objects.get(
cart=self.cart,
product=product,
)
except models.Item.DoesNotExist:
item = models.Item()
item.cart = self.cart
item.product = product
item.unit_price = unit_price
if quantity: item.quantity = quantity
item.save()
else:
raise ItemAlreadyExists
...
def update(self, product, quantity, unit_price=None):
try:
item = models.Item.objects.get(
cart=self.cart,
product=product,
)
item.quantity = quantity
if unit_price: item.unit_price = unit_price
item.save()
except models.Item.DoesNotExist:
raise ItemDoesNotExist
Original issue reported on code.google.com by ivan%[email protected]
on 12 Jan 2010 at 5:41
GPL'd code in the Django community is really annoying. This code looks
useful from the overview, but I really shouldn't look at GPL'd code because
I work on code that is closed source that may implement similar
functionality. Django is BSD licensed, and more permissive licenses are
much more useful to the community.
Original issue reported on code.google.com by [email protected]
on 14 Jun 2009 at 8:41
the queryset is missing an evaluator
Original issue reported on code.google.com by [email protected]
on 11 May 2009 at 2:35
Attachments:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.