Adding products in django-oscar homepage

半世苍凉 提交于 2019-12-05 19:49:54

For this purpose Oscar has an app called promotions. This application is responsible for rendering blocks of content on the homepage, among other things (as I can see you found out from the documentation).

Usually you would use the promotion app to add products and other types of content to a page. This can be done from the Dashboard, using Content blocks, which can be found under the Content menu.

There are a few types of promotions that you can define (single product, automatic, and hand picked product list, and others).

After defining your promotion, you will be able to associate it with a page route, which in your case should be /.

If you choose to change this behaviour, then the documentation should provide a good starting point.

I also wanted to watching catalogue as a default page and I had find solution through nginx rewrite func at the end of /etc/nginx/sites-available/myproject

This file looks like this:

server {
server_name yourdomainorip.com;

access_log off;

location /static/ {
    alias /opt/myenv/static/;
}
location /media/ {
    alias /opt/myenv/media/;
}

location / {
    proxy_pass http://127.0.0.1:8001;
    proxy_set_header X-Forwarded-Host $server_name;
    proxy_set_header X-Real-IP $remote_addr;
    add_header P3P 'CP="ALL DSP COR PSAa PSDa OUR NOR ONL UNI COM NAV"';
}
    rewrite ^(/)$ http://yourdomainorip.com/catalogue/$2 permanent;
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!