Giter VIP home page Giter VIP logo

fireblog's People

Contributors

ismail-s avatar

Watchers

 avatar  avatar

fireblog's Issues

Remove dependency on personatestuser.org

Atm, whenever personatestuser.org goes down, the tests fail. It would be much better to instead mock out the functionality. This would probs also speed up the tests.

Combine all commands into one

Atm, there is initialize_fireblog_db and uwsgi, one for upgrading/checking/setting up db and one for running the website. It would be good to combine the 2 into one grand command which takes as input an ini file and does whatever it is told to do.

Handle new deps on auto-update

When updating, any new deps need to be installed first. I see 2 ways of doing this:

  1. After checking for updates, install new deps in a uwsgi task
  2. When the user chooses to update, then first install any new deps, then switch to latest code and reload

The latter sounds easier to do, IMO, and it is done at a point when it is expected that things will take some time. Also, in the future, we could send updates on the progress of the update whilst it is happening to the admin who initiated it.

Add sorting to multiple post display

  • Get the views to work with a sorting parameter
  • Update templates to display sorting select box and to handle changes to this box
    • Bootstrap
    • Polymer
    • Simple
  • Test everything
    • Make sure default sorting is newest first
    • Make sure sort oldest first works
    • Make sure sort newest first works for page 2
    • Make sure sort oldest first works for page 2
    • Make sure sorting urls generated for both views are correct
    • Make sure templates work for both sorting orders (ie functional tests)

Add compat module

In various places, there are imports with try...except to deal with Python 3.2. We should have a single file to deal with this.

Handle more errors

This is a bit of a generic issue, but there are various places in the blog where things can mess up in ways that won't be nicely handled. For example, when checking for updates, the git commands can fail. It would be nice to check for these issues, and at least pretty print them, or something.

Next/previous post links don't change when post is added/deleted

When adding or deleting a post, the corresponding element in the cache is deleted, which is correct.

However, we should also invalidate the cache elements for the previous and next posts under certain conditions:

  1. when adding a post, the post added just before this one was added should be invalidated, and this post should be invalidated, just in case.
  2. When deleting a post, the posts before and after should be invalidated, along with this post.

Ideally the fix for this would be done in conjunction with switching to firing off events when adding/deleting posts.

Add setting for length of paginated pages

With pages that display multiple posts, the amount of posts to display on a page is currently hardcoded. This can be made to be configurable as a setting.

Alternatively, it could be made configurable on the page itself, but that seems overly complex IMO, or to put it better, I don't want that feature atm.

Improve reload template

Instead of just redirecting to the homepage, we should be using javascript to poll the homepage repeatedly until it comes back up. With some status message saying how many times we have polled or something like that.

Add a settings page

Need to be able to change blog title, theme.

  • Create db wrapper that presents settings db table as dict
  • Create mapping listing all settings that can be changed
  • Add more options to mapping to specify min/max directly there
  • Create route and view for displaying settings page
  • Create template for settings page
  • Handle submission of changed settings
  • Upon startup, make sure all settings exist, requesting from command line any that don't
  • Change settings usage in rest of web app to use settings dict
  • Make sure both templates work
  • Remove unnecessary settings in ini files
  • Make sure all settings we want in settings webpage are in settings webpage
    • Add fireblog.recaptcha-secret setting
    • Add fireblog.theme setting
    • Add Persona settings
  • Remove any redundant code
  • Tests...

Use https://requires.io/

Keep track of deps, to ensure that any updates to a package don't mess things up. Atm, this isn't done, any version is accepted for (nearly) all packages.

Use redis for caching

Now that I am using uwsgi as the default server, we can't afford to have mismatches due to different worker processes using their own internal caches.

Look into some sort of auto update mechanism

  • Set defaults for settings entries, so that there is by default a correct option even if no option is in the db
  • Make it so that we can do a git fetch/pull/checkout from within the python code. This will mean that we can get the latest code, check to see if there is a newer version, and switch to it. With all the complexities handled by git.
  • Add a view to check for updates by doing a git fetch
    • If there is an update available, say so and check (with alembic) if a db upgrade will be required.
    • If no db upgrade is required, then offer to do the upgrade (ie switch to latest commit), then redirect to the restart view
    • If a db upgrade is required, then print some bash steps to indicate how the upgrade might be done.
    • Add a link to new view to navbar (maybe replacing reload view?)
  • Test everything
    • Test git-related code with mocks
    • Test settings default entries code
    • Test view code

A simple way may be to have the code on pypi. Then, whenever a new version is put on pypi, we update and restart.

If possible, having some sort of graceful restart would be really nice, but is not necessary at this point.

Handle new packages

Atm, when updating, new packages aren't being installed. Ideally, we would install them in the background first, then once they are installed, we offer the update. Or something like that. I need to think about how to structure the whole process.

Review db initialisation script

The script can be improved to make the initial data better, and we can prompt the user for an initial admin email address

Draft

  • First of all, a new column is needed in the posts table to keep track of whether a post is a draft or not.
  • When editing/adding a post, it should be possible to toggle between draft and published.
  • When displaying posts, this new column will need to be checked. Only admin should be able to see draft posts.
  • When an admin views a draft post, it should say somewhere on the page that it is a draft post.

Create simple theme

By a simple theme, I mean as just raw html. Basically the opposite of what a theme normally would be.

Gravatar

Look into adding gravatar support, downloading the images on the server side and directly including them in the Web page.

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.