GithubHelp home page GithubHelp logo

mozilla / network-api Goto Github PK

View Code? Open in Web Editor NEW
3.0 43.0 5.0 314 KB

Development moved to https://github.com/mozilla/network

License: MIT License

Python 64.73% Shell 0.08% JavaScript 12.33% HTML 21.36% CSS 1.49%

network-api's Introduction

De-activation Notice

This codebase has been merged into the network repository.

network-api's People

Contributors

alanmoo avatar arush0311 avatar cadecairos avatar gideonthomas avatar gvn avatar mofodevops avatar pomax avatar simonwex avatar

Stargazers

 avatar  avatar  avatar

Watchers

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

network-api's Issues

[ADMIN] Add sort order for resources

Details

Allow administrators to set up an ordering scheme for resources. For e.g. they should be able to control the order in which people are shown in the front-end.

Implementation

This one is a bit convoluted to solve (it's a general problem with ORMs). We probably want to create an integer field in the model and use this library to handle the ordering logic for the admin view. We can customize the UI if needed.

[PAGES] Determine structure/constraints for a page

Details

Elicit the schema that authors of pages need to follow in order to create a new page specific to a resource (like Offerings).

Enforce a specific language that needs to be followed as well, i.e. Markdown/HTML, etc., along with any restrictions we want to impose on it.

Add "featured" flag on people

Admins should be able to mark people as "Featured".

If it's at all possible, can this state show up on the "reorder" card view?

Define staff workflow for adding content

Apologies if this has been discussed elsewhere.

We need to determine how staff members will trigger an update to the production site based on changes to the CMS. Ideally they have a way to preview their changes on a staging server, and they can update the site without engineer involvement.

[ADMIN] Add ability to control when a resource is public

Description

Authors using the administrative interface to publish new resources (pages, news, featured offerings, etc.) should be able to control when the resource is visible on the front-end by setting a publish_date similar to the corresponding functionality on Wordpress

Implementation

We can possibly just have that stored in the model and let the admins update it. We can customize the view to do checks based on the date and send back the response accordingly. Caveats include dealing with timezones. We might want to expose the local time (or give them a choice) in the admin interface (so that the admins use the time that is relative to them) and we convert it to UTC time for calculations. This will involve us storing timezone data as well in the db.

Add publish date and expiry date to People and Opportunities

According to the the schema, we should also allow admins to enter the publish date and expiry date for our three models.

We probably don't need to expose these through the serializer. However, we should let the view filter out the right models to serve based on these dates.

Decide on Auth system

We're trying to decide on what auth strategy to use for the network-api and for our CMS work in general. It would be good to consolidate our Auth strategy across our CMS implementations.

Our current thought is to use Github authentication here.

Rationale for Using Github

  • Allows us to manage permissions for existing staff using the Github Mozilla org's teams to assign who has access to what
  • Allows us to easily add contributors and assign permissions based on the org teams

Network Pulse uses Google Auth instead. We would like to understand the rationale behind choosing that for the pulse api as well as understanding the pros/cons of using google auth vs. github auth vs. something else.

[ADMIN] Add ability to upload images

Details

Allow administrators to upload images for resources that need an image in their models. For e.g., each People model needs a photo of the person. Admins should be able to upload this via the admin interface.

Implementation

Use S3 to back this. Use https://github.com/boto/boto3 to allow uploading to s3. Have an image_url to store the resulting url.

[PEOPLE] Figure out data structure for bio

Currently, the front-end displays bio as a list. This is a bit weird on the back-end as it suggests making "bio" a complex data structure, the implication being figuring out how to show this via the admin interface in a way that is not confusing.

Since this is the first "text-rich" field that we have encountered, let's have a decision on what type of data structure this should be.

Options

  • Bullet points (like in the comps)
    • We will need to fix the number of bullet points in this case (we can't change this later on)
    • We need a max character length
  • Markdown
    • This is more free form. We can probably show a preview of the rendered markdown in the admin view
    • Don't know what the repercussions are to design
    • We can set a max char count if it makes sense
    • Front-end would need to parse this markdown into markup

It would be nice to have a decision on this soon so that we can finish off the people app without being blocked on this.

cc @xmatthewx, @simonwex, @gvn, @alanmoo, @cadecairos

[PAGES] Figure out how images can be incorporated into pages

Details

Wordpress allows you to drag-and-drop images into your posts and pages. We should allow something similar.

Implementation

We would need to figure out the UX for this but can probably keep it simple. Again, use S3 to back the images using Boto3. Generate the url and insert it into their page data somehow. This will mainly involve using some JS/HTML to get this working.

Affiliations / Links UX on People module

The UX for both the Affiliations and Links fields aren't appropriate for the use case.

  • The list shouldn't be populated by data from other records. People will never have the same affiliations or links as others.
  • Items should be editable
  • Items should be deleteable

[NEWS] App

Tracking META bug for the News application

Does Django not like svgs?

Tried to upload a couple org logos that were svgs and got this error: "Upload a valid image. The file you uploaded was either not an image or a corrupted image."

Formatting on bio field in People module

I can't see the bio field being displayed right now, so I can't confirm this, but I'm assuming the bullet points I'm adding (using markdown) aren't going to render.

I'm not sure if we'll solve this on the back end in Django, on the front end, or simply by requiring that the content in this field not include bullets.

[ADMIN] Add CMS administrative functions

This epic tracks all the administrative requirements for the CMS that are needed for it to be usable by staff.

This focuses on requirements for the Network site specifically.

Add docker

Wrap the app in docker to avoid python/django OS-specific issues.

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.