Permalink
Browse files

Updating models, added disqus and facebook connect.

  • Loading branch information...
rafaelcaricio committed Jul 30, 2011
1 parent d07d3c5 commit 43d6b127bf2a1f0431954786dae4a6798d739742
@@ -26,7 +26,7 @@ def load(self, username):
class Album(models.Model):
username = models.CharField(default="", blank=True, max_length=100, 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)
class AlbumProxy(Album):
@@ -17,6 +17,27 @@
<h2>{{ photo.original_photo.title }}</h2>
<img src="{{ photo.url }}" />
<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 %}
{% block js %}
@@ -1,4 +1,13 @@
<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">
<p>Show, see, crop and share your photos easily!</p>
<p>Choose your log-in option:</p>
View
@@ -23,9 +23,9 @@
DATABASES = {
'default': {
- 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
- 'NAME': 'storage.db', # Or path to database file if using sqlite3.
- 'USER': '', # Not used with sqlite3.
+ 'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
+ 'NAME': 'myimgat', # Or path to database file if using sqlite3.
+ 'USER': 'root', # Not used with sqlite3.
'PASSWORD': '', # 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.
@@ -199,6 +199,7 @@
FACEBOOK_API_SECRET = 'c462511f5ca9feb2aa193f15ccd2f1b1'
FACEBOOK_EXTENDED_PERMISSIONS = ['publish_stream', 'user_photos', 'user_status', 'read_friendlists']
+LOGIN_URL = '/'
# end of social_auth specifc config

0 comments on commit 43d6b12

Please sign in to comment.