CSI-280 / MusicGames

0 stars 0 forks source link

Initialize code base with Django/React #6

Closed JakeCapra closed 4 years ago

JakeCapra commented 4 years ago

Commit the starter code for Django/React, this includes files like app.js, index.html (for react). This can be done with npx create-react-app musicGames in the terminal. For Django, this can be done with django-admin startproject musicGames. I'm not sure if we've officially decided on a framework,m since the google doc lists both Django and React.

chrisbendel commented 4 years ago

@JakeCapra step 1 should be deciding on a framework, before having a task that says to implement a framework

jbuzzell commented 4 years ago

https://docs.djangoproject.com/en/3.0/intro/install/ django guide

A-Waters commented 4 years ago

@jbuzzell can you look at the 'alex' branch sometime soon, just double check I'm doing stuff right/you understand what's happening because I'm a little lost but it technically works. Its currently set up for articles tho.

I have moved on to the front side integration and I'm seeing where this leads me currently.

A-Waters commented 4 years ago

The front side has been set up and we are now able to communicate with it, I'm still confused about where we would be creating out 'users' but I think that will be next week's issue. Depending on what you think (@jbuzzell), we can better clarify what the next steps will be.

jbuzzell commented 4 years ago

how are you setting things up? when i run the django app i get an error. traceback:

image

chrisbendel commented 4 years ago

@TAwc are there env variables you set up locally?

jbuzzell commented 4 years ago

also, using the runserver command from manage.py (which theoretically should be the same thing) gives a different traceback:

image

A-Waters commented 4 years ago

Give me a minute to try to reproduce the issue on my side. Im gonna see whats up.

jbuzzell commented 4 years ago

@TAwc oops my bad i didn't install like any dependencies at all

A-Waters commented 4 years ago

@jbuzzell I'm not able to recreate the issues on my machine, after cloning the files to a new directory, make sure you did the pip install correctly as the read me states below. I'm guessing based on the error you're getting you may have missed on.

As far as I know, my env variables haven't been touched.

Note I'm using python 3.6 just in case that is the issue

A-Waters commented 4 years ago

Yeah lmk if that works

jbuzzell commented 4 years ago

@TAwc close but no cigar. got django running, here's the npm traceback:

image

everything is installed properly now

A-Waters commented 4 years ago

cd into gui mb didnt put that in read me

jbuzzell commented 4 years ago

both servers run but it's looking like they're trying to compete for port 8000 and booting each other out

image image image

i appreciate your patience through this btw

jbuzzell commented 4 years ago

unrelated to all of this, it looks like django was set up just fine. i would probably suggest moving the react project info into the django app directory in the future depending how react interacts with django's template system. i'll admit i'm not super familiar with react though, and i have never set it up in a django project, so i'm sure you're on the right track in that regard

A-Waters commented 4 years ago

What I think is happening here is that the Django API endpoint is returning a null object (because you haven't created an article, basically an empty object causing some issues, this is a big guess tho). I'm not sure what you mean exactly with "moving the react project info into the django app directory in the future depending on how react interacts with django's template system."

The big thing I think we want to make sure is that you can understand what's happening in the backend/src/ section. BUt ty so much for the help

JakeCapra commented 4 years ago

If someone were to have just cloned the repo, what would they have to do to get up and running? What dependencies would they have to install?

A-Waters commented 4 years ago

@JakeCapra check out the pull request #15, I think it should clarfy things