Giter VIP home page Giter VIP logo

k666's People

Contributors

orionblastar avatar procrasti avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

k666's Issues

Create Template Fragments

Depends: #5
Branch: fragments* (without the *, means see below)

Let's bring all that stuff from the static into the dynamic page, but we'll break it into separate fragments you can include from the index.html page.

  1. create a file called:
    ./freek666/templates/fragments/welcome_user_fragment.html
  2. copy all the stuff I told you to do in #5, from the templated index.html file into it.
  3. Replace all that in the template/index.html with one line
    {% include "fragments/welcome_user_fragment.html %}
  4. Add all the html stuff from the static index to the template/index.html file.

----- BEGIN EXAMPLE OF template/index.html -----

<html>
    <head>
        <title>Welcome to K666</title>
    </head>
     <body>
        <h1>Welcome to K666</h1>
        <p>Free Speech as in Open Source.</p>
        {% include "fragments/welcome_user_fragment.html" %}
        <pre>
Welcome to the K666 Open Source Generic Discussion Forum, Feel Free to Fork Anytime:
Git Hub Repository: https://github.com/orionblaster/K666
        </pre>
        <p><a href="/admin">Admin</a></p>
        <p><a href="/index">Index</a></p>
        <p><a href="/login">Accounts Login</a>: but this probably doesn't work?</p>
        <img src="/static/images/up.jpg" />
        <img src="/static/images/down.jpg" />
         <img src="/static/images/FreeK666.png" />
         <img src="/static/images/FreeK666coin.jpg" />
         <div><img src="http://i.imgur.com/B8sO2Hd.jpg" /></div>
         <p>Donations: <a href="https://www.blocktrail.com/BTC/address/1Dy5rLHwt8wk79C6jfH6uRf2bpcVnJtNyQ">bitcoin:1Dy5rLHwt8wk79C6jfH6uRf2bpcVnJtNyQ</a></p>
     </body>
</html>

----- END EXAMPLE OF template/index.html -----

Now probably fragment all of the other stuff out too... examples:
- fragments/intro_fragment.html
- fragments/common_links_fragment.html
- fragments/images_fragment.html
- fragments/donations_fragment.html

And then maybe even:
- fragments/title_fragment.html (Welcome to K666)
- fragments/tagline_fragment.html (Free Speech As In Money)
- fragments/page_header.html (includes title_fragment.html and tagline_fragment.html, marked up with html)

----- FINAL EXAMPLE OF templates/index.html -----

<html>
    <head>
        <title>{% include "fragments/title_fragment.html" %}</title>
    </head>
    <body>
        {% include "fragments/page_header_fragment.html" %}
        {% include "fragments/welcome_user_fragment.html" %}
        {% include "fragments/intro_fragment.html" %}
        {% include "fragments/common_links_fragment.html" %}
        {% include "fragments/images_fragment.html" %}
        {% include "fragments/donations_fragment.html" %}
     </body>
</html>

----- END FINAL EXAMPLE OF templates/index.html -----
(please indent it nicely though... posting into github messes that up... how to post blocks of code with correct formatting? would be good to know for kr5ddit too... we probably use the same markup engine!)

Which would be a lot nicer, right?

*: You can push branches into your github repository as follows, full example from fragments

# Clone the repository into a working directory, and change into it
$ git clone https://github.com/orionblastar/K666 k6fragments
$ cd k6fragments

# Branch from mergetest... it's the latest thing... we haven't merged it into master yet... anyway.
$ git branch mergetest

# Create the branch you are going to work on, and switch to it
$ git branch fragments
$ git checkout fragments

# Push the new branch back to the original repository... you can do this at any time, before or after you've made commits for example.
$ git push -u origin fragments

# Now view that branch on github!

kr5ddit.com is down, DNS errors

I forgot your email address so I am making an issue.

The main Kr5ddit site is down with DNS issues. It has been a few days, did your DNS settings change?

Add User Signup

Depends: #6
Branch: signup

We're going to use django-allauth (https://github.com/pennersr/django-allauth) to allow our users to login and signup, because it has many advantages over the the admin/login, and admin doesn't give us user registration anyway.

Take a quick read through of the docs: http://django-allauth.readthedocs.io/en/latest/

Pretty much do everything on the install page, but don't configure any social apps yet... maybe we'll do google later...

Instead of doing pip install django-allauth, update the setup.py to include django-allauth as a depency.

Now change the links on your static page to /accounts/login and /accounts/logout.

Integrate django-messages

Depends: #8
Branch: messages

We're going to integrate django-messages so users can PM each other!

First steps:
- add django-messages to setup.py
- add django-messages to k666/settings.py
- add django-messages to k666/urls.py
- add link to inbox somewhere.

Replace fixed urls with their names.

After you've completed the first tutorial, you will see you can name urls, and we shouldn't link to them with hardcoded urls, but by their name.

So, in common_links and the other fragments, replace the hardcoded urls with:

For example,

{% url 'inbox' %}

Do the same with static files, but they aren't named, but you drop the /static/ from them:

{% static 'up.jpg' %}
{% static 'index.html' %}

Merge startup into master

BUT DON'T DO IT DIRECTLY.

Priority: HIGHEST
Branch: mergetest

I want to see how your merge goes, and do the final merge myself, or at least check that a merge from it will create exactly what I want it to.

So: DON'T MERGE STARTUP INTO MASTER

Instead, you want to branch master to a new branch (mergetest, from above), merge in the changes from startup into mergetest, fix anything and commit the changes (if something must be fixed), and then push the new branch to the github repository.

$ git clone https://github.com/orionblastar/K666 k6mergetest
$ cd k6mergetest
$ git checkout master # Unless you've reset the default back to master, but doesn't hurt
$ git branch mergetest # Create the mergetest branch
$ git checkout startup # Get a local copy of startup
$ git checkout mergetest # Switch to the mergetest branch, and work on it
$ git merge startup # Bring in all the changes from startup, you might need to fix conflicts here

Make any other changes, but this is a mergetest branch, so rather, don't make any changes... more than likely.

You will have to resolve the conflicts in REAMDE.md, and commit the changes.

$ git push -u origin mergetest # To push the new branch to the repository...

The mergetest branch should be trivial to merge into master and freek666, even with the github UI... You can feel free to merge into freek666 as you see fit... I'll merge mergetest into master for you, or at least check it.

Do the django tutorial!

Linux issues

I think using Linux MInt might have been a mistake. I tried installing Tensorflow and got this error

tensorflow-0.12.0rc0-cp27-none-linux_x86_64.whl is not a supported wheel on this platform.

Linux Mint is supposed to be easier to use and configure that Ubuntu and Debian and others. It does not support every wheel and library. Which might be why VirtualBox died on me and I can't seem to get Docker to work correctly.

I'm thinking of going back to Lubuntu as Ubuntu has that Unity crap, and Debian only has older packages because they want to stay stable.

OB BROKE MASTER

Sorry everyone, OB accidentally checked in some changes to master, which have temporarily broken the build, we are working on this issue, will do our best not to break the build in the future, and will restore normal operation shortly.

  • merge in the changes from messages-fixed into messages
  • check that it runs according to the README.me, from git clone to localhost:8000 (hint, blow away dist, env, build and k666.egg-info and rerun k666-env.)
  • and all the changes are in origin/messages
  • merge messages into master
  • double check master runs from clone to localhost according to the README.

Travis CI integration

You need to create an account on travis-ci.org, and enable building of the orionblastar/K666 repository.

Build success or failure doesn't matter, we'll be able to update the .travis.yml file afterwards to get it working, but I cannot enable your repository for you.

Change default branch back to master.

You can git clone and then git checkout FreeK666, if that's the branch you are working on... the default for this project should be K666... and the branch for synching with FreeK666 the repository.

Add a login link

Depends: #5
Branch: loginlinks

Add a login link to the static and dynamic index.html pages...

I think just a simple href to /admin/login

Extra Kr5ddit: Add a logout link to the pages to... /admin/logout

Now you can test login and logout... Notice that users can't register yet, you'll have to create them manually with the admin user in the admin pages.

Standardise Base View

Branch: basehtml
Depends: #12

TODO:

  • Get base.html template from allauth, and put into freek666 templates
  • edit index.html to use base.html template
  • put our headers in base.html so they show up everywhere.
  • make sure we have sidebar block in our base.html for messages

Okay, now you'll see that our index page, and the signup and messages pages, have nothing in common!

We're going to fix that.

I want you to take the base.html template file from allauth, and copy it into freek666/templates/base.html

Then, you're going to use it from our index.html file!

So, new index.html:

{% extends "base.html" %}

{% block head_title %}
    {% include "fragments/title_fragment.html" %}
{% endblock head_title %}

{% block content %}
    {% include "fragments/page_header_fragment.html" %}
    {% include "fragments/intro_fragment.html" %}
    {% include "fragments/images_fragment.html" %}
    {% include "fragments/donations_fragment.html" %}
{% endblock content %}

You can see that when you name a block, it replaces the block in the template it is extending!

Now, to bring what we have in the index.html to the other pages, take the page header fragment, and the donations fragment, and put them in base.html instead... Now, they will appear on every page! Our index, the accounts pages, and the messaging pages!

How cool is that!

Compliance with COPPA

In the USA there is a COPPA law that protects children under 13. Scoop did not have this nor does Hacker News and other sites. Each violation is fined $16K USD, not per user but per use.

It is a simple term of service EULA that the user answers a question that they are 13 or over and we store their response in the database. If under 13, we tell them to get their parents to approve to create their own account to check out our system, and not create an account for the children.

Anyway, we need to think of terms of service TOS and EULA or whatever. I might have written one at some time in the past. We need to be able to follow the law and keep the kiddies safe from the creeper guys or whatever.
https://www.ftc.gov/enforcement/rules/rulemaking-regulatory-reform-proceedings/childrens-online-privacy-protection-rule

I think it is safe to bet that most Kuro5hin/Kr5ddit etc users are 18 or older, and greybeards like Tdillo or Crawford. You never know when some innocent kid stumbles onto one of these troll sites or whatever and sees something they shouldn't, or someone says/writes something to them that they shouldn't.

In other words no kiddie pool, adult swim only.

Link back to home (/)

I think we need the 'FreeK666' page heading to link back to the root url. We can move an icon up there and make that a link too...

  • Update urls so that the root renders the index.html template directly, and not redirect to /index.html
  • Make the site name a link back to root...

django-messages fails with django>1.8

Depends: #12
Branch: messages

django-messages is a bit broken, I suggest we:

  • fork it here
  • get setup.py to use our version
  • merge in other people's fixes after reveiwing them.
  • remove the need for pip unzip django_messages in k666.env
  • get setup.py to use the latest version of django
  • close this issue!

Branch FreeK666 to freek666

But don't delete the FreeK666 branch just yet...

Though, will be soon enough.

lowercase is a lot easier to work with... and it also easier to differentiate between the branch and the respository... but the rules for lowercase is also true of a repository...

Host This Somewhere

We should the latest version of K666... so we can try it out as we work on it?

Maybe?

Code of Conduct Proposal draft

Under a creative commons license.

This could be a code of conduct for our projects that other people might want to use as well. Feel free to edit or change anything before we finish it and use it.

#1 No drama or politics, issues should be about programming issues, feature requests, bug reports, and other stuff of a technical nature.
#2 If a contributor or admin or anyone else working on the project makes a social network or forum or other discussion on some other site, don't come here and request that person be removed from the project. People have different opinions on things and they have as much right to their opinion as you do. Having a different opinion does not mean you should censor them or throw them off a project. This repository is not about feelings, politics, drama, so we can focus on technical issues.
#3 If you want to join in just ask the contributors. If you can't program maybe you can find someone who does that can help? Besides programming you could contribute with the documentation and README.md files, even fixing spelling and grammar errors. If you speak a language other than English you could translate our documentation and README.md to another language.
#4 We value our time with our families and time off and etc. We can't be expected to code 24/7 so it will take some time to get through the issues. We do this work in our spare time to develop better free and open source software and this isn't the only repository we work on. So be patient with us getting to your issue. Usually we fix one issue at a time.
#5 If you are a feminist or social justice warrior joining Github looking for a fight. We believe in equal rights for everybody that includes freedom of speech for everybody. We don't care if your skin is green and your gender changes and you are from Mars or something, as long as you can write code and documentation and other stuff without getting into an debate with us. If you are a special little snowflake who gets triggered by GNU/Linux commands like 'kill' to stop a program, then don't join this repository and join some other one who can create a safe space. Be warned that we used to be trolls and have a thick skin to your insults and can trade you one for the other.
#6 Use a new branch when you are adding a feature or fixing an issue. Name the branch after what you are trying to do so it makes sense to us. Let us know what you are doing with it and test it out before you make a pull or push request.
#7 If you find copyrighted content tell the contributors about it so we can change it or delete it. Sometimes people put things in our repository or they end up there by mistake.
#8 Don't put passwords and API keys into this repository, hackers run robots looking for them and will steal your accounts and cost you money.
#9 If you submit bad code don't get upset by it, just learn from it. We all make mistakes and some people are still learning how to code. Ask for feedback on why the code was rejected, you might have forgotten to test it before putting it in the repository.
#10 Don't panic, anxiety and fear are the mind-killers. Take time off if you feel afraid, angry, have anxiety or some other thing. We want you at your best to write code for this repository. So take a break or something and find something to do that relieves stress.

Create a FreeK666 Repository

Okay, Git only allows you to fork someone else's respository, and only for the same name, so this is how we're going to create a FreeK666 repository.

  1. Move the K666 repository out of the way, say, K666-OB
  2. Fork procrasti/K666 to OB/K666
  3. Rename OB/K666 to OB/FreeK666
  4. Move K666 back, Rename K666-OB to K666
  5. Merge in everything from the FreeK666 branch into the FreeK666 repository.

Done!

Remove static content...

branch: nobins

They should go in a release... but never in source.

We'll have to look into that.

Customise Template

Depends: #3
BranchName: showusername

Show the logged in users username:

Add this to templates/index.html

----- BEGIN CHANGES TO templates/index.html ----
Hello
{% with request.user as user %}
{% if user.is_authenticated %}
{{ user.username }}
{% else %}
Anonymous
{% endif %}
{% endwith %}
----- END CHANGES TO templates/index.html ----

Why is kr5ddit.com not working?

I went to check it, I was making posts on it and moderating with Kr5ddits and now it is down?

Is this because of what Tdillo was doing on DSMB? I've been trying to stay away from that site as you requested and not make any posts.

I've been sick with a cold and need lots of rest, caught it on vacation.

I haven't gone through the issues here yet, but it looks like you have a SSL error on your kr5ddit.com site.

I've been busy with things at home, helping my mother, my wife, and my son. I'm trying to find some free time to get back to the tutorial and issues here, but I'm not sure it is worth it if the main site is down?

There is PR to deal with, they more we troll TDillo and others, the less likely people will visit Kr5ddit.com, I tried to do some PR to make them feel better and people came to Kr5ddit.com as a result. But for some reason they stopped using Kr5ddit. I had hoped if I sold those 100 Kr5ddits for 10 mBTC that it would lower the market rate and other people could buy Kr5ddits. We got over 370 Kr5ddits in the site.

It is not about the money or the trolling, it is about creating a better system than Reddit or K5. The money will come in via donations when we get more people using the site, and have a good proof of concept we can show off.

Compose messages body textarea doesn't fit in mobile display

Have to make this resizeable, depending on the display size, and not a fixed column width.

I'm not sure the best place to do this.

Overriding the form directly (by copying compose.html from django_messages to freek666/templates/django_messages/compose.html), and taking the generated html and putting the form in manually, removing the cols setting and using something like "max-width: 90%; width: 100%;" as the style attribute in the textarea AND the form tags seems to work pretty well... but the forms aren't initialilsed correctly when they should already contain data...

So, we need to make it do something like that, and I'm not exactly where to do that... If it was my own custom form, maybe it would need a widget, maybe we should look at some django react forms module, can we extend the code in django_messages, or do we have to write our own, maybe we just make the changes in our own version of dango_messages?

This is a little bit of a hard problem, and we should solve it before getting too much else going on, so that we are always mobile device compatible.

Customisable User Stylings

Depends: #8
Branch: userstyle

You might think this is the last thing you want to do... but it's what people want to do I hear.

It will be a lot easier later on to do this now. Once you get going here, anonymous comment boards will be easy.

We're going to create a new application called userstyle, which will allow users to style the page as they wish. Every user will have as many styles as they wish, and we can share them between users.

Create a Dynamic Template

NewBranch: DynamicIndex

echo "HELLO TEMPLATES" > freek666/templates/index.html

Add the following line to freek666/urls.py:
url(r'^index.html$', TemplateView.as_view(template_name="index.html")),

Now go to /index.html and it you should see HELLO TEMPLATES.

Additional Credit: Redirect root (/) to index.html.

Disable admin login/logout

Branch: allauth

There are problems with the admin implementation of login and logout, and we should only use allauth...

Make sure you work on the allauth branch, make sure it is up to date with master, let me know when it's ready to merge into master.

You can use urls.py to redirect admin/login to accounts/login.

This won't stop us logging into the admin, it just means we use the allauth versions.

Introduce some CSS, Remove styling.

branch: css

  • In freek666/static create freek666.css
  • Remove all 'style' attributes in any of the elements in the html templates
    • Replace with appropriate classes and
    • Update freek666.css with the appropriate style for that element class

In general try and keep the css minimal, for now.

BUT ESPECIALLY keep style attributes out of the html templates from now on.

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.