GithubHelp home page GithubHelp logo

cm_test's Introduction

C M test

Documentation

  • mkdir workspace
  • cd workspace
  • git clone https://github.com/Soumya44/Soumya_Ecommerce
  • python3 -m venv ecomm-env [python 3.7]
  • source ecomm-env/bin/activate
  • pip install -r requirements.txt
  • psycopg2 commented as its not required. (PostgreSQL related connector)
  • pillow issues, resolved by going to https://pillow.readthedocs.io/en/latest/installation.html and installing the dependencies externally: brew install libtiff libjpeg webp little-cms2
  • pip install mysqlclient (As we will be using mysql db engine) [ NOTE: brew install mysql ; brew services start mysql has to be executed before installing this]
  • Added local.py file in settings folder, and added mysql credentials
  • Python manage.py check [Issues w.r.t to syntax in python 3.7 for this project]
  • Install python 3.6.2 and re-activated virtualenv.
  • python mange migrate Faced issues w.r.t max_length: django.db.utils.OperationalError: (1426, "Too-big precision 100 specified for 'shipping_total'. Maximum is 65.") Fix: reduced the max_length to 65 as allowed by mysql [If PostgreSQL was used this error would ve not popped up]
  • python manage.py createsuperuser
  • python manage.py runserver [Ecommerce web app successfully set up in local system]
  • python manage.py startapp mentoring
  • Add mentoring in INSTALLED_APPS of ecommerce/settings/local.py
  • Created Mentor and Student classes in models.py
  • python manage.py makemigrations mentoring
  • python mange migrate
  • Added crud related functions/business logic for Mentor and Student in views.py
  • Defined appropriate urls for the app in urls.py
  • Created two model forms to display in html pages in forms.py
  • Created templates folder inside monitoring folder, inside that created base.html and other appropriate html files for the CRUD operations which extends from base.html
  • In order to access the mentoring platform hit this URL: http://localhost:8000/mentoring/
  • You can either CRUD operations on mentor and students from the above link or http://localhost:8000/admin/mentoring/
  • Search mentors logic: I am passing the student’s skill as query for Mentor objects filter as shown below: student = get_object_or_404(Student, pk=pk) mentors = Mentor.objects.filter(expertise=student.skill_to_learn)

cm_test's People

Contributors

soumya44 avatar abijithmg avatar dependabot[bot] avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.