This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Environment: | |
Request Method: POST | |
Request URL: http://localhost:8000/admin/core/domaincredential/add/ | |
Django Version: 1.4b1 | |
Python Version: 2.7.2 | |
Installed Applications: | |
('django.contrib.auth', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.conf.urls.defaults import * | |
urlpatterns = patterns ('', | |
(r'^divulgacao/(?P<slug_categoria>[\w_-]+)/(?P<slug_divulgacao>[\w_-]+)/$', 'CAMINHOPARAAVIEW'), | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ArticleView(ListView): | |
model = Article | |
template_name = 'wiki/view.html' | |
def get_queryset(self, article_id=None): | |
article_id = self.kwargs.get("article_id") | |
self.queryset = Article.objects.filter(id=article_id) | |
return self.queryset | |
def get_context_data(self, **kwargs): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% extends "index.html" %} | |
{% load mptt_tags %} | |
{% load i18n %} | |
{% block wiki_breadcrumbs %} | |
{% recursetree nodes %} | |
{% if node.get_ancestors %} | |
{% for item in node.get_ancestors %} | |
<a href="{% url 'get' item.id %}">{{ item }}</a> | |
<span class="divider">/</span> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.db import models | |
from django.utils.translation import ugettext_lazy as _ | |
from django.contrib.auth import get_user_model | |
from django.contrib.auth.models import Group | |
from mptt.models import MPTTModel, TreeForeignKey | |
#TODO: Handle the change agains current revision. At this moment, the change is manual. | |
class Article(MPTTModel): | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Environment: | |
Request Method: GET | |
Request URL: http://localhost:8000/admin/SEP/semcomputer/126DA47BC0A801A800C915099B9968CF/ | |
Django Version: 1.5.3 | |
Python Version: 2.7.5 | |
Installed Applications: | |
('django.contrib.auth', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Traceback (most recent call last): | |
File "/home/RFOC/01388863189/dev/pyodbc_test/lib/python2.7/site-packages/django/core/handlers/base.py", line 114, in get_response | |
response = wrapped_callback(request, *callback_args, **callback_kwargs) | |
File "/home/RFOC/01388863189/dev/pyodbc_test/lib/python2.7/site-packages/django/contrib/admin/options.py", line 432, in wrapper | |
return self.admin_site.admin_view(view)(*args, **kwargs) | |
File "/home/RFOC/01388863189/dev/pyodbc_test/lib/python2.7/site-packages/django/utils/decorators.py", line 99, in _wrapped_view | |
response = view_func(request, *args, **kwargs) | |
File "/home/RFOC/01388863189/dev/pyodbc_test/lib/python2.7/site-packages/django/views/decorators/cache.py", line 52, in _wrapped_view_func | |
response = view_func(request, *args, **kwargs) | |
File "/home/RFOC/01388863189/dev/pyodbc_test/lib/python2.7/site-packages/django/contrib/admin/sites.py", line 198, in inner |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import os | |
sys.path.insert(0, '/var/www/html/htpwd') | |
from htpwd import app as htpwdapp | |
def application(req_environ, start_response): | |
os.environ['HTPASSWD_FILE'] = req_environ['HTPASSWD_FILE'] | |
os.environ['SECRET_KEY'] = req_environ['SECRET_KEY'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from ldapdb.models.fields import CharField | |
from uuid import UUID | |
def guid2string(val): | |
""" convert an active directory binary objectGUID value as returned by | |
python-ldap into a string that can be used as an LDAP query value """ | |
s = UUID(bytes_le=val) | |
return s | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is an auto-generated Django model module. | |
# You'll have to do the following manually to clean this up: | |
# * Rearrange models' order | |
# * Make sure each model has one field with primary_key=True | |
# * Remove `managed = False` lines if you wish to allow Django to create, modify, and delete the table | |
# Feel free to rename the models, but don't rename db_table values or field names. | |
# | |
# Also note: You'll have to insert the output of 'django-admin.py sqlcustom [app_label]' | |
# into your database. | |
from __future__ import unicode_literals |
OlderNewer