GithubHelp home page GithubHelp logo

operationcode / back-end Goto Github PK

View Code? Open in Web Editor NEW
13.0 13.0 30.0 874 KB

OperationCode's main back-end server

Home Page: https://operationcode.org

License: MIT License

Dockerfile 1.37% Python 91.69% HTML 5.71% CSS 0.27% JavaScript 0.18% Shell 0.77%
django django-rest-auth django-rest-framework hacktoberfest hacktoberfest2017 hacktoberfest2018 hacktoberfest2019 hacktoberfest2020 operationcode python

back-end's Introduction

OpenCollective

Operation Code is an open source community dedicated to getting military veterans coding, founded by David Molina, and maintained by over a dozen software developers with the support and involvement of the startup community.

Interested in frontend web development? Check out our React repo
Interested in backend web development? Check out our Rails repo
Interested in developing chatbots? Check out our Ruby repo

Releasing the source code for this project is meant to empower military veterans and all developers everywhere to contribute their ideas, energy and time to help close the nation's technical talent shortage with American patriots trained in modern software development. What could be better than reducing veterans unemployment with our very own?

Learn more at: https://www.operationcode.org

Donate securely at: https://www.operationcode.org/donate

Questions? Get in touch: [email protected]

Table of contents

About

Veteran-founded and led, Operation Code is on a mission to get more military veterans coding!

  • This repo no longer contains any code. It now serves as a central point to manage tasks that are either cross project or not having to do with code.
  • OperationCode.org is made up of two apps. A javascript/react app that displays content and a rails backend that handles serving and processing data.
  • Source code Everything we do is open source.
  • Our roadmap gives a high level overview of where Operation Code is headed.

Contributing

Ensure you review our Code of Conduct as well.

Check out our Start Here repo for more information on all of our projects.

Community

Get updates on Operation Code's development.

Become a backer

Become a sponsor

back-end's People

Contributors

allenanthes avatar dependabot-preview[bot] avatar garyray-k avatar irvingpop avatar kylemh avatar mdeanlindsay avatar wendeee avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

back-end's Issues

New Code School Request: Divergence Academy

Name: Divergence Academy
Website: https://divergenceacademy.com/
Full Time: True
Hardware Included: False
Has Online: False
Only Online: False
VA Accredited: True
Housing Included: False
MOOC Only: False

Address: 14683 Midway Road Suite 145
City: Addison
State: TX
Country: United States
Zip: 75001
Representative Name: Beth Lahaie
Representative Email: [email protected]

logo: school-logo

This code school is ready to be added/updated:
@AllenAnthes @kylemh @wimo7083
Please close this issue once you've added/updated the code school.

Exception thrown when user manually invited to Slack

Sentry Issue: BACK-END-1H

Profile.DoesNotExist: Profile matching query does not exist.
(10 additional frame(s) were not displayed)
...
  File "rest_framework/mixins.py", line 84, in partial_update
    return self.update(request, *args, **kwargs)
  File "rest_framework/mixins.py", line 67, in update
    instance = self.get_object()
  File "core/views.py", line 74, in get_object
    profile = Profile.objects.get(user__email=email)
  File "django/db/models/manager.py", line 82, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
  File "django/db/models/query.py", line 408, in get
    self.model._meta.object_name

Update list of Corporate Sponsors on website

Bug Report

What is the current behavior?

Cash and in kind sponsors are listed together, when this isn't fair to folks who paid.

What is the expected behavior?

Distinguish between paying and in kind sponsors by making paid logos larger and group together, while listing others in a separate manner with smaller logos. Paid sponsors are US Bank, Threatstack and Slack.

API Issues

api

Bug Report

What is the current behavior?

0 results for I am looking for.

What is the expected behavior?

The specific number of the selected criteria.

What steps did you take to get this behavior?

I am trying to obtain the exact number of military spouses, Army, Navy, Marines, etc.
When I searched for military spouses, I left certain criteria as unknown and only specified Military status: spouse. And it gave me 0 results.

Same thing for “army”. I selected military status: veteran and typed “army” on keyword. It gave me 0 results as well.

Additional Info

Operating System

Browser

https://api.operationcode.org/admin/core/profile/?q=spouse&is_mentor__isnull=True&is_volunteer__isnull=True&military_status=veteran

Screenshots

New Code School Request: Operation Spark

Name: Operation Spark
Website: https://operationspark.org/
Full Time: True
Hardware Included: False
Has Online: False
Only Online: False
VA Accredited: False
Housing Included: False
MOOC Only: False

Address: 1020 N Prieur St
City: New Orleans
State: LA
Country: United States
Zip: 70116
Representative Name: Admissions
Representative Email: [email protected]

logo: school-logo

This code school is ready to be added/updated:
@AllenAnthes @kylemh @wimo7083
Please close this issue once you've added/updated the code school.

New Code School Request: Zip Code Wilmington

Name: Zip Code Wilmington
Website: https://www.zipcodewilmington.com/
Full Time: True
Hardware Included: False
Has Online: False
Only Online: False
VA Accredited: True
Housing Included: False
MOOC Only: False

Address: 1007 N. Orange Street, Fourth Floor
City: Wilmington
State: DE
Country: United States
Zip: 19801
Representative Name: Dan Stabb
Representative Email: [email protected]

logo: school-logo

This code school is ready to be added/updated:
@AllenAnthes @kylemh @wimo7083
Please close this issue once you've added/updated the code school.

User emails aren't making it from website signup to Mailchimp

When a new user joins Operation Code, their email address does not make it into our contacts list in Mailchimp.

Over the past 30 days, Mailchimp has not been automatically updating with website signups. I think the integration between the backend and Mailchimp may not be working.

For now, we can get around this by doing a manual export of emails in the current database, and importing them into Mailchimp.

New Code School Request: Test new BE form #3 (sorry, last one, probably)

Name: Test new BE form #3 (sorry, last one, probably)
Website: test
Full Time: True
Hardware Included: False
Has Online: True
Only Online: False
VA Accredited: False
Housing Included: True
MOOC Only: False

Address: test test
City: test
State: test
Country: test
Zip: test
Representative Name: test
Representative Email: test

logo: school-logo

This code school is ready to be added/updated:
@AllenAnthes @kylemh @wimo7083
Please close this issue once you've added/updated the code school.

"Test" accounts are being transferred to LGL.

Bug Report

What is the current behavior?

Fake accounts are getting mixed with real accounts. I was clearing up the list on LGL and deleted recent ones (the last one we received was not in May).

What is the expected behavior?

See if there is a way for these type of accounts to not get transferred into LGL.

image

Cannot create database entries via admin panel

Bug Report

What is the current behavior?

Admins are not able to create new objects in the database from within the admin panel.

What is the expected behavior?

Admins can create new objects from within the admin panel

What steps did you take to get this behavior?

Attempted to create a new codeschool.

Additional Info

Sentry Issue: BACK-END-Z

Django/Django-Admin doesn't appear to be generating valid primary key's for new rows.

UniqueViolation: duplicate key value violates unique constraint "api_locations_pkey"
DETAIL:  Key (id)=(1) already exists.

Is This A Third-Party Issue?

Maybe? Probably not.

New Code School Request: Last test, for real

Name: Last test, for real
Website: test
Full Time: True
Hardware Included: False
Has Online: True
Only Online: False
VA Accredited: True
Housing Included: True
MOOC Only: True

Address: test test
City: test
State: test
Country: test
Zip: test
Representative Name: test
Representative Email: test

logo: school-logo

This code school is ready to be added/updated:
@AllenAnthes @kylemh @wimo7083
Please close this issue once you've added/updated the code school.

Success Story enhancements (Editing)

Feature request

The SuccessStory view should be enhanced to allow stories to be edited. However, only the original author and admin/staff members should be able to edit the stories.

It may be helpful to take a look at the DRF Permissions Documentation, although it may just be easier to check the permissions manually in something like the viewset's update method.

blocked by #318

New Code School Request: Lambda School

Name: Lambda School
Website: https://lambdaschool.com/
Full Time: True
Hardware Included: False
Has Online: True
Only Online: True
VA Accredited: False
Housing Included: False
MOOC Only: False

Address: 250 Montgomery Street 16th Floor
City: San Francisco
State: CA
Country: USA
Zip: 94104
Representative Name: Ed Casabian
Representative Email: [email protected]

logo: school-logo

This code school is ready to be added/updated:
@AllenAnthes @kylemh @wimo7083
Please close this issue once you've added/updated the code school.

Create logic for polling users

Feature request

Create logic prolly using Cloudwatch + SQS (I think?) to define cron-job logic for polling users who’re devoid of information. (@hollomancer need to discuss this prolly with the whole community, not just us… What’s the best sort of way to beg for info and not piss people off? Do we give up after a certain # of tries? Are you okay with that?)

Verify requests with reCAPTCHA

Feature request

Add reCAPTCHA middleware to easily wrap views which require reCAPTCHA verification on front-end. We'll be adding reCAPTCHA to the front-end on the precipice of adding many forms to the website.

Proposed solution

https://developers.google.com/recaptcha/docs/verify 🤷
I DMed @AllenAnthes the secret key.

Potential alternative solutions

🤷 maybe we dont need server verification if I'm just tryna prevent bots? Perhaps I could just not let the form submit until the recaptcha is done.

https://stackoverflow.com/questions/56776469/do-we-need-backend-integration-for-recaptchv3

Answer: Yeah it's easy to do: https://stackoverflow.com/questions/56776469/do-we-need-backend-integration-for-recaptchv3#comment100168666_56786924

Additional context

Open to discussion!

New Code School Request: Helio Training

Name: Helio Training
Website: www.heliotraining.com
Full Time: True
Hardware Included: False
Has Online: True
Only Online: False
VA Accredited: True
Housing Included: False
MOOC Only: False

Address: 165 s Main Street #300
City: Salt Lake City
State: UT
Country: United States
Zip: 84111
Representative Name: Matt Brown
Representative Email: [email protected]

logo: school-logo

This code school is ready to be added/updated:
@AllenAnthes @kylemh @wimo7083
Please close this issue once you've added/updated the code school.

Create view/endpoint for Pybot to hit in order to get authenticated URL to initiate form

Feature request

We want to create a slash command in Slack that takes users to a survey. We need an end point for that command to hit which returns a link to the survey form so each user can only submit once and we can store the responses.

Proposed solution

Create view/endpoint for Pybot to hit in order to get authenticated URL to initiate form.

Additional context

This is going to be related to an OperationCode-Pybot repo issue.

Add `is_vet_tec_approved` boolean field for schools on `code_schools` endpoint

Feature request

We've been given a request to create the ability to filter code schools by their approval from VET TEC.

Here's a list of the approved schools: https://benefits.va.gov/GIBILL/FGIB/VetTecTrainingProviders.asp

Proposed solution

Seems to be SSR so we can't see the network request on the client. That being the case, maybe we need a cron-job to hit the above URL and parse the table to update our own internal DB?

Potential alternative solutions

🤷‍♂

Additional context

Front-end ticket

Associate Slack information with user record

Feature request

Associate Slack information with a user's record in the backend.

Proposed solution

Right now, our backend tracks signups, but not necessarily whether the user actually makes it into Slack. I would like to ensure that we can associate the information a user provides in our signup flow, to their Slack account.

Autojoin channels based on signup flow information

As a user, I want to autojoin a Slack channel corresponding to my military status (milspouse / active duty), so that I have a new user experience tailored to my current life situation.

Product Requirements

  • (MVP) Users on signup that identify as a military spouse autojoin #milspouses.
  • Users on signup that identify as active duty autojoin #active-duty.

Success Story enhancements (Approval)

Feature request

Admins need to have the ability to approve/disapprove SuccessStories.

Additionally, the SuccessStories ViewSet should allow requesting stories filtered by their approval state - potentially only returning approved stories by default/for anonymous or standard users. Needs discussion.

The basic functionality can likely be achieved by simply registering the model with Django Admin in src/api/admin.py. Additional functionality could be added to support filtering the results in Django Admin by approval state, reverting approval state if an edit to the story is made, sending a notification to a user if their story is approved, etc.

blocked by #318

Update San Diego Code School GI Bill Status

Feature request

From @aaron-suarez on Slack - someone emailed him:
"I was looking through your listed coding bootcamp websites and I ran across one that was listed as accepting the GI Bill so I went to their website (SDCS) and on there it's stated that they do not accept the GI Bill. I’d just like to prevent any further miscommunications. I’ve linked the webpage stating that SDCS does not accept the GI Bill. https://www.sdcs.io/financing/"

Proposed solution

Update data in back-end DB for SDCS & GI Bill.

New Code School Request: test

Name: test
Website: test
Full Time: False
Hardware Included: True
Has Online: True
Only Online: True
VA Accredited: True
Housing Included: False
MOOC Only: True

Address: Test Test
City: Test
State: Test
Country: Test
Zip: Test
Representative Name: Test
Representative Email: Test

logo: school-logo

This code school is ready to be added/updated:
@AllenAnthes @kylemh @wimo7083
Please close this issue once you've added/updated the code school.

Create user connection back-end view/endpoint.

Feature request

We need to create an end point on our API to allow user information sharing between Slack OAuth and OC user profiles.
We want a database of user information for our own purposes (like user management.)

Proposed solution

We need the end point created.

Additional context

This issue is related to #345

New Code School Request: Learn Academy

Name: Learn Academy
Website: https://www.learnacademy.org/
Full Time: True
Hardware Included: True
Has Online: False
Only Online: False
VA Accredited: False
Housing Included: False
MOOC Only: False

Address: 704 J Street
City: San Diego
State: CA
Country: USA
Zip: 92101
Representative Name: Hillary Opperman
Representative Email: [email protected]

logo: school-logo

This code school is ready to be added/updated:
@AllenAnthes @kylemh @wimo7083
Please close this issue once you've added/updated the code school.

"Success Story" basic functionality

Feature request

We would like to add the ability for registered users to post their success stories. This will likely involve

  • adding a new database table via a SuccessStory model in src/api/models.py
    • contains at least the fields for created_by (User), created_at, text, is_approved, others?
  • a serializer for the model in src/api/serializers.py
  • a view in src/api/views.py
    • only authenticated users should be able to CREATE a new success story
    • anyone should be able to read success stories (@kylemh is this correct?)
    • for the initial implementation all other interactions should be disabled (no updating, deleting, etc)

SSO for BE and ResourceAPI

Feature request

Stretch goal from Aaron S., SSO for BE and Resources API so we can create/update resources using logged in session rather than providing API key

Proposed solution

From Allen: if user is logged in an they have a valid JWT stored as cookie. This is already added to the auth header for any req's sent to backend.
From Aaron: could require some changes to resources API to do that
-> if requests also go to the Resources API, can just post key to /auth/token/verify

Potential alternative solutions

UK

Additional context

Next step planning after new website launch # @

Cannot change whether code schools have housing in the backend.

Bug Report

What is the current behavior?

When viewing the code school database in the backend, there is no way to change whether a code school offers housing or not.

What is the expected behavior?

User is able to modify whether a code school has housing or not.

This was reported by devCodeCamp (screenshot attached)
image

Add Leadership Circle recognition to website

Bug Report

What is the current behavior?

No recognition, when there should be.

What is the expected behavior?

Recognition of 2018 and active 2019 donors.

What steps did you take to get this behavior

2018 Leadership Circle list.pdf
?
e.g. I logged in...

Additional Info

Operating System

Browser

Is This A Third-Party Issue?

Screenshots

500 go back button has rendering issue

Bug Report

What is the current behavior?

When you get a 500 error, the Go Back button has some weird line through the middle, but only when hovering over it.

image

New Code School Request: PunchCode by Tech Impact

Name: PunchCode by Tech Impact
Website: punchcode.org
Full Time: True
Hardware Included: True
Has Online: False
Only Online: False
VA Accredited: False
Housing Included: False
MOOC Only: False

Address: 1112 casino center blvd
City: las vegas
State: nv
Country: US
Zip: 89104
Representative Name: Mario Mitchell
Representative Email: [email protected]

logo: school-logo

This code school is ready to be added/updated:
@AllenAnthes @kylemh @wimo7083
Please close this issue once you've added/updated the code school.

New Code School Request: Codesmith

Name: Codesmith
Website: codesmith.io
Full Time: True
Hardware Included: False
Has Online: True
Only Online: False
VA Accredited: False
Housing Included: False
MOOC Only: False

Address: 1600 Main St First Floor
City: Venice
State: California
Country: United States
Zip: 90291-3626
Representative Name: Kaylee Anderson
Representative Email: [email protected]

logo: school-logo

This code school is ready to be added/updated:
@AllenAnthes @kylemh @wimo7083
Please close this issue once you've added/updated the code school.

New Code School Request: The Tech Academy

Name: The Tech Academy
Website: https://www.learncodinganywhere.com/
Full Time: True
Hardware Included: True
Has Online: True
Only Online: False
VA Accredited: False
Housing Included: False
MOOC Only: False

Address: 310 SW 4th Ave Suite 412
City: Portland
State: OR
Country: United States of America
Zip: 97204
Representative Name: Maggie Torres
Representative Email: [email protected]

logo: school-logo

This code school is ready to be added/updated:
@AllenAnthes @kylemh @wimo7083
Please close this issue once you've added/updated the code school.

Associate user with attended Meetups

Feature request

Associate the Meetups a user attends, with a user's record in the backend.

Right now, our backend does not track whether a user is also in one of our Meetups.

This is more technically difficult because we don't get email addresses from Meetup - we only get first name, last name, and their general geographic location.

Proposed solution

If we can get their first name, last name, and the meetup they attend - it may be possible to associate this data with and individual user record.

This will not work with folks who have very common names. Further exploration into the Meetup API may find additional opportunities for identification, aside from the fields mentioned earlier.

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.