Coder Social home page Coder Social logo

chicagopython / chipy.org Goto Github PK

View Code? Open in Web Editor NEW
114.0 30.0 78.0 5.42 MB

Chicago Python (ChiPy) user group main website codebase

Home Page: http://www.chipy.org/

License: MIT License

Python 68.61% HTML 23.66% JavaScript 2.12% CSS 4.50% Makefile 0.48% Dockerfile 0.28% Shell 0.33% Procfile 0.02%
chicago python usergroup chipy

chipy.org's Introduction

Chipy.org

This is the code for the Chipy.org website. This project is open source, and the license can be found in LICENSE.

CircleCI

Chipy.org uses the 12factor methodology. The site is normally powered by Heroku, but you can use Docker and Docker Compose for local development.

Installation

To get setup with chipy.org code, it is recommended that you use the following:

For Mac and Linux:

For Windows 10 Pro 64-bit, Windows 10 Home 64-bit:

Using Chocolatey to install Make

For Windows users, we recommend using the package manager Chocolatey to install Make.

  1. Install Chocolatey from https://chocolatey.org/install . Open Powershell as administrator when following the instructions.

  2. Once Chocolatey is installed, run the following command in Powershell (as administrator):

    choco install make

Setting up a Local Development Environment using Docker

Note: For a list of steps on how to make your first contribution, see CONTRIBUTING.md.

First, sign into your GitHub account. Make a fork of the ChiPy repo at https://github.com/chicagopython/chipy.org by going there and clicking "Fork" on the upper right corner.

Clone this forked repo to your local computer (replace your GitHub username without the brackets):

git clone https://github.com/<your-GitHub-username>/chipy.org.git chipy.org

Make the project directory your working directory:

cd chipy.org

Note: The make commands require Make to be installed, and Docker must be running. Please follow the Installation guide before running the below steps

Run the setup command to configure the environment. This will copy a default configuration file from docker/docker.env.sample to docker/docker.env.

make setup_env

You may customize the docker/docker.env as needed for your development needs. The docker/docker.env file should NOT be committed to version control.

To start the app, you can run the following command. This will start up the web app and a database as services using docker-compose.

make up

After running make up, you need to migrate the database. This will create the tables and database objects needed to run the site.

make migrate

You can confirm that the migrations were successful. To do this, run make shell , which gives you a Bash shell within Docker. Then run python manage.py showmigrations . This shows a list of all the migrations. Make sure each migration has a marked checkbox, such as [X] 0001_initial . Then exit out of the shell by typing exit .

Next, you should create a superuser to use to login to the site admin with.

make superuser

Finally, you should be able to visit your site by entering the following in your url bar:

http://localhost:8000

For local development, Social Auth will be disabled by default. Therefore, to log into the Django Admin interface, you will need to visit the following url and login with the superuser credentials that you created above.

 http://localhost:8000/admin/

Chipy.org uses Pytest to help ensure code is working properly. All tests must pass before merging code, and tests should be added as new functionality is added. If you would like to run tests for the app, run the following:

make test

Chipy.org uses Pylint to encourage good software development techniques. All Pylint checks must pass before merging code. If you would like to run the Pylint linting process, run the following:

make lint

Chipy.org uses Black to have consistently formatted code. We also use isort to arrange import statements correctly. Code must be formatted before merging code. If you would like to format code, run the following:

make format

Note: the command make format overwrites your files. Also, that command will format your entire local repo, not only the files that you may have created or edited. As a result, if it formats old, unformatted code, that will show up as a diff in your pull request. To see a preview of what formatted code would look without overwriting your files, run the following:

make format-check

If you want to execute a shell into your container, run the following: once your app is running with make up:

make shell

If you want to see the application logs, use the following command. To stop viewing the logs, you can press ctl-c.

make tail-logs

The site is pretty bare when there is no data in the database. Use the below to create some data in the database.

make dev-data

To run an arbitrary Django management command, you can use the following form. The below example shows you how to run the help management command, but other Django management commands can be run the same way.

docker-compose exec web ./manage.py help

Heroku Commands

This application is deployed to production using Heroku. You should not need to use these for basic site development, but are provided here as a guide for people deploying the site to Heroku.

# Tag the release
git tag -m x.x.x x.x.x
git push --tags

# Deploy changes to master
git push heroku master

# Collectstatic
heroku run python manage.py collectstatic --noinput

# Set sync and migrate the database
heroku run python manage.py migrate

# Set environment variable on Heroku
heroku config:set DEBUG=False

Tagging

This repo uses date-based tagging as it is not a library (normally semver). To create a new tag run make tag. Tags should be created at every deploy.

Heroku Testing

It is recommended that you deploy to a personal Heroku account to test, but regardless you can deploy a feature branch with the following command:

# Deploy feature branch
git push heroku feature/mybranch:master

Alternate Local Development

You can use make up-services to start the background services locally. Then, if you copy docker/docker.env to .env you can use pipenv to run the service locally: pipenv run python manage.py runserver.

If you develop locally you are on your own! All contributions must work in docker. This path requires Python and Pipenv installation knowledge.

chipy.org's People

Contributors

adeolapure avatar alysivji avatar bhchance avatar brianray avatar camrudnick avatar carlfk avatar cdfuller avatar cjoshmartin avatar ctxlken avatar db654 avatar dependabot[bot] avatar elmq0022 avatar emperorcezar avatar jerry-dumblauskas avatar joejasinski avatar kaushikprasanth avatar kdurance avatar lschumm avatar mnewsome avatar ne0zen avatar nickymarino avatar patrickboland4 avatar raymondberg avatar selecsosi avatar smandekar1 avatar sophm256 avatar spark-c avatar stepianno avatar tanyaschlusser avatar tathagata avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

chipy.org's Issues

Pull RSVPs from Meetup.com

Here are the features for the meetup.com integration:

  • (MVF) automatically pull and push RSVP from one site to another. Chipy.org is the official
  • allow publishing to pull or push the actual meeting settings (this is a nice to have, not required, we can always enter info twice)
  • automatically subscribe users to the mailing list when the join the chipy.org site or meetup.com (again, nice to have)

github based login is broken

Click login. Click github option. receive stacktrace.

Environment:

Request Method: GET
Request URL: http://chipy.herokuapp.com/login/github/

Django Version: 1.4.3
Python Version: 2.7.3
Installed Applications:
['grappelli',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.humanize',
'django.contrib.staticfiles',
'django.contrib.flatpages',
'social_auth',
'gunicorn',
'interval',
'gravatar',
'flatblocks',
'tinymce',
'flatpages_tinymce',
'honeypot',
'django_forms_bootstrap',
'about',
'meetings',
'profiles',
'contact',
'django_extensions']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware')

Traceback:
File "/app/.heroku/python/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response

  1.                     response = callback(request, _callback_args, *_callback_kwargs)
    
    File "/app/.heroku/python/lib/python2.7/site-packages/social_auth/decorators.py" in wrapper
  2.             raise WrongBackend(backend)
    

Exception Type: WrongBackend at /login/github/
Exception Value: Incorrect authentication service "github"

Link to change my RSVP broken

http://chipy.herokuapp.com/meetings/rsvp/anonymous/u8shbe10s3drv9d7tq61s14rj5tm4b49yz0ezj24/

Creates the following traceback:

Environment:

Request Method: GET
Request URL: http://chipy.herokuapp.com/meetings/rsvp/anonymous/u8shbe10s3drv9d7tq61s14rj5tm4b49yz0ezj24/

Django Version: 1.4.3
Python Version: 2.7.3
Installed Applications:
['grappelli',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.humanize',
'django.contrib.staticfiles',
'django.contrib.flatpages',
'social_auth',
'gunicorn',
'interval',
'gravatar',
'flatblocks',
'tinymce',
'flatpages_tinymce',
'honeypot',
'south',
'django_forms_bootstrap',
'about',
'meetings',
'profiles',
'contact',
'django_extensions']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'libs.middleware.ChipySocialAuthExceptionMiddleware')

Traceback:
File "/app/.heroku/python/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response

  1.                     response = callback(request, _callback_args, *_callback_kwargs)
    
    File "/app/.heroku/python/lib/python2.7/site-packages/django/views/generic/base.py" in view
  2.         return self.dispatch(request, _args, *_kwargs)
    
    File "/app/.heroku/python/lib/python2.7/site-packages/django/views/generic/base.py" in dispatch
  3.     return handler(request, _args, *_kwargs)
    
    File "/app/.heroku/python/lib/python2.7/site-packages/django/views/generic/edit.py" in get
  4.     form = self.get_form(form_class)
    
    File "/app/chipy_org/apps/meetings/views.py" in get_form
  5.     form = super(RSVP, self).get_form(form_class)
    
    File "/app/.heroku/python/lib/python2.7/site-packages/django/views/generic/edit.py" in get_form
  6.     return form_class(**self.get_form_kwargs())
    
    File "/app/chipy_org/apps/meetings/views.py" in get_form_kwargs
  7.             meeting = Meeting.objects.get(pk = self.request.POST['meeting'])
    
    File "/app/.heroku/python/lib/python2.7/site-packages/django/utils/datastructures.py" in getitem
  8.         raise MultiValueDictKeyError("Key %r not found in %r" % (key, self))
    

Exception Type: MultiValueDictKeyError at /meetings/rsvp/anonymous/u8shbe10s3drv9d7tq61s14rj5tm4b49yz0ezj24/
Exception Value: "Key 'meeting' not found in <QueryDict: {}>"

Change your RSVP email has wrong url link

The hyperlink in the email body points to 'example.com/meetings/rsvp/anonymous/....'

I think the fix is:

  • Log into Admin site
  • Go to Sites
  • Change Domain name to 'chipy.org'

Can't Login

When I try to login to the chipy.org website using my google credentials it doesn't log me in. Neither does logging in with my Github credentials.

Steps to reproduce.

  1. Click login link
  2. Click google button or github button

My talk isn't listed as released but I gave permission

I gave permission but released is false.

    {
        "id": 54,
        "title": "A SciPy recap: Tracking history and provenance with Sumatra",
        "presentors": [
            {
                "id": 53,
                "name": "Sheila Miguez",
                "release": false,
                "email": ""
            }
        ],
        "length": "0:05:00",
        "description": "This lightning talk recaps a [talk on Sumatra](http://pyvideo.org/video/2039/using-sumatra-to-manage-numerical-simulations-sc) from the reproducible science track at SciPy2013.",
        "embed_video": "",
        "slides_link": "",
        "start_time": "2013-07-11T20:01:00",
        "approved": true,
        "license": "CC BY"
    }

Migrate past meetings

We need to migrate past meetings.

Also, at some point the speaker and locations got corrupt. Perhaps the initial_data.json that was originally used in the old site was correct and new versions that got stepped on in the mentorship program was wrong. (PK mismatched?).

I can help investigate.

Heroku does not accept http://chipy.org

Changed the CNAME to chipy.org and I get:

"Heroku | No such app
There is no app configured at that hostname.
Perhaps the app owner has renamed it, or you mistyped the URL."

If I change it to www2.chipy.org, then it works. Can it be configured to accept chipy.org to chipy.herokuapp.com?

github signin not working

When I try to sign in with github, I land back on the main page with a notification "Authentication failed: redirect_uri_mismatch"

Investigate spam

I'm seeing a lot of @msn.com in a row with only first name. fishy.

add information on how to sponsor or host chipy events

We have a page with venue requirements that was created by Carl a while back, but that is written from an AV perspective. We could have an informational page about hosting events that is more general. We could talk about different types of events and how sponsors can host each type of event, for example

  • events with talks (like our monthly meetings)
  • social events
  • project nights
  • sprints

Maybe this could be something that Asheesh might have as part of https://github.com/paulproteus/python-user-group-guide

and then we could have an entry form for prospective hosts where they answer questions. also, we'd get a database of information about hosts that way.

Json metadata export

Allow for JSON to be generated by the site in the format that Carl Karsten requires so that he is able to record videos without manually importing data.

get RSVP list out for meetings

I need an easy way for an admin to share an RSVP list with the attendees first and last name.

Is it possible to create a link with a secret hash for every meeting I can just forward to the building's security department. They should change for every meeting.

Allow presenters to edit their related urls

I'd like to be able to add a url for my talk slides or related materials after a talk is accepted. I don't have slides for my upcoming talk, because I haven't made them yet. Once I do make them, I'd like to link them to the talk.

I can see how this could be a problem in some ways. For example, what if my talk got accepted based on some slides, but then I change the slides. Those didn't accepted. So, this might not be a good enhancement.

I usually add related links to my talk when it goes on youtube and pyvideo due to having supa admin powa. But a little unfair to everyone else.

How should topics be added

When someone submits a topic, should it attach to a meeting and be in a pending state, or should it float around until an admin attaches it?

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.