Welcome to the Food Pantry open source project!
Chico State, like many other universities, has a food pantry for students who do not have access to enough to eat. The pantry provides food for students for free by storing donated and wholesale purchased bulk foods. We want to create a system to manage the inventory of a food pantry, as well as generate reports about the pantry's activities. We need to design a website that manages the information.
Code of conduct for this project is given in Code of Conduct.
Initial contributors are noted in Contributors
This project is licensed following the MIT licene given in License.
Softwares and technologies used in this project are mentioned in Requirements
We used 2 Abstract factory design patterns. Also we used one singleton design pattern for the inventoy along with Observer design pattern for views. The details of the classes in the UML diagram are as follows.
Item (class): Item class is the client code doesn’t depend on concrete classes of factories such as ConcreteFactoryUPC and ConcereFactoryPLU as long as it works with these objects via the AbstractFactoryItems interface. So that Item class can generate these objects dynamically.
ConcreteFactoryUPC: This concrete class implements AbstarctFactoryItems interface. Objects of this class will hold the data of UPC type products.
ConcereFactoryPLU: This concrete class implements AbstarctFactoryItems interface. Objects of this class will hold the data of PLU type products.
AbstractFactoryItems: This is a Abstract Factory Interface which will be implemeneted by its concrete classes.
Inventory: We used singleton invetory class. We wanted to make a master copy of the inventory which can be used in different classes without creating new objects of the inventory. Definately new objects of the inventory classes can be created, but all the new objects will point to the same instance of inventory.
Similarly we created the AbstractFactoryDonor interface to genrate the providers dynamically using the Donors class client code.
The concrete factory classes AbstractFactoryIndividualDonor and AbstractFactoryOrganizationDonor implements the interface AbstractFactoryDonor.
Provider: This class manages and stores the AbstractFactoryDonor objects. This class will implement the essential functions like CreateDonor() and GetDonorID() which are embedded in the envery item donoted by donor.
You need to be in the directory that contains the manage.py file (the PantryDjango directory). In the console, we can start the web server by running python manage.py runserver:
{% filename %}command-line{% endfilename %}
(myvenv) ~/DjangoPantry$ python manage.py runserver
If you are on a Chromebook, use this command instead:
{% filename %}Cloud 9{% endfilename %}
(myvenv) ~/DjangoPantry$ python manage.py runserver 0.0.0.0:8080
If you are on Windows and this fails with UnicodeDecodeError, use this command instead:
{% filename %}command-line{% endfilename %}
(myvenv) ~/DjangoPantry$ python manage.py runserver 0:8000
Now you need to check that your website is running. Open your browser (Firefox, Chrome, Safari, Internet Explorer or whatever you use) and enter this address:
{% filename %}browser{% endfilename %}
http://127.0.0.1:8000/
We used Django Lint as our static analysis tool that checks projects and applications that use the Django web development framework. It reports on common programming errors and bad code smells, including checking for nullable CharField field types, the use of deprecated Django features (such as auto_now_add) as well as the absence of recommended options in settings.py. It aims to encourage the development of high-quality re-usable Django applications.Django Lint is currently implemented as a wrapper around PyLint. The official documentation and download of django Lint can be found here
Software Design and Maintenance Professor and Instructor Dr.Kevin Buffardi,PHD