Skip to content

Commit

Permalink
Updating models, added disqus and facebook connect.
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelcaricio committed Jul 30, 2011
1 parent d07d3c5 commit 43d6b12
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 4 deletions.
2 changes: 1 addition & 1 deletion myimgat/apps/wall/models.py
Expand Up @@ -26,7 +26,7 @@ def load(self, username):
class Album(models.Model): class Album(models.Model):
username = models.CharField(default="", blank=True, max_length=100, db_index=True) username = models.CharField(default="", blank=True, max_length=100, db_index=True)
identifier = models.CharField(max_length=200, db_index=True) identifier = models.CharField(max_length=200, db_index=True)
url = models.CharField(max_length=500, null=True, blank=True, db_index=True) url = models.CharField(max_length=300, null=True, blank=True, db_index=True)
title = models.CharField(max_length=200, null=True, blank=True) title = models.CharField(max_length=200, null=True, blank=True)


class AlbumProxy(Album): class AlbumProxy(Album):
Expand Down
21 changes: 21 additions & 0 deletions myimgat/apps/wall/templates/wall/cropped_photo_detail.html
Expand Up @@ -17,6 +17,27 @@
<h2>{{ photo.original_photo.title }}</h2> <h2>{{ photo.original_photo.title }}</h2>
<img src="{{ photo.url }}" /> <img src="{{ photo.url }}" />
<a href="/{{ photo.album.username }}">Go to {{ photo.original_photo.album.username }} wall</a> <a href="/{{ photo.album.username }}">Go to {{ photo.original_photo.album.username }} wall</a>

<!-- disqus code -->
<div id="disqus_thread"></div>
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = 'myimgat'; // required: replace example with your forum shortname

// The following are highly recommended additional parameters. Remove the slashes in front to use.
var disqus_identifier = 'myimgat_sharedphoto_id_{{ photo.id }}';
var disqus_url = 'http://myimg.at{{ request.path }}';

/* * * DON'T EDIT BELOW THIS LINE * * */
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
<!-- end of disqus code -->
{% endblock %} {% endblock %}


{% block js %} {% block js %}
Expand Down
9 changes: 9 additions & 0 deletions myimgat/apps/wall/templates/wall/popin.html
@@ -1,4 +1,13 @@
<div id="simple-popin" class="simple-popin popin"> <div id="simple-popin" class="simple-popin popin">

{% if messages %}
<ul class="messages">
{% for message in messages %}
<li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
{% endfor %}
</ul>
{% endif %}

<div class="login"> <div class="login">
<p>Show, see, crop and share your photos easily!</p> <p>Show, see, crop and share your photos easily!</p>
<p>Choose your log-in option:</p> <p>Choose your log-in option:</p>
Expand Down
7 changes: 4 additions & 3 deletions myimgat/settings.py
Expand Up @@ -23,9 +23,9 @@


DATABASES = { DATABASES = {
'default': { 'default': {
'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. 'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
'NAME': 'storage.db', # Or path to database file if using sqlite3. 'NAME': 'myimgat', # Or path to database file if using sqlite3.
'USER': '', # Not used with sqlite3. 'USER': 'root', # Not used with sqlite3.
'PASSWORD': '', # Not used with sqlite3. 'PASSWORD': '', # Not used with sqlite3.
'HOST': '', # Set to empty string for localhost. Not used with sqlite3. 'HOST': '', # Set to empty string for localhost. Not used with sqlite3.
'PORT': '', # Set to empty string for default. Not used with sqlite3. 'PORT': '', # Set to empty string for default. Not used with sqlite3.
Expand Down Expand Up @@ -199,6 +199,7 @@
FACEBOOK_API_SECRET = 'c462511f5ca9feb2aa193f15ccd2f1b1' FACEBOOK_API_SECRET = 'c462511f5ca9feb2aa193f15ccd2f1b1'
FACEBOOK_EXTENDED_PERMISSIONS = ['publish_stream', 'user_photos', 'user_status', 'read_friendlists'] FACEBOOK_EXTENDED_PERMISSIONS = ['publish_stream', 'user_photos', 'user_status', 'read_friendlists']


LOGIN_URL = '/'
# end of social_auth specifc config # end of social_auth specifc config




Expand Down

0 comments on commit 43d6b12

Please sign in to comment.