Browse Source

updated README.md 5 and checked that everything runs fine

dmr1725 3 years ago
parent
commit
a9e45b0f38

+ 6
- 5
README.md View File

@@ -38,7 +38,7 @@ The goal is to help students organize themselves, practice their enrollments and
38 38
 # Below are the steps to run the application
39 39
 
40 40
 ### Step 1: Download repository
41
-- Download the repository from this url: https://git.ccom.uprrp.edu/CCOM4030/companion_app/src/branch/master 
41
+- Download the repository from this url: **https://git.ccom.uprrp.edu/CCOM4030/companion_app/src/branch/master**
42 42
 
43 43
 
44 44
 ### Step 2: Go to the server directory and run in your terminal
@@ -52,7 +52,7 @@ The goal is to help students organize themselves, practice their enrollments and
52 52
 
53 53
 ### Step 4: change directories in files
54 54
 - Go to **organizar/organizar.py** and change the paths in lines 4, 5 and 6 to your path
55
-Go to **server/CompanionApp/views.py** and change paths in lines 3, 54 and 101 to your path. **NOTE: in line 54 you need to change 2 paths**
55
+- Go to **server/CompanionApp/views.py** and change paths in lines 3, 54 and 101 to your path. **NOTE: in line 54 you need to change 2 paths**
56 56
 
57 57
 
58 58
 ### Step 5: make migrations of django project
@@ -98,7 +98,7 @@ Go to **server/CompanionApp/views.py** and change paths in lines 3, 54 and 101 t
98 98
 ### Step 10: create a social application 
99 99
 - Go to **server** directory in the terminal and type ‘**python manage.py runserver**’
100 100
 - Then, go this url ‘**http://127.0.0.1:8000/admin**’ and login as admin.
101
-- Once logged in, go to the bottom of the page and click on ‘Social applications’ and then click on ‘ADD SOCIAL APPLICATION’
101
+- Once logged in, go to the bottom of the page and click on ‘**Social applications**’ and then click on ‘**ADD SOCIAL APPLICATION**
102 102
     - Provider: **Google**
103 103
     - Name: **Google Login**
104 104
     - Client id: **116415331974-tf6sehooctplmmn7j0gt831mdf1oqipl.apps.googleusercontent.com**
@@ -114,7 +114,7 @@ Go to **server/CompanionApp/views.py** and change paths in lines 3, 54 and 101 t
114 114
         - This will return a list of your sites [‘example.com’, ‘localhost:8000’]
115 115
         - Step 3 will be the tricky part
116 116
     - Run in your terminal: **Site.objects.get(id=1)**
117
-        - If you get an error you will need to run the same command above, but adding one to id. You will continue to do this until you get a return value of localhost:8000. Example: **Site.objects.get(id=2)**, **Site.objects.get(id=3)**, **Site.objects.get(id=4)**... My guess is that your value will be where id is between 4 and 7
117
+        - If you get an error you will need to run the same command above, but adding one to id. You will continue to do this until you get a return value of **localhost:8000**. Example: **Site.objects.get(id=2)**, **Site.objects.get(id=3)**, **Site.objects.get(id=4)**... My guess is that your value will be where id is between 4 and 7
118 118
     - **Enter: ‘quit()’ in the shell**
119 119
 - Once you get your site id, go to **server/restful/settings.py**
120 120
 - In settings.py go to line 76 and change the value from **SITE_ID** to your value and save the file
@@ -152,7 +152,8 @@ Go to **server/CompanionApp/views.py** and change paths in lines 3, 54 and 101 t
152 152
 ### Step 14: run the app
153 153
 - Open a terminal and go to the **client** directory and in your terminal and type ‘**npm start**’. After running successfully go to this url **http://localhost:19002**
154 154
 - Open another terminal and go to the server directory and type ‘**python manage.py runserver**’
155
-- Use your phone to scan the qr code from expo and use CompanionApp
155
+- Use your phone to scan the qr code from expo and use CompanionApp. 
156
+- **It is mandatory that your phone uses the same wifi that your local computer is using** 
156 157
 
157 158
 
158 159
 # ADDITIONAL NOTES:

+ 2
- 2
client/Screens/AddTakenCourse.js View File

@@ -52,7 +52,7 @@ const AddTakenCourse = () => {
52 52
 
53 53
       let response = await axios({
54 54
         method: 'POST',
55
-        url: 'http://7f9219a069f7.ngrok.io/api/add_taken_course',
55
+        url: 'http://481cb6e289f9.ngrok.io/api/add_taken_course',
56 56
         headers: {
57 57
           'content-type': 'application/json',
58 58
           Authorization: `Token ${token}`
@@ -92,7 +92,7 @@ const AddTakenCourse = () => {
92 92
       const token = await SecureStore.getItemAsync('token')
93 93
       const response = await axios({
94 94
           method: 'GET',
95
-          url: `http://7f9219a069f7.ngrok.io/api/find_course?code=${text}`,
95
+          url: `http://481cb6e289f9.ngrok.io/api/find_course?code=${text}`,
96 96
           headers: {
97 97
             'content-type': 'application/json',
98 98
             Authorization: `Token ${token}`

+ 1
- 1
client/Screens/Agenda.js View File

@@ -30,7 +30,7 @@ export default function App() {
30 30
 
31 31
     let response = await axios({
32 32
       method: 'POST',
33
-      url: 'http://7f9219a069f7.ngrok.io/api/get_current_courses',
33
+      url: 'http://481cb6e289f9.ngrok.io/api/get_current_courses',
34 34
       headers: {
35 35
         'content-type': 'application/json',
36 36
         Authorization: `Token ${token}`

+ 2
- 2
client/Screens/CurrentCourses.js View File

@@ -54,7 +54,7 @@ const CurrentCourses = () =>{
54 54
         let user_id = parseInt(id)
55 55
 
56 56
         try {
57
-            let response = await axios(`http://7f9219a069f7.ngrok.io/api/get_current_courses`, {
57
+            let response = await axios(`http://481cb6e289f9.ngrok.io/api/get_current_courses`, {
58 58
                 method: 'POST',
59 59
                 headers: {
60 60
                     'content-type': 'application/json',
@@ -86,7 +86,7 @@ const CurrentCourses = () =>{
86 86
         console.log(year)
87 87
 
88 88
         try {
89
-            let response = await axios(`http://7f9219a069f7.ngrok.io/api/delete_course`, {
89
+            let response = await axios(`http://481cb6e289f9.ngrok.io/api/delete_course`, {
90 90
                 method: 'DELETE',
91 91
                 headers: {
92 92
                     'content-type': 'application/json',

+ 3
- 3
client/Screens/EditGrades.js View File

@@ -50,7 +50,7 @@ const CurrentCourses = () =>{
50 50
         console.log(user_id)
51 51
 
52 52
         try {
53
-            let response = await axios(`http://7f9219a069f7.ngrok.io/api/get_all_courses_by_semester?user_id=${user_id}&year=${year}&semestre=${semester}`, {
53
+            let response = await axios(`http://481cb6e289f9.ngrok.io/api/get_all_courses_by_semester?user_id=${user_id}&year=${year}&semestre=${semester}`, {
54 54
                 method: 'GET',
55 55
                 headers: {
56 56
                     'content-type': 'application/json',
@@ -72,7 +72,7 @@ const CurrentCourses = () =>{
72 72
         let user_id = parseInt(id)
73 73
 
74 74
         try {
75
-            let response = await axios(`http://7f9219a069f7.ngrok.io/api/delete_course`, {
75
+            let response = await axios(`http://481cb6e289f9.ngrok.io/api/delete_course`, {
76 76
                 method: 'DELETE',
77 77
                 headers: {
78 78
                     'content-type': 'application/json',
@@ -117,7 +117,7 @@ const CurrentCourses = () =>{
117 117
         console.log(year)
118 118
 
119 119
         try {
120
-            let response = await axios(`http://7f9219a069f7.ngrok.io/api/update_grade_and_gpa`, {
120
+            let response = await axios(`http://481cb6e289f9.ngrok.io/api/update_grade_and_gpa`, {
121 121
                 method: 'PATCH',
122 122
                 headers: {
123 123
                     'content-type': 'application/json',

+ 2
- 2
client/Screens/EnrollNextSemester.js View File

@@ -55,7 +55,7 @@ const EnrollNextSemester = () => {
55 55
 
56 56
       let response = await axios({
57 57
         method: 'POST',
58
-        url: 'http://7f9219a069f7.ngrok.io/api/matricular_prox_semestre',
58
+        url: 'http://481cb6e289f9.ngrok.io/api/matricular_prox_semestre',
59 59
         headers: {
60 60
           'content-type': 'application/json',
61 61
           Authorization: `Token ${token}`
@@ -93,7 +93,7 @@ const EnrollNextSemester = () => {
93 93
       const token = await SecureStore.getItemAsync('token')
94 94
       const response = await axios({
95 95
           method: 'GET',
96
-          url: `http://7f9219a069f7.ngrok.io/api/select_course_prox_semestre?code=${text}`,
96
+          url: `http://481cb6e289f9.ngrok.io/api/select_course_prox_semestre?code=${text}`,
97 97
           headers: {
98 98
             'content-type': 'application/json',
99 99
             Authorization: `Token ${token}`

+ 1
- 1
client/Screens/HomeScreen.js View File

@@ -12,7 +12,7 @@ function HomeScreen({ navigation }) {
12 12
     console.log(token, id)
13 13
 
14 14
     let response = await Axios({
15
-      url: 'http://7f9219a069f7.ngrok.io/api/hello',
15
+      url: 'http://481cb6e289f9.ngrok.io/api/hello',
16 16
       method: 'GET',
17 17
       headers: {
18 18
           Authorization: `Token ${token}`

+ 2
- 2
client/Screens/Login.js View File

@@ -43,7 +43,7 @@ export default function Login() {
43 43
 
44 44
         try {
45 45
           // login user in backend
46
-          let response = await fetch('http://7f9219a069f7.ngrok.io/rest-auth/google/', {
46
+          let response = await fetch('http://481cb6e289f9.ngrok.io/rest-auth/google/', {
47 47
             method: 'POST',
48 48
             headers: {
49 49
               'content-type': 'application/json'
@@ -64,7 +64,7 @@ export default function Login() {
64 64
           const token = await SecureStore.getItemAsync('token')
65 65
 
66 66
           // storing our id
67
-          let id = await fetch('http://7f9219a069f7.ngrok.io/api/get_user_id', {
67
+          let id = await fetch('http://481cb6e289f9.ngrok.io/api/get_user_id', {
68 68
             method: 'GET',
69 69
             headers: {
70 70
               'content-type': 'application/json',

+ 1
- 1
client/Screens/Logout.js View File

@@ -10,7 +10,7 @@ function Logout({ navigation }) {
10 10
       
11 11
       let response = await Axios({
12 12
         method: 'POST',
13
-        url: 'http://7f9219a069f7.ngrok.io/api/logout',
13
+        url: 'http://481cb6e289f9.ngrok.io/api/logout',
14 14
         headers: {
15 15
           'content-type': 'application/json',
16 16
           Authorization: `Token ${token}`

+ 2
- 2
client/Screens/MyCurriculum.js View File

@@ -20,7 +20,7 @@ const MyCurriculum = () =>{
20 20
         let user_id = parseInt(id)
21 21
 
22 22
         try {
23
-            let response = await axios('http://7f9219a069f7.ngrok.io/api/see_gpa', {
23
+            let response = await axios('http://481cb6e289f9.ngrok.io/api/see_gpa', {
24 24
                 method: 'POST',
25 25
                 headers: {
26 26
                     Authorization: `Token ${token}`
@@ -43,7 +43,7 @@ const MyCurriculum = () =>{
43 43
         let numbers = []
44 44
 
45 45
         try {
46
-            let response = await axios(`http://7f9219a069f7.ngrok.io/api/get_all_courses_by_semester?user_id=${user_id}&year=${year}&semestre=${semester}`, {
46
+            let response = await axios(`http://481cb6e289f9.ngrok.io/api/get_all_courses_by_semester?user_id=${user_id}&year=${year}&semestre=${semester}`, {
47 47
                 method: 'GET',
48 48
                 headers: {
49 49
                     'content-type': 'application/json',

+ 2
- 2
client/Screens/UpdateSemYear.js View File

@@ -21,7 +21,7 @@ const UpdateSemYear = () => {
21 21
 
22 22
         let response = await axios({
23 23
         method: 'PATCH',
24
-        url: 'http://7f9219a069f7.ngrok.io/api/update_year_and_semester',
24
+        url: 'http://481cb6e289f9.ngrok.io/api/update_year_and_semester',
25 25
         headers: {
26 26
             'content-type': 'application/json',
27 27
             Authorization: `Token ${token}`
@@ -48,7 +48,7 @@ const UpdateSemYear = () => {
48 48
 
49 49
       let response = await axios({
50 50
         method: 'POST',
51
-        url: 'http://7f9219a069f7.ngrok.io/api/get_year_and_semester',
51
+        url: 'http://481cb6e289f9.ngrok.io/api/get_year_and_semester',
52 52
         headers: {
53 53
           'content-type': 'application/json',
54 54
           Authorization: `Token ${token}`

BIN
server/restful/__pycache__/settings.cpython-38.pyc View File