{"action":"created","issue":{"url":"https://api.github.com/repos/pretix/pretix/issues/294","repository_url":"https://api.github.com/repos/pretix/pretix","labels_url":"https://api.github.com/repos/pretix/pretix/issues/294/labels{/name}","comments_url":"https://api.github.com/repos/pretix/pretix/issues/294/comments","events_url":"https://api.github.com/repos/pretix/pretix/issues/294/events","html_url":"https://github.com/pretix/pretix/issues/294","id":186488601,"number":294,"title":"Create a blacklist for slug validation","user":{"login":"raphaelm","id":64280,"avatar_url":"https://avatars.githubusercontent.com/u/64280?v=3","gravatar_id":"","url":"https://api.github.com/users/raphaelm","html_url":"https://github.com/raphaelm","followers_url":"https://api.github.com/users/raphaelm/followers","following_url":"https://api.github.com/users/raphaelm/following{/other_user}","gists_url":"https://api.github.com/users/raphaelm/gists{/gist_id}","starred_url":"https://api.github.com/users/raphaelm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raphaelm/subscriptions","organizations_url":"https://api.github.com/users/raphaelm/orgs","repos_url":"https://api.github.com/users/raphaelm/repos","events_url":"https://api.github.com/users/raphaelm/events{/privacy}","received_events_url":"https://api.github.com/users/raphaelm/received_events","type":"User","site_admin":false},"labels":[{"id":138847616,"url":"https://api.github.com/repos/pretix/pretix/labels/easy","name":"easy","color":"009800","default":false},{"id":127758044,"url":"https://api.github.com/repos/pretix/pretix/labels/enhancement","name":"enhancement","color":"84b6eb","default":true},{"id":138847905,"url":"https://api.github.com/repos/pretix/pretix/labels/pretix.base","name":"pretix.base","color":"bfd4f2","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/pretix/pretix/milestones/1","html_url":"https://github.com/pretix/pretix/milestones/1.0.0","labels_url":"https://api.github.com/repos/pretix/pretix/milestones/1/labels","id":2109004,"number":1,"title":"1.0.0","description":"","creator":{"login":"raphaelm","id":64280,"avatar_url":"https://avatars.githubusercontent.com/u/64280?v=3","gravatar_id":"","url":"https://api.github.com/users/raphaelm","html_url":"https://github.com/raphaelm","followers_url":"https://api.github.com/users/raphaelm/followers","following_url":"https://api.github.com/users/raphaelm/following{/other_user}","gists_url":"https://api.github.com/users/raphaelm/gists{/gist_id}","starred_url":"https://api.github.com/users/raphaelm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raphaelm/subscriptions","organizations_url":"https://api.github.com/users/raphaelm/orgs","repos_url":"https://api.github.com/users/raphaelm/repos","events_url":"https://api.github.com/users/raphaelm/events{/privacy}","received_events_url":"https://api.github.com/users/raphaelm/received_events","type":"User","site_admin":false},"open_issues":8,"closed_issues":1,"state":"open","created_at":"2016-11-02T09:38:19Z","updated_at":"2016-11-09T13:30:09Z","due_on":"2017-01-16T00:00:00Z","closed_at":null},"comments":8,"created_at":"2016-11-01T09:10:03Z","updated_at":"2016-11-18T14:10:31Z","closed_at":null,"body":"**Hey!** If you ever wanted to contribute to an Open Source project, but didn't know how, you just found a perfect place to start. We try to write this issue as instructive as possible, but as we're humans we almost certainly forgot to write something important in here. If you want to try to tackle this issue and get stuck at _any_ point, please do not hesitate and ask us, either here on GitHub or via email at support@pretix.eu. We'll be very happy to help! \r\n\r\nWe think this issue is very suitable to people who are just starting with Python or Django development or who never contributed to Open Source before. We'd like to ask people with wide experience in these areas to leave this issue to beginners. Thanks! (If you want something more advanced, just drop us a line, we'll find something :wink:)\r\n\r\n## How to get started\r\n\r\nFirst of all, you need pretix running locally on your machine. We have a guide on the developer installation [over here](https://docs.pretix.eu/en/latest/development/setup.html). Play around with it and get a feeling for what pretix is and how it works :) Try to find the places in the interface mentioned in this issue where something needs to change. Maybe try to find the same places in the code? Just searching for characteristic words can be a powerful tool to find your way around.\r\n\r\n## What this is about\r\n\r\nEvery event organized with pretix has a \"slug\", a short version of its name that we use for URLs. The same goes for organizers, so we often build URLs like ``https://pretix.eu/<organizer-slug>/<event-slug>``. This makes for very nice URLs, but it has the danger of conflicts with internal URLs of pretix, for example the pretix backend is at ``/control/``. What about an organizer with the slug ``control``? This will lead to confusion and should be forbidden.\r\n\r\n## How to do this\r\n\r\nTo avoid URL conflicts, we must validate that slugs (the short names for events and organizers that we use in URLs) do not have the following values:\r\n\r\nEvent slugs:\r\n* ``download``\r\n* ``healthcheck``\r\n* ``locale``\r\n* ``control``\r\n* ``redirect``\r\n* ``jsi18n``\r\n* ``metrics`` (#271)\r\n* ``_global``\r\n* ``__debug__``´\r\n\r\nOrganizer slugs:\r\n* ``download``\r\n* ``healthcheck``\r\n* ``locale``\r\n* ``control``\r\n* ``pretixdroid``\r\n* ``redirect``\r\n* ``jsi18n``\r\n* ``metrics`` (#271)\r\n* ``_global``\r\n* ``__debug__``\r\n* ``about``\r\n\r\nWe can do this by writing a custom [validator](https://docs.djangoproject.com/en/1.10/ref/validators/) and then add this to the slug fields in our ``Event`` and ``Organizer`` models.\r\n\r\n## I want to give it a try!\r\n\r\nYou're still reading, nice! If you want to try working on this, please comment below, so everyone else knows this is being looked at and can search for a different place to contribute. \r\n\r\nFirst, [fork](https://github.com/pretix/pretix/fork) the repository to your own GitHub account. Then clone it locally (or [set it as your remote](https://help.github.com/articles/configuring-a-remote-for-a-fork/) if you already cloned it earlier) and prepare your pull requests. There are a number of tutorials on the Pull Request workflow online, for example this [short version](https://guides.github.com/introduction/flow/) by GitHub itself and this [more in-depth tutorial](https://www.digitalocean.com/community/tutorials/how-to-create-a-pull-request-on-github). We're excited to see your pull request! \r\n\r\nAnd don't forget: If you get stuck, don't hestitate to ask. We bound ourselves to a [Code of Conduct](https://docs.pretix.eu/en/latest/development/contribution/codeofconduct.html) and we're committed to providing a welcoming experience and giving constructive, friendly and useful feedback on your contributions.\r\n"},"comment":{"url":"https://api.github.com/repos/pretix/pretix/issues/comments/261540059","html_url":"https://github.com/pretix/pretix/issues/294#issuecomment-261540059","issue_url":"https://api.github.com/repos/pretix/pretix/issues/294","id":261540059,"user":{"login":"chrisdamba","id":2035056,"avatar_url":"https://avatars.githubusercontent.com/u/2035056?v=3","gravatar_id":"","url":"https://api.github.com/users/chrisdamba","html_url":"https://github.com/chrisdamba","followers_url":"https://api.github.com/users/chrisdamba/followers","following_url":"https://api.github.com/users/chrisdamba/following{/other_user}","gists_url":"https://api.github.com/users/chrisdamba/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisdamba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisdamba/subscriptions","organizations_url":"https://api.github.com/users/chrisdamba/orgs","repos_url":"https://api.github.com/users/chrisdamba/repos","events_url":"https://api.github.com/users/chrisdamba/events{/privacy}","received_events_url":"https://api.github.com/users/chrisdamba/received_events","type":"User","site_admin":false},"created_at":"2016-11-18T14:10:31Z","updated_at":"2016-11-18T14:10:31Z","body":"Cool, will start working on this asap."}}
{"actor":{"display_login":"chrisdamba"}}