Spree - Can't find _form.html.erb - spree

I am going over the spree tutorial and trying to override the product edit admin page in spree using Deface. I cannot locate the following file path in spree:
spree/admin/products/_form.html.erb

From your Spree directory type:
ls `bundle show spree_backend`/app/views/spree/admin/products/_form.html.erb
That's where the file is located on your system.
Here is the source of the file from the latest Spree:
https://github.com/spree/spree/blob/v2.2.1/backend/app/views/spree/admin/products/_form.html.erb

Related

Pyinstaller is unable to import custom commands of Django 2.1.5

I am using PyInstaller for creating build for my project on ubuntu machine.
I have written one custom commands createsappsuperuser in django to create sime special users. To create the executable file, I am running my manage.spec file and the executable is getting created successfully. The location of that executable is in dist folder.
After that I am running ./dist/manage createsappsuperuser which gives error like -
Unknown command: 'createsappsuperuser'. Did you mean createsuperuser?
Type 'manage help' for usage.
To solve the above issue, I tried adding my cusom command in the dict
in Pyinstaller/loader/rthooks/pyi_rth_django.py file as because pyi_rth_django.py always return some static set of commands.
I have added it like 'createsappsuperuser': 'idmgmt' in the dictionary. Here, idmgmt is my app name.
But the above solutions was valid for upto Django 1.8, and even the file "pyi_rth_django.py" says that it is tested with Django 1.8.
Then how should i do it in Django 2.1.5 ?
Thanks In Advance

Cloudfoundry : Activate some PHP extentions in a custom buildpack

I want to enlable some PHP extentions in my custom PHP-Buildpack. But I don't know which one to edit... I tried to change the options.json in the "defaults" folder, but I get an error when I push the app via the cf command. And there is easily 20 other files named like that.
Can somebody help me to find the good one ? Thank you :)
The file has to be on the app folder, not in the buildpack folder. It has to be in a folder named ".bp-config" on the root of your app's directory.

error adding a slideshow module to satchmo

i have found a django slideshow and have installed it following the guide bellow
https://github.com/clarle/django-slides
Download and place the 'slideshow' folder somewhere on your PYTHONPATH.
(i placed it in site packages)
Add slideshow to your INSTALLED_APPS under settings.py.
(I added it to satchmo store settings.py and also main satchmo settings.py to be sure)
To use a slideshow in another Django application, you can refer to the slideshow object as slideshow.Slideshow in your Django models.
(this i was not sure how to do or if i needed to)
If you're not extending base.html, make sure you have jQuery 1.4.2+ and Slides 1.1.7+ in your templates somewhere. Use {% load slideshow_tags %} in whatever template you wish to use a slideshow in.
the module shows up in the satchmo admin page but when i try to add or change a slideshow i get an error
DatabaseError at /admin/slideshow/slideshow/add/no such table: slideshow_slide
Request Method: GET
Request URL: http://127.0.0.1:8000/admin/slideshow/slideshow/add/
Django Version: 1.4.20
Exception Type: DatabaseError
Exception Value:
no such table: slideshow_slide
Exception Location: C:\Python27\lib\site-packages\django\db\backends\sqlite3\base.py in execute, line 344
Python Executable: C:\Python27\python.exe
Python Version: 2.7.9
Python Path:
['C:\Users\Administrator\MyStores\store',
'C:\Python27\lib\site-packages\satchmo-0.9.3-py2.7.egg',
'C:\Windows\SYSTEM32\python27.zip',
'C:\Python27\DLLs',
'C:\Python27\lib',
'C:\Python27\lib\plat-win',
'C:\Python27\lib\lib-tk',
'C:\Python27',
'C:\Python27\lib\site-packages',
'C:\Python27\lib\site-packages\win32',
'C:\Python27\lib\site-packages\win32\lib',
'C:\Python27\lib\site-packages\Pythonwin',
'..\..\apps',
'']
i think its telling me that there is no database setup for the slideshow but am not sure if that is the case or if it is something else altogether as i am a python beginner, i would be gratefull for any help with this.
thanks
kev
I managed to install the slideshow module from https://github.com/clarle/django-slides in satchmo
the solution in the end was really easy, all i had to do was to place the slideshow folder in my PYTHONPATH (i put it in the site packages directory)
i added 'slideshow',
to the INSTALLED_APPS section of my settings.py file in my custom satchmo store directory/folder.
and finally i opened a terminal/cmd prompt and executed the following command
python manage.py syncdb
and hey presto the modules were added, the database updated with the new tables and once i had run the server and logged into the admin page i am now able to setup my slideshow
i hope this helps anyone else who needs the slideshow in satchmo as the clue to updating the database came from another install guide for a different slideshow which i thought i would chance it and have a go.

django deployment on heliohost

I'm trying to deploy a small django app on heliohost following the instructions in this post How to deploy a Django site using a different version of Django on Heliohost and also the official ones. But when I try to browse the site I only get the index of my public_html folder. Does anyone have any idea what I am doing wrong?
I know this is old post but if you still trying django on heliohost, try cookiecutter template for heliohost.
$ pip install cookiecutter
$ cookiecutter https://github.com/rahul-gj/cookiecutter-helio.git
project_name [mysite]: ---> Type your project name here.
helio_user [user_name]: ---> your heliohost username.
The folder with project name will be created in your working directory.
Paste the content of the folder (folder + manage.py file) on heliohost public_html directory.
go to yourusername.heliohost.org/yourproject
You should see something like this:
https://krydos.heliohost.org/djangotest/
Explore the django on heliohost.

Spree Extension Scaffold

I have created a a spree application and used one existing extension spree_news by cloning it to my spree application folder, now when i try to create a scaffold or a resource inside the spree_news extension by trying:
wapnil#swapnil-pc:~/ecommerce/spree_news$ rails generate scaffold oerp
Pname:string Pdesc:text Pprice:float
the following error is encountered:
/home/swapnil/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require': cannot load such file -- rails/engine/commands (LoadError)
from /home/swapnil/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
from script/rails:8:in `<main>'
Please Help!!
The script/rails file in your extension is wrong and should be this. This is due to a bug in Spree that will be fixed in the next release.