ficlatte / main

Ficlatté website main code
GNU Affero General Public License v3.0
2 stars 2 forks source link

Challenge module, activity log, login page, subscribe messages #22

Closed stitzelj closed 7 years ago

stitzelj commented 7 years ago

Here's the completed challenge module. I've debugged it as thoroughly as I can, so if you guys stumble across something, let me know.

Some notes:

  1. See the end of the README for instructions on installing the datepicker the module uses.
  2. Run the migrate command to update the appropriate tables.
  3. I've removed the ability for users to edit both prompts and challenges, given how such edits could impact stories submitted under those modules.
  4. Challenge creators will only be able to pick stories they didn't write as the winning story.
  5. This PR includes the most recent version of the Twitter Bootstrap. I didn't want to overwrite the existing bootstrap files and risk breaking something, so those files live in their own directories in the static directory.

Let me know if there's anything I missed for integrating this into prod. This ended up being a pretty intricate module, so I may have overlooked something in the notes above.

stitzelj commented 7 years ago
  1. I included distros in the PR for the updated bootstrap and the django-datetime-widget-master. You don't need to do anything with them, but they're available for reference in the event the original sources disappear for some reason or another. We might consider creating a distro directory at some point as an archive, since we have three such packages now and I expect there will be at least one or two others added in the near future (e.g. for the messaging system and the forums). Just a thought.
HSAR commented 7 years ago

There is also a wider issue here, which is the division between development and operations. The source control mechanism is a development tool, in which we are developing a piece of software (let's call it "main", as that's the name of the repo).

At some point, Paul is going to take the code in source control and copy it onto the server. This is operations, which is the practice of maintaining a particular hardware and software combination (Linux, Python, database, etc.) required to run "main". This creates the website we know as "Ficlatte".

The reason I reject adding Bootstrap to source control is that the decision of Bootstrap versions is very much in the realm of operations, and so does not belong in the development tool of source control. In the same way, we wouldn't check in the MySQL binaries, or the Linux distribution (extreme examples to clarify my point).

stitzelj commented 7 years ago

Good point. I wasn't sure what was the best approach there, so I've pulled out the dependencies for this PR.

HSAR commented 7 years ago

A limited number of files in /castle/static/css are still contributing multiple-thousands of lines.

stitzelj commented 7 years ago

Ok, let me look at the code again and see if the datepicker can use the existing bootstrap files without loss of function. If so, I'll pull those additional dependencies out, as well, and continue with what we have already.

HSAR commented 7 years ago

My suggestion: take all that out, and note in the comments somewhere that the server deployment needs these things.

Or we could write an install script that automatically deploys the latest version of Bootstrap.

stitzelj commented 7 years ago

Ok, I made the additional changes. I probably should have checked all that out before initially committing (meant to, in fact, but forgot). This should be cleaner and leaner.

HSAR commented 7 years ago

At the time of commenting, there are 9,803 lines of code under source control. I don't feel comfortable approving a pull request that doubles the size of the repository in order to add a relatively minor feature.

stitzelj commented 7 years ago

I will add, as an aside, that I am planning to give both the prompts and the challenges sections a 'front page' layout similar to the index at some point.

ethel-t-frog commented 7 years ago

Looks nice at home. I'll update the production site as soon as I can.