Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Updated installation instructions,add to Google Calendar Feature,share on Facebook #69

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,19 @@ comes with virtualenv built-in. So create a virtual env by:
1. `$ python3 -m venv Student_Council_Website`
2. `$ . Student_Council_Website/bin/activate`

virtual SCWebsite
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a nice idea to quote these commands. Adding ``` and mentioning the language around the code will do that for you.

For example by adding ```bash around the stuff you added allows you to get the following.

virtual SCWebsite
source SCWebsite/bin/activate
cd SCWebsite

will even pull up some nice syntax highlighting!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay. Will change that!
Thank you for suggesting!

source SCWebsite/bin/activate
cd SCWebsite

Install all dependencies:

pip install -r requirements.txt
pip install easy-thumbnails
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why don't you add these to the requirements.txt file so that we can avoid manual pip installations? You can do pip freeze > requirements.txt to get the updated package list from your virtualenv.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for suggesting @abhijithanilkumar !
Will do that!

pip install sendgrid
cd NITK-Student-Council-Website/src/
python manage.py makemigrations website
python manage.py migrate
python manage.py runserver

Run migrations:

Expand Down
48 changes: 48 additions & 0 deletions src/templates/news.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,20 @@
</div>
{% endblock %}

<!--
Format to add to my calendar:

<a href="http://www.google.com/calendar/event?action=TEMPLATE&text=[event-title]&dates=YearMonthDateTHoursMinute00Z/YearMonthDateTHoursMinutes00Z&details=DetailsOfTheEvent&location=Location&trp=false&sprop=&sprop=name:" target="_blank" rel="nofollow">Add to my calendar</a>
-->
<!--
Format to add share event on Facebook:

First add your AppID in the script tag at the bottom.

<div id="fb-root"></div>

<div class="fb-share-button" data-href="ENTER SHARE LINK HERE" data-layout="button_count" data-size="small" data-mobile-iframe="true"><a target="_blank" class="fb-xfbml-parse-ignore">Share</a></div>
-->
{% block content %}
{% load static %}
<link href="{% static 'site/css/message.css' %}" rel="stylesheet">
Expand All @@ -23,6 +37,32 @@
<li class="tab col s12" id="spotLights"><a href="">Spotlights</a></li>
</ul>
</div>
<div class="row">
<div id="campus">
<div class="col s12">
<div class="collection">
<a class="collection-item avatar" href="/news/{{item.id}}" style="padding-left:80px">
<img class="biggercircle" src="{{ item.thumbnail.avatar.url }}" alt="" />
<br><span class="title">Test</span>
</a>
<a href="http://www.google.com/calendar/event?action=TEMPLATE&text=Udaan&dates=20140127T224000Z/20140320T221500Z&details=Kite+Festival&location=NITK+Surathkal&trp=false&sprop=&sprop=name:" target="_blank" rel="nofollow">Add to my calendar</a>
<div id="fb-root"></div>
<div class="fb-share-button" data-href="https://developers.facebook.com/docs/plugins/" data-layout="button_count" data-size="small" data-mobile-iframe="true"><a target="_blank" class="fb-xfbml-parse-ignore">Share</a></div>
</div>
</div>
<div class="col s12">
<div class="collection">
<a class="collection-item avatar" href="/news/{{item.id}}" style="padding-left:80px">
<img class="biggercircle" src="{{ item.thumbnail.avatar.url }}" alt="" />
<br><span class="title">Test 2</span>
</a>
<a href="http://www.google.com/calendar/event?action=TEMPLATE&text=Udaan&dates=20140127T224000Z/20140320T221500Z&details=Kite+Festival&location=NITK+Surathkal&trp=false&sprop=&sprop=name:" target="_blank" rel="nofollow">Add to my calendar</a>
<div id="fb-root"></div>
<div class="fb-share-button" data-href="http://students.nitk.ac.in/" data-layout="button_count" data-size="small" data-mobile-iframe="true"><a target="_blank" class="fb-xfbml-parse-ignore">Share</a></div>
</div>
</div>
</div>
</div>
<div class="row">
<div id="campus">
<div class="col s12">
Expand Down Expand Up @@ -95,5 +135,13 @@
});
});

</script>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = 'https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.12&appId=[ENTER YOUR APP ID HERE]&autoLogAppEvents=1';
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
</script>
{% endblock scripts %}