This file contains hidden or 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.contrib import admin | |
from blog.models import Post, Category | |
class BlogAdmin(admin.ModelAdmin): | |
exclude = ['posted'] | |
prepopulated_fields = {'slug': ('title',)} | |
fieldsets = [ | |
(None, {'fields': ['title',]}), | |
(None, {'fields': ['slug']}), | |
(None, {'fields': ['category']}), |
This file contains hidden or 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
SELECT | |
news.title, | |
news.slug, | |
news.datetime, | |
news.content, | |
news.category_id, | |
news.tags | |
FROM | |
public.tagging_tag, | |
public.tagging_taggeditem, |
This file contains hidden or 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
# coding: utf8 | |
from django.db import models | |
from tagging.fields import TagField | |
from cked.fields import RichTextField | |
class Post(models.Model): | |
title = models.CharField(max_length=255, unique=True) | |
slug = models.SlugField(max_length=255, unique=True) | |
datetime = models.DateTimeField('Дата публикации') |
This file contains hidden or 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.shortcuts import render_to_response | |
from django.template import RequestContext | |
from blog.views import Post | |
def home(request): | |
vars = dict ( | |
posts=Post.objects.all().order_by('-timestamp')[:10], | |
) | |
return render_to_response('index.html', vars, context_instance=RequestContext(request)) |
This file contains hidden or 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://127.0.0.1:8000/admin/team/member/add/ | |
Django Version: 1.6.2 | |
Python Version: 2.7.6 | |
Installed Applications: | |
('django.contrib.admin', |
This file contains hidden or 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
server { | |
server_name www.coderweb.ru coderweb.ru; | |
access_log /var/www/coderweb.ru/logs/access.log; | |
error_log /var/www/coderweb.ru/logs/error.log; | |
root /var/www/coderweb.ru/public_html; | |
location / { | |
index index.html index.htm index.php; | |
} |
This file contains hidden or 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
server { | |
listen 80; | |
server_name vps-1026794.srv.pa.infobox.ru; | |
#charset koi8-r; | |
#access_log /var/log/nginx/log/host.access.log main; | |
location / { | |
root /usr/share/nginx/html; | |
index index.html index.htm; |
This file contains hidden or 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
[uwsgi] | |
vhost = true | |
plugins = python | |
socket = /var/tmp/coderweb.ru.sock | |
chmod-socket = 666 | |
master = true | |
enable-threads = true | |
processes = 2 | |
wsgi-file = /var/www/coderweb.ru/www/www/wsgi.py | |
virtualenv = /var/www/coderweb.ru |
This file contains hidden or 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
server { | |
listen 80; | |
server_name coderweb.ru; | |
access_log /var/www/coderweb.ru/logs/access.log; | |
error_log /var/www/coderweb.ru/logs/error.log; | |
location / { | |
uwsgi_pass unix:///var/tmp/coderweb.ru.sock; | |
include uwsgi_params; | |
} |
This file contains hidden or 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
Install packages failed: Error occurred when installing package Pillow. | |
The following command was executed: | |
packaging_tool.py install --build-dir /tmp/pycharm-packaging2563402188824014007.tmp Pillow | |
The error output of the command: | |
Traceback (most recent call last): | |
File "/home/lemax/Soft/pycharm/helpers/packaging_tool.py", line 125, in main |
OlderNewer