Git Product home page Git Product logo

website's Introduction

drawpile.net website

This is the source code to the drawpile.net website.

Setup

First, create a database for the site. (The official site uses PostgreSQL, but MySQL or even SQLite should also work for development)

Next, create a Python 3 virtualenv for the project and run pip install -r requirements.txt

Copy drawpile/local_settings.sample to drawpile/local_settings.py and edit to suit your environment.

Run ./manage.py migrate to initialize the database. Run ./update-assets.sh to populate the database with the basic content.

Run './manage.py dpauth' to generate a keypair for external authentication. Copy&paste the output into your local_settings.py file.

You should now have a local copy of the website, ready for development!

If you want to modify the JavaScript files, you need node.js. To set things up, run npm install. To build and bundle the scripts, run npm run build:all.

Deployment

Install gunicorn in the virtualenv:

`pip install gunicorn`

See the file website.service for a sample systemd unit file for running gunicorn.

Configure nginx to proxy the site:

server {
	... server configuration ...

	location / {
		proxy_pass http://127.0.0.1:8000/;
		proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
		proxy_set_header Host $http_host;
		proxy_redirect off;
	}

	# Static files
	location /media {
		alias /home/website/website/allstatic;
	}

	# Release archive
	location /files {
		alias /home/webfiles/www;
		access_log /var/log/nginx/files_access.log;
		autoindex on;
	}
}

See also: http://docs.gunicorn.org/en/stable/deploy.html

Finally, remember to run ./manage.py collectstatic to gather all static files in one place.

Django apps

This project is made up of the following custom Django apps.

Dpauth

This app contains the external authentication/single sign on implementation. Other than the external deps listed below, it is completely self contained and is custom user model aware, so it can be easily used in other projects with no modification.

The management command dpauth will generate a random public and private keypair for signing login tokens. See also dpauth/settings.py for adjustable settings.

This app has the following external dependencies:

  • Django Rest Framework
  • Ed25519
  • Confusable_homoglyphs

Dpusers

User account related stuff. Login, signup and profile editing views.

Templatepages

This app contains utilities for creating (mostly) static pages using Django templates.

The following things are stored in database:

  • Images: uploadable images for which thumbnails can be generated.
  • Template variables: Fetch key/value pairs from the database

Management commands are provided to help manage uploaded images and templatevars.

News

This is a very simple blog engine used for the news page.

A management command for importing and exporting posts is included.

Django permissions

The following Django permissions are used outside the admin site:

  • dpauth.moderator - global Drawpile moderator

License

The source code is licensed under the MIT license. The static website page content (article text and illustrations) is licensed Creative Commons Attribution-ShareAlike 4.0

website's People

Contributors

askmeaboutlo0m avatar awesomequbic avatar bytewavemlp avatar callaa avatar codyeakins avatar comradekingu avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

website's Issues

Clean up news?

Is there any way to clear news before initiating this website? I'm going to try to give this one more go, but I'm getting errors on the dates in the news posts, that's what hung me up before. I'll replicate later if you need to see that. But I won't need the news, so what's the easiest way to clear out the news posts? Deleting from the cloned repository under assets made it unhappy, so I'm sure I'm missing something here.

Trying to edit group

When I click the edit button for the group it take me to a server Error (500)

tablet

so this only happens on drawpile for some reason and idk how to fix it
sometimes it appears, sometimes it doesnt
when i try to draw it makes a white circle around my cursor and would draw a straight line after
if i would try and draw a curved line, it would be straight lines
its not smooth
image

cant log in despite correct information?

hey!! so im trying to make an account on the drawpile website, and i figured that i just mustve forgotten my password or smth so i reset it-- and despite knowing i very much put in the correct password i was still told that i was putting in incorrect information.

i dont recall ever changing my username, unless i was wrong about how putting in a different nickname doesnt change your account name. in which case, i'd have no idea what my current username would be due to the fact that i used to use a different one everytime i went into certain public boards.

(Feature?) NSFW Session invite links.

To limit liability, Session links or Invites that lead to NSFW boards should have a warning as when viewing a NSFW community for the first time.

image

Drawpile isn't responsible for what's going on in the session behind the link above. This page just provides a shortcut for convenience. Does limit liability but it's not such an obvious warning, as the I'm 18 years or older page. If the warning couldn't be placed behind the invite shortcut. A more obvious piece of text, could perhaps be considered!
image

Instant theme download!

image
You used to just click on one of these links and it would download the theme for you, now it opens Github and you have to find the button to download it on your own. Suggestion is to have a second download link that just instantly downloads the theme.
image

Crop - Preview selection in Web Gallery.

Hi,

I recently was exploring my user account in Drawpile.net, to imagine more ways to merge the experience between Drawpile and its web page.

In my personal opinion, the Gallery is one of the strongest points to use and know Drawpile, because every draw a person did, can be stored and shared in this place.

I was exploring my own gallery (sadly I just have 1 picture in it), and remember why I didn't used a lot, like my main option to store my drawings:
https://drawpile.net/gallery/user/2857/?tab=drawings

This is what I see when I first come in:
image

If I do a mouse over at what seems like an empty spot, the problem shows up:
image

This is the actual image:
image

The problem for me, was that I can't select what part of the image I want to use to apear as a preview / thumbnail of the image, because it is picked automatically.

Why is this important?

  • A lot of artist like the details, and be able to know with anticipation "how it will see in the gallery" make them very happy.
  • You can end with apparently empty spots like mine in the gallery.
  • It can attract to more users, to share their content in the Web (for me it was the main issue, why I didn't continue sharing)

Regards

Confirmation sign up email

So the issue is that the sign up confirmation email wont go through. I tried to send it a couple of times but it doesnt show up anywhere. plase help

File Type Save Options?

So Drawpile is a fantastic tool to be able to co-op on drawing projects and one of the absolute best ones out there I have found. It's fantastically user-friendly, has a wonderful selection of features to allow fantastic variation in both art style and detailing, and runs wonderfully smoothly in the user interface. Unfortunately, one of the biggest and sadly one of the hardest problems I've found with it is the file type support or lack thereof. As an art program that allows you to create and edit images with layering support, it's rather a crying shame that the only file type it can both save in and upload is .ora files. That one fact makes trying to move any picture you may have created with someone else into a different art program nearly impossible without a secondary middle program to change the file type, if most people can even find that. I do really and truly love and appreciate this program, but I really do wish it added just a bit more support there. Even just adding a simplified version of a .psd would be incredibly welcome, since even most non-photoshop art programs still have support to both save and load files of that type. This is only a suggestion, and sadly I know so little about exactly how filetype saving works, so a request like that might be a lot more difficult then I think it is, but all the same. I'm sure I'm not the only one who would so greatly appreciate such a feature.

Thank you for your consideration of this though and even more for making a program like this possible in the first place. I hope to hear back from you soon.

-LupinWulf

missing favicon in the website

I know this isn't the best place for this post but I don't know how to proper post it elsewhere.

So, I suggest to add this piece of code inside the <head> tags of the website:
<link rel="icon" type="image/png" href="./16x16.png" sizes="16x16">
<link rel="icon" type="image/png" href="./32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="./48x48.png" sizes="48x48">

Alternatively, you can use and declare the favicon.ico (multiple sizes of the icon in a single file):
<link rel="icon" href="./favicon.ico">

(ps: usually the browsers can automatically find the favicon.ico when in root folder, without the declaration)

Icons avaible for download in the link: https://mega.nz/#!UQQjDRgR!iROFUW8OKn3V9tWKwmjjh537vUon_aqm1QHCBxSOE9w

Disawllow Self Demoting

Public server admins should not be able to demote themselves.
Could be more elaborate, for example allowing it when another admin has been appointed,

Password reset, not receiving emails

I've tried to reset my password several times and tried to make a new account as well and I'm not receiving any emails at all. There's nothing in my junk mail folder either.

Connection problems, I think?

I open up drawpile and can select and join a few of the rooms. However the majority of the most popular ones come up with a pop up saying "Invalid state!" This didn't used to happen as I was able to join them weeks before?

Allow computers to draw with touchscreen?

I was thinking it would be useful to have a feature that allows you to draw with the touchscreen because some people may not own a tablet. You can move the canvas around by using two fingers which also allows you zoom in/out and to rotate it, while drawing with only one finger.

No verification email

Tried signing up, but got no verification email. Tried using two emails. Only been waiting a day.

Brush Pointer/Caret switching to standard pointer randomly w/ 2.1.6

Hello,

I just upgraded to the newer 2.1.6 version. I'm having issues with a strange bug where the brush pointer region randomly turns into a normal arrow pointer. It then stays a pointer for a while then may switch back. It occurs frequently enough to be annoying.

I'm using a lower end tablet, Parblo A610. Removing pen sometimes resets the process. Dabbing strokes - quick and with some lift off the tablet seem to trigger this faster. It was never an issue before. The last version I had was 2.1.2 so there is the range of updates.

All the new updates and features are looking awesome. I can tell that Drawpile is a work of passion - I love using it.

Thanks for your time,
Rob

Email change

When i try to change my email/update to a new one i currently use, it immediately leads me to a white page with just Server Error (500) no matter how many times i go back and try to update my email.

Drawpile unable to Open MacOS High Sierra

I updated to Drawpile 2.0.11 after the comments were not able to open and I wasn't able to move the canvas more than zooming in and out. After updating it I have not been able to open the program since. I have updated my computer and went through all the measures to make sure that I can run the program, but no matter what I always receive this:

**Drawpile cannot be opened because of a problem.

Check with the developer to make sure Drawpile works with this version of macOS. You may need to reinstall the application. Be sure to install any available updates for the application and macOS.**

I have already tried to uninstall and reinstall 2.0.11 but it came up with the same message. Can someone please help or y'know fix the hell out of whatever bug this is. C'mon Drawpile.

Error message: Group Membership needed

I am trying to use this project to build an independent ex-auth server.
After everything is completed, I create communities on the website, just like in drawpile.net.
When I do not set User Group in the dp-srv, the client connects normally and the moderator has permission. Everything seems normal.
But when I set the User Group to Community Sulg in the dp-srv, the client cannot connect.
image
Error message: Group Membership needed.
Am I missing some necessary actions? T T

pen pressure not working on drawpile

I have recently downloaded drawpile for collaborations with other artists but we just can't figure out how to enable the pen pressure. Can anyone help me?

Unable to remove alternative usernames or make a username primary.

Hello! I hope this is the correct place to report this. I was experimenting with what I could put as my alternative usernames for fun, and I put symbols, which has caused errors when I have tried to remove them on the website. All three of these usernames work on drawpile and there are no issues there as far as I know.

The three alternative usernames that are causing issues are:

%
///
lover.

They all have three separate error messages when I have tried to remove them or make them primary.

error message for % (for both removing and setting as primary) - SyntaxError: Unexpected token '<', " <h"... is not valid JSON
image

error message for removing /// - Error: {"detail":"Method "DELETE" not allowed."}
image

error message for setting /// as primary - Error: {"detail":"Method "PATCH" not allowed."}
image

error message for lover. (for both removing and setting as primary) - Error
image

I would actually like to keep "%" and "lover." but I would like to have the ability to remove them or make them my primary username if possible. Thank you for your time!

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.