A boilerplate application for Django web applications.
|
|
9 năm trước cách đây | |
|---|---|---|
| hackathon_starter | 9 năm trước cách đây | |
| .bowerrc | 10 năm trước cách đây | |
| .gitignore | 10 năm trước cách đây | |
| .pylintrc | 10 năm trước cách đây | |
| README.md | 10 năm trước cách đây | |
| bower.json | 10 năm trước cách đây | |
| requirements.txt | 10 năm trước cách đây |
A boilerplate application for Django web applications.
If you've attented hackathons, you already know how much time can be wasted figuring out what language to pick, which web framework to choose, which APIs to incorporate, and figuring out OAuth authentication. Django Hackathon Starter aims to provide these features out of the box, allowing the team to save hours of time getting these pieces together.
Even if you are not using this for a hackathon, Django Hackathon Starter is sure to save any developer hours or even days of development time and can serve as a learning guide for web developers.
This project relies on bower for front-end dependencies, which in turn requires npm. npm is now bundled with NodeJS, which you can download and install here.
For Python-specific libraries, this project relies on pip. The easiest way to install pip can be found here.
To get up and running, simply do the following:
$ git clone https://github.com/DrkSephy/django-hackathon-starter.git
$ cd django-hackathon-starter
# Install the requirements
$ pip install -r requirements.txt
# Install bower
$ npm install -g bower
$ bower install
# Perform database migrations
$ python manage.py makemigrations
$ python manage.py migrate
NOTE: We highly recommend creating a Virtual Environment. Python Virtual Environments allow developers to work in isolated sandboxes and to create separation between python packages installed via pip.
CONSUMER KEY, CONSUMER SECRET, TOKEN, TOKEN_SECRETsettings.py, add the following:
YELP_CONSUMER_KEY = Yelp Consumer KeyYELP_CONSUMER_SECRET = Yelp Consumer SecretYELP_TOKEN = Yelp TokenYELP_TOKEN_SECRET = Yelp Token Secretconsumer name fieldredirect url field, enter: http://127.0.0.1:8000/hackathon/settings.py, add the following:
MEETUP_CONSUMER_KEY = Meetup keyMEETUP_CONSUMER_SECRET = Meetup secret keyaccount_sid and auth_token herescripts/twilioapi.py:
account_sid with your own Twilio account_sidauth_token with your own Twilio auth_tokenApplication name and Homepage URL fieldredirect url field, enter: http://127.0.0.1:8000/hackathon/settings.py, add the following:
GITHUB_CLIENT_ID = Github-client-idGITHUB_CLIENT_SECRET = Github-client-secretApplication name, Description, and Website fieldCallback URL field, enter: http://127.0.0.1:8000/hackathon/settings.py, add the following:
TWITTER_CONSUMER_KEY = Twitter-consumer-keyTWITTER_CONSUMER_SECRET = Twitter-consumer-secretTWITTER_ACCESS_TOKEN = Twitter-access-tokenTWITTER_ACCESS_TOKEN_SECRET = Twitter-access-token-secretApplication name, Description, and Website URL fieldRedirect URI field, enter: http://127.0.0.1:8000/hackathon/settings.py, add the following:
INSTAGRAM_CLIENT_ID = Instagram-client-idINSTAGRAM_CLIENT_SECRET = Instagram-client-secretCompany Info, Application Info, and Contact Info sectionOAuth User Agreement section, select scopes neededOAuth 2.0 Redirect URLs field, enter: http://127.0.0.1:8000/hackathon/settings.py, add the following:
LINKEDIN_CLIENT_ID = Linkedin-client-idLINKEDIN_CLIENT_SECRET = Linkedin-client-secretsettings.py change the following values:
FACEBOOK_APP_ID = your_app_idFACEBOOK_APP_SECRET = your_app_secret![]()
http://localhost:8000).client_id and client_secret:settings.py change the following values:
GOOGLE_PLUS_APP_ID = your_client_idGOOGLE_PLUS_APP_SECRET = your_client_secrethttp://locahost:8000/home) and click add.App key and App secret.settings.py change the following values:
DROPBOX_APP_ID = your_app_idDROPBOX_APP_SECRET = your_app_secret
http://www.localhost:8000).http://locahost:8000/home) and click add.App key and App secret.settings.py change to following values:
FOURSQUARE_APP_ID = your_client_idFOURSQUARE_APP_SECRET = your_app_secret
Tumblr-consumer-keyTumblr-consumer-secretviews.py add the Key in key underneath the view for your steam applicationsettings.py add the following:
POPAPIKEY = Most Popular APITOPAPIKEY = Top Stories APIsettings.pyadd QUANDLAPIKEY = Key| Name | Description |
|---|---|
| hackathon_starter/settings.py | Django settings module containing database and API keys/tokens |
| hackathon/admin.py | Registered models for Django's admin page |
| hackathon/models.py | Django models and profiles for user login |
| hackathon/tests.py | Integration tests |
| hackathon/urls.py | Django Hackathon Starter URL dispatcher |
| hackathon/views.py | Django views file |
| hackathon/serializers.py | Allows JSON representation for Django Model fields |
| hackathon/forms.py | Basic form fields |
| hackathon/static/ | Front-end JavaScript / CSS files |
| hackathon/unittests | Unit tests |
| hackathon/scripts/ | API Example scripts |
| hackathon/scripts/github.py | Script for interacting with Github API |
| hackathon/scripts/instagram.py | Script for interacting with Instagram API |
| hackathon/scripts/linkedin.py | Script for interacting with LinkedIn API |
| hackathon/scripts/meetup.py | Script for interacting with Meetup API |
| hackathon/scripts/nytimes.py | Script for interacting with New York Times API |
| hackathon/scripts/quandl.py | Script for interacting with Quandl API |
| hackathon/scripts/scraper.py | Basic web scraper for getting sales from Steam |
| hackathon/scripts/facebook.py | Script for interacting with Facebook API |
| hackathon/scripts/dropbox.py | Script for interacting with Dropbox API |
| hackathon/scripts/foursquare.py | Script for interacting with Foursquare API |
| hackathon/scripts/googlePlus.py | Script for interacting with Google+ API |
| hackathon/scripts/steam.py | Script for interacting with Steam API |
| hackathon/scripts/tumblr.py | Script for interacting with Tumblr API |
| hackathon/scripts/twilioapi.py | Script for interacting with Twilio API |
| hackathon/scripts/twitter.py | Script for interacting with Twitter API |
| hackathon/scripts/yelp.py | Script for interacting with Yelp API |
| hackathon/templates/hackathon/ | Templates for API examples |
| hackathon/templates/hackathon/base.html | Base template, contains navbar |
We welcome contributions of all kinds. If you would like to know what work is needed to be done, check the issue tracker. Before sending a pull request, please open an issue. This project follows the pep-0008 style guide.
The MIT License (MIT)
Copyright (c) 2015 David Leonard
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.