Dasha Y186-custom-roy

app = Flask(__name__) app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///ecommerce.db' db = SQLAlchemy(app)

from flask import Flask, jsonify, request from flask_sqlalchemy import SQLAlchemy Dasha Y186-custom-roy

@app.route('/save-product', methods=['POST']) def save_product(): data = request.json new_saved_product = SavedProduct(user_id=data['user_id'], product_id=data['product_id']) db.session.add(new_saved_product) db.session.commit() return jsonify({'message': 'Product saved'}), 200 app = Flask(__name__) app

class SavedProduct(db.Model): id = db.Column(db.Integer, primary_key=True) user_id = db.Column(db.Integer, db.ForeignKey('user.id')) product_id = db.Column(db.Integer, db.ForeignKey('product.id')) primary_key=True) user_id = db.Column(db.Integer

Dasha Y186-custom-roy

License Details

REGULAR LICENSE

Single Site

A regular license allows an item to be used in one project for either personal or commercial use by you or on behalf of a client. The item cannot be offered for resell either on its own or as a part of a project. Distribution of source files is not permitted.

EXTENDED LICENSE

Unlimited Sites

An extended license allows an item to be used in unlimited projects for either personal or commercial use. The item cannot be offered for resell either on its own or as a part of a project. Distribution of source files is not permitted.

SUPPORT & UPDATES

Each license is a one-time payment. There are no annual fees. You get lifetime access to product updates. Support is provided for 6 months from the date of purchase.

Dasha Y186-custom-roy

Server Requirements

SERVER SETTINGS:

  • PHP 7.2 or later
  • upload_max_filesize (256M)
  • max_input_time (300)
  • memory_limit (256M)
  • max_execution_time (300)
  • post_max_size (512M)

PHP.INI SETTINGS:

  • php-xml or/and php-dom
  • XMLReader
  • PHP CURL module

PHP MODULES:

  • allow_url_fopen

Would you like to...

Dasha Y186-custom-roy

Consult Ania and fellow students?

Join the conversation inside our private FB group.

Would you like to...

Dasha Y186-custom-roy

Get support privately?

Submit a support ticket via your account page.

Dasha Y186-custom-roy

Ask Ania?

Submit a question for the next live Q&A session.
Dasha Y186-custom-roy

Consult fellow students?

Join the conversation inside our private FB group.