metaclassco / django_oscar_flash_sale Goto Github PK
View Code? Open in Web Editor NEWFlash sales implementation for the Oscar.
Flash sales implementation for the Oscar.
Hello,
Flash sale per product works wunderful. Now i also have variants in products and now i want also a flash sale for a variant. Can you change your code so i can make a flash sale offer for a variant?
Regards
Hi. I'm trying out your project and when I ran the following command:
make load_test_data
I keep getting this error: django.db.utils.OperationalError: Problem installing fixture '/Users/mjrbasoc/Downloads/django_oscar_flash_sale-master/apps/fixtures/offers.json': Could not load offer.ConditionalOffer(pk=1): no such column: exclusive
Below is the stack trace:
`(test-oscar) testusers-MBP:django_oscar_flash_sale-master test-user$ make load_test_data
# Import some fixtures. Order is important as JSON fixtures include primary keys
./manage.py loaddata apps/fixtures/auth.json
Installed 2 object(s) from 1 fixture(s)
./manage.py loaddata apps/fixtures/child_products.json
Installed 35 object(s) from 1 fixture(s)
./manage.py oscar_import_catalogue apps/fixtures/*.csv
Row number 1 has an invalid number of fields (1), skipping...
Row number 2 has an invalid number of fields (1), skipping...
Row number 3 has an invalid number of fields (1), skipping...
Row number 4 has an invalid number of fields (1), skipping...
Row number 5 has an invalid number of fields (1), skipping...
Row number 6 has an invalid number of fields (1), skipping...
./manage.py oscar_import_catalogue_images apps/fixtures/images.tar.gz
No item matching upc='9780201379266'
No item matching upc='9780471453802'
No item matching upc='9780321445612'
No item matching upc='9780262032933'
./manage.py oscar_populate_countries --initial-only
Successfully added 249 countries.
./manage.py loaddata apps/fixtures/pages.json apps/fixtures/ranges.json apps/fixtures/offers.json
Traceback (most recent call last):
File "/Users/test-user/.virtualenvs/test-oscar/lib/python3.7/site-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "/Users/test-user/.virtualenvs/test-oscar/lib/python3.7/site-packages/django/db/backends/sqlite3/base.py", line 383, in execute
return Database.Cursor.execute(self, query, params)
sqlite3.OperationalError: no such column: exclusive
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "./manage.py", line 21, in <module>
main()
File "./manage.py", line 17, in main
execute_from_command_line(sys.argv)
File "/Users/test-user/.virtualenvs/test-oscar/lib/python3.7/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
utility.execute()
File "/Users/test-user/.virtualenvs/test-oscar/lib/python3.7/site-packages/django/core/management/__init__.py", line 375, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/Users/test-user/.virtualenvs/test-oscar/lib/python3.7/site-packages/django/core/management/base.py", line 323, in run_from_argv
self.execute(*args, **cmd_options)
File "/Users/test-user/.virtualenvs/test-oscar/lib/python3.7/site-packages/django/core/management/base.py", line 364, in execute
output = self.handle(*args, **options)
File "/Users/test-user/.virtualenvs/test-oscar/lib/python3.7/site-packages/django/core/management/commands/loaddata.py", line 72, in handle
self.loaddata(fixture_labels)
File "/Users/test-user/.virtualenvs/test-oscar/lib/python3.7/site-packages/django/core/management/commands/loaddata.py", line 114, in loaddata
self.load_label(fixture_label)
File "/Users/test-user/.virtualenvs/test-oscar/lib/python3.7/site-packages/django/core/management/commands/loaddata.py", line 181, in load_label
obj.save(using=self.using)
File "/Users/test-user/.virtualenvs/test-oscar/lib/python3.7/site-packages/django/core/serializers/base.py", line 223, in save
models.Model.save_base(self.object, using=using, raw=True, **kwargs)
File "/Users/test-user/.virtualenvs/test-oscar/lib/python3.7/site-packages/django/db/models/base.py", line 779, in save_base
force_update, using, update_fields,
File "/Users/test-user/.virtualenvs/test-oscar/lib/python3.7/site-packages/django/db/models/base.py", line 851, in _save_table
forced_update)
File "/Users/test-user/.virtualenvs/test-oscar/lib/python3.7/site-packages/django/db/models/base.py", line 900, in _do_update
return filtered._update(values) > 0
File "/Users/test-user/.virtualenvs/test-oscar/lib/python3.7/site-packages/django/db/models/query.py", line 760, in _update
return query.get_compiler(self.db).execute_sql(CURSOR)
File "/Users/test-user/.virtualenvs/test-oscar/lib/python3.7/site-packages/django/db/models/sql/compiler.py", line 1462, in execute_sql
cursor = super().execute_sql(result_type)
File "/Users/test-user/.virtualenvs/test-oscar/lib/python3.7/site-packages/django/db/models/sql/compiler.py", line 1133, in execute_sql
cursor.execute(sql, params)
File "/Users/test-user/.virtualenvs/test-oscar/lib/python3.7/site-packages/django/db/backends/utils.py", line 99, in execute
return super().execute(sql, params)
File "/Users/test-user/.virtualenvs/test-oscar/lib/python3.7/site-packages/django/db/backends/utils.py", line 67, in execute
return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
File "/Users/test-user/.virtualenvs/test-oscar/lib/python3.7/site-packages/django/db/backends/utils.py", line 76, in _execute_with_wrappers
return executor(sql, params, many, context)
File "/Users/test-user/.virtualenvs/test-oscar/lib/python3.7/site-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "/Users/test-user/.virtualenvs/test-oscar/lib/python3.7/site-packages/django/db/utils.py", line 89, in __exit__
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/Users/test-user/.virtualenvs/test-oscar/lib/python3.7/site-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "/Users/test-user/.virtualenvs/test-oscar/lib/python3.7/site-packages/django/db/backends/sqlite3/base.py", line 383, in execute
return Database.Cursor.execute(self, query, params)
django.db.utils.OperationalError: Problem installing fixture '/Users/test-user/Downloads/django_oscar_flash_sale-master/apps/fixtures/offers.json': Could not load offer.ConditionalOffer(pk=1): no such column: exclusive
make: *** [load_test_data] Error 1`
It would be nice if this had a PyPI release, or at least a setup.py/pyproject.toml in the repo so that it is installable with pip using git+..
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.