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

(DO NOT MERGE YET) Fellowships work #996

Merged
merged 42 commits into from
Mar 6, 2018
Merged

(DO NOT MERGE YET) Fellowships work #996

merged 42 commits into from
Mar 6, 2018

Conversation

mmmavis
Copy link
Collaborator

@mmmavis mmmavis commented Jan 24, 2018

I'm opening up a PR to see if review app for the fellowships branch works.

@cadecairos cadecairos temporarily deployed to foundation-mofostaging--pr-996 January 24, 2018 23:36 Inactive
@gideonthomas gideonthomas temporarily deployed to foundation-mofostaging--pr-996 January 26, 2018 16:00 Inactive
@cadecairos cadecairos temporarily deployed to foundation-mofostaging--pr-996 January 30, 2018 20:13 Inactive
@mmmavis mmmavis temporarily deployed to foundation-mofostaging--pr-996 January 30, 2018 22:19 Inactive
@cadecairos cadecairos temporarily deployed to foundation-mofostaging--pr-996 February 2, 2018 18:39 Inactive
@mmmavis mmmavis temporarily deployed to foundation-mofostaging--pr-996 February 2, 2018 21:53 Inactive
@cadecairos cadecairos temporarily deployed to foundation-mofostaging--pr-996 February 5, 2018 18:50 Inactive
@mmmavis mmmavis temporarily deployed to foundation-mofostaging--pr-996 February 6, 2018 20:07 Inactive
@mmmavis mmmavis temporarily deployed to foundation-mofostaging--pr-996 February 8, 2018 02:25 Inactive
@mmmavis mmmavis temporarily deployed to foundation-mofostaging--pr-996 February 9, 2018 00:29 Inactive
alanmoo and others added 9 commits February 8, 2018 22:07
* Set stage for fellowships pages w/ django template
* Adding some stub urls for the fellowships site.

* Update some of the urls a bit more
* Test commit

* Find out which url is it resolving to

* Fix stuff

* Remove debugging stuff
Fellowships support page
* Related to #1019 - repsonsive fellowships nav + #977 - better multi-page nav on mobile
* updated fellowships homepage
@mmmavis mmmavis temporarily deployed to foundation-mofostaging--pr-996 February 9, 2018 06:13 Inactive
@mmmavis mmmavis temporarily deployed to foundation-mofostaging--pr-996 February 10, 2018 01:32 Inactive
@mmmavis mmmavis temporarily deployed to foundation-mofostaging--pr-996 February 28, 2018 20:01 Inactive
* Related to #1120 - updated fellowships homepage content and layout again
* Related to #1124 - hero banner adjustment
@mmmavis mmmavis temporarily deployed to foundation-mofostaging--pr-996 March 1, 2018 21:39 Inactive
@@ -30,6 +30,9 @@

urlpatterns = list(filter(None, [
url(r'^admin/', include(admin.site.urls)),
url(r'^soc/', include('social_django.urls', namespace='social'))
if settings.SOCIAL_SIGNIN else '',
url(r'^fellowships/', include('networkapi.fellows.urls')),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

on line 47 below, there's this code:

url(r'^soc/', include('social_django.urls', namespace='social')),
 
# Don't remove this redirect until Fellowships pages are live
url(r'^fellowships/$', RedirectView.as_view(
             url='https://advocacy.mozilla.org/open-web-fellows'
         ))
if settings.SOCIAL_SIGNIN else None,

There are two things we need to look at here:
Firstly, we'll want to update the route pattern to something like this

url(r'^fellowship/(?P<path>.*)', RedirectView.as_view(
    url='/fellowships/%(path)s',
    query_string=True
)),

Secondly the line with

if settings.SOCIAL_SIGNIN else None,

should actually follow

url(r'^soc/', include('social_django.urls', namespace='social'))

... but there are two of the above url configs in the file, so lets de-dupe that!

@mmmavis mmmavis temporarily deployed to foundation-mofostaging--pr-996 March 1, 2018 22:52 Inactive
@mmmavis mmmavis temporarily deployed to foundation-mofostaging--pr-996 March 2, 2018 02:46 Inactive
* Related to #1116 - content changes to apply page
@mmmavis mmmavis temporarily deployed to foundation-mofostaging--pr-996 March 2, 2018 19:38 Inactive
* Fixed #1128 - fixed broken 'see work' link
@mmmavis mmmavis temporarily deployed to foundation-mofostaging--pr-996 March 2, 2018 20:32 Inactive
@mmmavis mmmavis temporarily deployed to foundation-mofostaging--pr-996 March 3, 2018 00:05 Inactive
@cadecairos cadecairos temporarily deployed to foundation-mofostaging--pr-996 March 5, 2018 18:50 Inactive
@mmmavis mmmavis temporarily deployed to foundation-mofostaging--pr-996 March 5, 2018 22:02 Inactive
@mmmavis mmmavis temporarily deployed to foundation-mofostaging--pr-996 March 5, 2018 23:37 Inactive
* redirected /fellowship to /fellowships

* removed an extra line
@cadecairos cadecairos temporarily deployed to foundation-mofostaging--pr-996 March 6, 2018 19:01 Inactive
Copy link

@cadecairos cadecairos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you remove fellows/admin.py, fellows/tests.py, fellows/models.py

I think we should also file a followup to write tests for the views.


let pulseApiDomain = ``;
let pulseDomain = ``;
const DIRECOTRY_PAGE_FILTER_OPTIONS = {'program_year': `2017`};

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DIRECOTRY_PAGE_FILTER_OPTIONS => DIRECTORY_PAGE_FILTER_OPTIONS

let queryString = Object.entries(params).map(pair => pair.map(encodeURIComponent).join(`=`)).join(`&`);
let req = new XMLHttpRequest();

req.addEventListener(`load`, () => {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be a one-liner:

req.addEventListener(load, () => callback.call(this, JSON.parse(req.response)));

Do we really need to bind the callback to this?

* code improvement

* removed a few empty files
@mmmavis mmmavis merged commit 4e0d905 into master Mar 6, 2018
@mmmavis mmmavis deleted the fellowships branch March 26, 2019 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants