contractpatch: Add page.
This commit is contained in:
		
							parent
							
								
									d359dc690a
								
							
						
					
					
						commit
						8fec6023e9
					
				
					 7 changed files with 73 additions and 13 deletions
				
			
		|  | @ -0,0 +1,6 @@ | |||
| from django.shortcuts import render_to_response | ||||
| from django.template import RequestContext | ||||
| 
 | ||||
| def render_template_with_context(request, template_path, context_dict): | ||||
|     return render_to_response(template_path, context_dict, | ||||
|                               context_instance=RequestContext(request)) | ||||
							
								
								
									
										0
									
								
								www/conservancy/apps/contractpatch/__init__.py
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								www/conservancy/apps/contractpatch/__init__.py
									
										
									
									
									
										Normal file
									
								
							
							
								
								
									
										6
									
								
								www/conservancy/apps/contractpatch/urls.py
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								www/conservancy/apps/contractpatch/urls.py
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,6 @@ | |||
| from django.conf.urls import patterns, url, include | ||||
| 
 | ||||
| urlpatterns = patterns( | ||||
|     '', | ||||
|     (r'', 'conservancy.apps.contractpatch.views.index'), | ||||
| ) | ||||
							
								
								
									
										13
									
								
								www/conservancy/apps/contractpatch/views.py
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								www/conservancy/apps/contractpatch/views.py
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,13 @@ | |||
| from conservancy import render_template_with_context | ||||
| from conservancy.apps.blog.models import Entry as BlogEntry | ||||
| from datetime import datetime | ||||
| 
 | ||||
| def index(request): | ||||
|     filters = { | ||||
|         'pub_date__lte': datetime.now(), | ||||
|         'tags__slug': 'ContractPatch', | ||||
|     } | ||||
|     context = { | ||||
|         'blog_entries': BlogEntry.objects.filter(**filters)[:3], | ||||
|     } | ||||
|     return render_template_with_context(request, "contractpatch/index.html", context) | ||||
|  | @ -1,10 +1,8 @@ | |||
| from django.shortcuts import render_to_response | ||||
| from conservancy import context_processors as context_processors | ||||
| from django.template import RequestContext | ||||
| from conservancy import render_template_with_context | ||||
| from conservancy.apps.supporters.models import Supporter as Supporter | ||||
| from conservancy.apps.news.models import PressRelease | ||||
| from conservancy.apps.blog.models import Entry as BlogEntry | ||||
| from datetime import datetime, timedelta | ||||
| from datetime import datetime | ||||
| 
 | ||||
| def view(request): | ||||
|     """Conservancy front page view | ||||
|  | @ -12,13 +10,10 @@ def view(request): | |||
|     Performs all object queries necessary to render the front page. | ||||
|     """ | ||||
| 
 | ||||
|     supporters_count = len(Supporter.objects.all().filter(display_until_date__gte=datetime.now())) | ||||
|     press_releases = PressRelease.objects.all().filter(pub_date__lte=datetime.now(), sites=2)[:5] | ||||
|     blog = BlogEntry.objects.all().filter(pub_date__lte=datetime.now())[:5] | ||||
| 
 | ||||
|     c = { | ||||
|         'press_releases': press_releases, | ||||
|         'supporters_count': supporters_count, | ||||
|         'blog' : blog | ||||
|     now = datetime.now() | ||||
|     context = { | ||||
|         'press_releases': PressRelease.objects.all().filter(pub_date__lte=now, sites=2)[:5], | ||||
|         'supporters_count': len(Supporter.objects.all().filter(display_until_date__gte=now)), | ||||
|         'blog': BlogEntry.objects.all().filter(pub_date__lte=now)[:5], | ||||
|     } | ||||
|     return render_to_response("frontpage.html", c, context_instance=RequestContext(request)) | ||||
|     return render_template_with_context(request, "frontpage.html", context) | ||||
|  |  | |||
							
								
								
									
										39
									
								
								www/conservancy/templates/contractpatch/index.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										39
									
								
								www/conservancy/templates/contractpatch/index.html
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,39 @@ | |||
| {% extends "base_conservancy.html" %} | ||||
| 
 | ||||
| {% block head %} | ||||
| <style> | ||||
| #subhed { | ||||
|   margin-top: -0.8em; | ||||
|   font-style: italic; | ||||
| } | ||||
| </style> | ||||
| {% endblock %} | ||||
| 
 | ||||
| {% block content %} | ||||
| <h1>ContractPatch</h1> | ||||
| 
 | ||||
| <div id="subhed">Everything is negotiable</div> | ||||
| 
 | ||||
| <p style="clear: both;">Many free and open source software developers sign employment agreements with their employers.  These agreements can affect whether and how developers contribute to FOSS—whether it’s done as part of their employment, after hours, or both.  ContractPatch is Conservancy’s initiative to give developers the words they need to make sure they can continue to do the work that’s important to them and our community.  Whether those words are negotiation tactics for the hiring process, or language to suggest for a prospective employment agreement, ContractPatch helps developers defend their own interests.</p> | ||||
| 
 | ||||
| <p>In the coming months, we’ll write about legal and strategic points in contract negotiation strategies, pre-negotiation prep and practice, methods for negotiating, and general information on your legal rights around contracts.  We’ll also look at specific contract provisions—especially those that impact tech workers the most, such as non-compete agreements and intellectual property assignment clauses.  This will all go hand-in-hand with a Git repository with forkable sample language for key contract provisions, such as payment terms, benefits, non-competition and non-solicitation agreements, and intellectual property assignment clauses.</p> | ||||
| 
 | ||||
| <h3>Follow ContractPatch</h3> | ||||
| 
 | ||||
| <p><a href="https://lists.sfconservancy.org/mailman/listinfo/contractpatch">Subscribe to our discussion mailing list.</a>  This is a great place to talk about issues in employment agreements, and suggest what ContractPatch might tackle next.</p> | ||||
| 
 | ||||
| <p><a href="https://twitter.com/ContractPatch">Follow ContractPatch on Twitter.</a></p> | ||||
| 
 | ||||
| <h3>Blog posts</h3> | ||||
| 
 | ||||
| {# FIXME: This is duplicated from blog/entry_list.html #} | ||||
| {% for entry in blog_entries %} | ||||
|     <h3><a href="{{ entry.get_absolute_url }}">{{ entry.headline|safe }}</a></h3> | ||||
|         {{ entry.body|safe }} | ||||
|     <p class="date small">Posted by <strong>{{ entry.author.formal_name }}</strong> on {{ entry.pub_date|date:"F j, Y" }} | ||||
|     {% if entry.tags.all %}<span class="blog-tags">/ Tags: {% for tag in entry.tags.all %}<a href="{{ tag.get_absolute_url }}">{{ tag.label }}</a>{% if not forloop.last %}, {% endif %}{% endfor %}</span>{% endif %} | ||||
|     </p> | ||||
| {% endfor %} | ||||
| 
 | ||||
| <p><span class="continued"><a href="/blog/?tag=ContractPatch">Read all ContractPatch blog posts…</a></span></p> | ||||
| {% endblock %} | ||||
|  | @ -58,6 +58,7 @@ urlpatterns = patterns('', | |||
|     (r'^projects', 'conservancy.static.views.index'), | ||||
|     (r'^npoacct', 'conservancy.static.views.index', | ||||
|                   {'fundraiser_sought' : 'npoacct'}), | ||||
|     (r'^contractpatch', include('conservancy.apps.contractpatch.urls')), | ||||
|     (r'^overview', 'conservancy.static.views.index'), | ||||
|     (r'^privacy-policy', 'conservancy.static.views.index'), | ||||
|     (r'^supporter', 'conservancy.static.views.index'), | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Brett Smith
						Brett Smith