Bruno Renié avatar Bruno Renié committed c7fc8e2

Removed the projects app

Comments (0)

Files changed (9)

dotim/default_settings.py

     'dotim.blog',
     'dotim.gallery',
     'dotim.activity',
-    'dotim.projects',
 )
 
 if 'SENTRY_DSN' in os.environ:
Add a comment to this file

dotim/projects/__init__.py

Empty file removed.

dotim/projects/admin.py

-from django.contrib import admin
-
-from .models import Project
-
-admin.site.register(Project)

dotim/projects/models.py

-from django.db import models
-from django.utils.translation import ugettext_lazy as _
-
-
-class Project(models.Model):
-    name = models.CharField(_('Name'), max_length=255)
-    description = models.TextField(_('Description'))
-    code = models.URLField(_('Source code'), verify_exists=False, blank=True)
-    site = models.URLField(_('Project website'), verify_exists=False,
-                           blank=True)
-    demo = models.URLField(_('Demo'), verify_exists=False, blank=True)
-
-    def __unicode__(self):
-        return u'%s' % self.name
-
-    class Meta:
-        ordering = ('name',)
-
-    def get_links(self):
-        links = []
-        for attr in ('code', 'site', 'demo'):
-            attr_object = getattr(self, attr)
-            if attr_object:
-                links.append((attr, attr_object))
-
-        return links

dotim/projects/templates/projects/project_list.html

-{% extends "base.html" %}
-{% load markup %}
-
-{% block title %}Projects{% endblock %}
-
-{% block bodyid %}full{% endblock %}
-
-{% block projects_current %}current{% endblock %}
-
-{% block content %}
-<h1>Projects</h1>
-<p>Here is a more or less up-to-date list of my present and past projects.</p>
-
-{% for project in projects %}
-
-<div class="project {% cycle 'one' 'two' %}">
-<h2>{{ project.name }}</h2>
-
-{{ project.description|restructuredtext }}
-
-<p>{% for link in project.get_links %}
-<a href="{{ link.1 }}">{{ link.0 }}</a>
-{% if not forloop.last %} |{% endif %}
-{% endfor %}</p>
-</div>
-
-{% endfor %}
-
-{% endblock %}

dotim/projects/tests.py

-from django.test import TestCase
-from django.core.urlresolvers import reverse
-
-from .models import Project
-
-
-class SimpleTest(TestCase):
-
-    def setUp(self):
-        project = Project(name='Test Project')
-        project.description = 'Project\'s decription'
-        project.save()
-
-    def test_model(self):
-        project = Project.objects.get()
-
-        # __unicode__
-        self.assertEquals('%s' % project, 'Test Project')
-
-        # get_links
-        self.assertEquals(project.get_links(), [])
-
-        project.code = 'http://code.example.com'
-        self.assertEquals(project.get_links(),
-                          [('code', 'http://code.example.com')])
-
-    def test_project_list(self):
-        url = reverse('projects:projects')
-
-        response = self.client.get(url)
-        self.assertEquals(response.status_code, 200)
-
-        self.assertTrue('Test Project' in response.content)

dotim/projects/urls.py

-from django.conf.urls import patterns, url
-
-from . import views
-
-urlpatterns = patterns('',
-        url(r'^$', views.index, name='projects'),
-)

dotim/projects/views.py

-from django.shortcuts import render
-
-from .models import Project
-
-
-def index(request):
-    context = {
-        'projects': Project.objects.all(),
-    }
-    return render(request, 'projects/project_list.html', context)
 urlpatterns = patterns('',
     (r'^', include('dotim.blog.urls', namespace='blog')),
     (r'^timeline/', include('dotim.activity.urls', namespace='activity')),
-    (r'^projects/', include('dotim.projects.urls', namespace='projects')),
     (r'^photos/', include('dotim.gallery.urls', namespace='gallery')),
     (r'^comments/', include('django.contrib.comments.urls')),
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.