Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update requirements.txt #171

Open
wants to merge 27 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
92947c7
Adding temporary changes to Github
Fritz-Ortiz Dec 27, 2023
b00e5e5
Added authentication and registration features
Fritz-Ortiz Dec 28, 2023
e9990b9
Update linter.yml
Fritz-Ortiz Dec 28, 2023
535ce33
Update linter.yml
Fritz-Ortiz Dec 28, 2023
aee9fff
added get dealerships and get/post review
Fritz-Ortiz Dec 29, 2023
bcc4b93
Fixed dealership api issue and addel car model and make models
Fritz-Ortiz Dec 31, 2023
a6d58a7
Filled out admin.py
Fritz-Ortiz Dec 31, 2023
d2dac5a
finished models and partial proxy services
Fritz-Ortiz Dec 31, 2023
2881bd2
Added url review fetching
Fritz-Ortiz Dec 31, 2023
4940a4b
Update restapis.py
Fritz-Ortiz Jan 2, 2024
cc04324
Update views.py
Fritz-Ortiz Jan 2, 2024
01de8a9
Update urls.py
Fritz-Ortiz Jan 2, 2024
0dfa5a8
added a way to add reviews
Fritz-Ortiz Jan 2, 2024
011530e
changed nav bar
Fritz-Ortiz Jan 2, 2024
37dad5f
Update dealer_details.html
Fritz-Ortiz Jan 3, 2024
f15d74d
Update views.py
Fritz-Ortiz Jan 3, 2024
a7fab5a
Update add_review.html
Fritz-Ortiz Jan 3, 2024
76f0030
Update models.py
Fritz-Ortiz Jan 3, 2024
971bc72
Update restapis.py
Fritz-Ortiz Jan 3, 2024
db6f5c3
Update index.html
Fritz-Ortiz Jan 3, 2024
881b3e4
finished implementing the add_review feature
Fritz-Ortiz Jan 5, 2024
a747df0
Containeriztion
Fritz-Ortiz Jan 5, 2024
a54d18a
Photos of how the project looks
Fritz-Ortiz Jan 19, 2024
5fa2e80
Update get-dealership.js
Fritz-Ortiz Jan 28, 2024
d373a2a
Update reviews.py
Fritz-Ortiz Jan 28, 2024
9664d85
Update get-dealership.js
Fritz-Ortiz Jan 28, 2024
868ca43
Update reviews.py
Fritz-Ortiz Jan 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 2 additions & 1 deletion .github/workflows/linter.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: 'Lint Code'

on:
workflow_dispatch:
push:
branches: [master, main]
pull_request:
Expand Down Expand Up @@ -62,4 +63,4 @@ jobs: # list of things to do
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with Pylint
run: pylint *.py
working-directory: server
working-directory: server
Binary file added Cloudant.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added NLUService.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added about_us.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added about_view.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added admin_login.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added admin_logout.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added contact_us.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added contact_view.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added create_carmake.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dealership_details.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dealership_review_submission.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dealerships.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dealerships_filter.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added django_server.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
63 changes: 63 additions & 0 deletions functions/get-dealership.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
const express = require('express');
const app = express();
const port = process.env.PORT || 3000;
const Cloudant = require('@cloudant/cloudant');

// Initialize Cloudant connection with IAM authentication
async function dbCloudantConnect() {
try {
const cloudant = Cloudant({
plugins: { iamauth: { iamApiKey: '' } }, // Replace with your IAM API key
url: '', // Replace with your Cloudant URL
});

const db = cloudant.use('dealerships');
console.info('Connect success! Connected to DB');
return db;
} catch (err) {
console.error('Connect failure: ' + err.message + ' for Cloudant DB');
throw err;
}
}

let db;

(async () => {
db = await dbCloudantConnect();
})();

app.use(express.json());

// Define a route to get all dealerships with optional state and ID filters
app.get('/dealerships/get', (req, res) => {
const { state, id } = req.query;

// Create a selector object based on query parameters
const selector = {};
if (state) {
selector.state = state;
}

if (id) {
selector.id = parseInt(id); // Filter by "id" with a value of 1
}

const queryOptions = {
selector,
limit: 10, // Limit the number of documents returned to 10
};

db.find(queryOptions, (err, body) => {
if (err) {
console.error('Error fetching dealerships:', err);
res.status(500).json({ error: 'An error occurred while fetching dealerships.' });
} else {
const dealerships = body.docs;
res.json(dealerships);
}
});
});

app.listen(port, () => {
console.log(`Server is running on port ${port}`);
});
1 change: 1 addition & 0 deletions functions/node_modules/.bin/follow

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions functions/node_modules/.bin/mime

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions functions/node_modules/.bin/sshpk-conv

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions functions/node_modules/.bin/sshpk-sign

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions functions/node_modules/.bin/sshpk-verify

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions functions/node_modules/.bin/uuid

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading