Running Django on a shared-hosting provider with Apache in fcgi mode

2008-11-25 Thread Oleg Oltar
Hi! I have a shared hosting. Need to place there my django application. I created ./.htaccess in my root directory which contains following [EMAIL PROTECTED] ~ $ cat ./http/.htaccess AddHandler fastcgi-script .fcgi RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ mysite.fcgi

Re: Running Django on a shared-hosting provider with Apache in fcgi mode

2008-11-25 Thread Oleg Oltar
Well, when I am trying to do it, I am getting 500 Error (shown in console) Status: 500 INTERNAL SERVER ERROR Content-Type: text/html http://www.w3.org/TR/html 4/loose.dtd"> TemplateDoesNotExist at /

Re: Running Django on a shared-hosting provider with Apache in fcgi mode

2008-11-25 Thread Oleg Oltar
CGI param SERVER_PROTOCOL required by WSGI! On Tue, Nov 25, 2008 at 8:42 PM, Oleg Oltar <[EMAIL PROTECTED]> wrote: > Well, when I am trying to do it, I am getting 500 Error (shown in console) > Status: 500 INTERNAL SERVER ERROR > Content-Type: text/html > > > http://www.w

Re: Running Django on a shared-hosting provider with Apache in fcgi mode

2008-11-25 Thread Oleg Oltar
Aha, the 500 Error was template missconfiguredNow I am getting my homeage printed in console when running command, but still need to ser WSGI PARAMS Please help On Tue, Nov 25, 2008 at 8:43 PM, Oleg Oltar <[EMAIL PROTECTED]> wrote: > Also > [EMAIL PROTECTED] ~/TECHNOBUD $ pyth

Please help me with static files serving

2008-12-08 Thread Oleg Oltar
Hi! I am trying to setup django to use static files for development purposes. I used http://docs.djangoproject.com/en/dev/howto/static-files/ But actually failed to serve anything :( My urls.py urlpatterns = patterns('django.views.generic.simple', (r'','direct_to_template'

Re: Please help me with static files serving

2008-12-09 Thread Oleg Oltar
That did the trick :) Works now! Thanks On Tue, Dec 9, 2008 at 9:38 AM, Jeff Anderson <[EMAIL PROTECTED]>wrote: > Oleg Oltar wrote: > > Hi! > > > > I am trying to setup django to use static files for development purposes. > > I used http://docs.djangoproj

How to add tinyMCE to django 1.0.2 admin

2009-01-13 Thread Oleg Oltar
Hi! I want to add tinyMCE to my project's admin site. I downloaded the latest version of the editor, added the js/tiny_mce to my media files Added following to my urls.py from django.conf.urls.defaults import * # Uncomment the next two lines to enable the admin: from django.contrib import admin

Re: How to add tinyMCE to django 1.0.2 admin

2009-01-13 Thread Oleg Oltar
added: tinyMCE.init({ mode: "textareas", theme:"simple" }); after the line: (I read this solution in practical-django-projects book) That's all what I've done so far. But the editor still didn't appear Thanks, Oleg On Wed, Jan 14, 2009 at 12:18 AM, Brian Nea

Re: How to add tinyMCE to django 1.0.2 admin

2009-01-14 Thread Oleg Oltar
7;)), But still, not sure how to make my fields be represented by the mce Please help! On Wed, Jan 14, 2009 at 9:26 AM, Oleg Oltar wrote: > Ok, I read the doc...But not sure if I done everything correctly, as the > tinyMCE is still not in my admin > > So what I've done:

Re: How to add tinyMCE to django 1.0.2 admin

2009-01-14 Thread Oleg Oltar
; > > > > > > > after the line: > > > > > > > > (I read this solution in practical-django-projects book) > > > > That's all what I've done so far. But the editor still didn't appear > > > > Thanks, > > Oleg >

Re: How to add tinyMCE to django 1.0.2 admin

2009-01-14 Thread Oleg Oltar
7;, '/static_media/ > js/textareas.js') > > > Please check if it correspond to your urs. > good luck > kamil > > On Jan 13, 9:43 pm, "Oleg Oltar" wrote: > > Hi! > > > > I want to add tinyMCE to my project's admin site. I downloaded the

Error when Resending forgotten password

2009-01-22 Thread Oleg Oltar
Hi! I am getting a strange error when trying to reset, forgotten password. I am using it this way # Password resend group (r'^reset/(?P[0-9A-Za-z]+)-(?P.+)/$', 'django.contrib.auth.views.password_reset_confirm', {'template_name':'registration/password_

Re: Error when Resending forgotten password

2009-01-23 Thread Oleg Oltar
What the should be look like? Is there any example? Is it at all possible to send email from local working machine? On Fri, Jan 23, 2009 at 8:45 AM, Alex Koshelev wrote: > Try to check your EMAIL_ settings. > > > > On Fri, Jan 23, 2009 at 8:55 AM, Oleg Oltar wrote: > >

Reverse match Exception on password_reset_confirm

2009-01-23 Thread Oleg Oltar
Hi! I am trying to add password reset function to my application. But when I am trying to process the email with confirmation link: code: # Password resend group (r'^reset/(?P[0-9A-Za-z]+)-(?P.+)/$', 'django.contrib.auth.views.p

How to access mail.outbox

2009-01-25 Thread Oleg Oltar
Hi! I am trying to write nose tests for my django application. One of the points is to check if emails are sent properly. The suggested in the doc way( http://docs.djangoproject.com/en/dev/topics/testing/#django.core.mail.django.core.mail.outbox) it to check it is to use mail.outbox variable But

Django docs and automation tests

2009-01-25 Thread Oleg Oltar
Hi! Can you please explain me idea of testing django applications with Client() There many examples in doc, where test cases just checked the response.status_code == 200, But I am often getting 302 instead of 200. Is there any workaround in this case? thanks, Oleg --~--~-~--~~--

Unicode error

2009-01-26 Thread Oleg Oltar
Hi. I want to use django admin, for adding articles into my db. My language is Russian. I defined model in the following way: from django.db import models from tinymce import models as tinymce_models class Article(models.Model): title = models.CharField(max_length=60) body = tinymce_mode

Re: Unicode error

2009-01-26 Thread Oleg Oltar
THANKS On Mon, Jan 26, 2009 at 10:21 PM, Daniel Roseman < roseman.dan...@googlemail.com> wrote: > > On Jan 26, 8:08 pm, Oleg Oltar wrote: > > Hi. > > I want to use django admin, for adding articles into my db. My language > is > > Russia

Extending User with a profile

2009-01-27 Thread Oleg Oltar
Hi! I want to add a profile to every user, that I can register in my application. In future it should contain such fields as avatar, email, about_me fields I found a snippet how to extend django User model: http://www.b-list.org/weblog/2006/jun/06/django-tips-extending-user-model/ But when added

Re: Extending User with a profile

2009-01-27 Thread Oleg Oltar
Os my bug. It was a mistype in a model. Exception gone now On Tue, Jan 27, 2009 at 8:43 PM, Oleg Oltar wrote: > Hi! > I want to add a profile to every user, that I can register in my > application. In future it should contain such fields as avatar, email, > about_me fields &

Creating test databases. Nose framework

2009-01-27 Thread Oleg Oltar
Hi! I am trying to create few nose test for my application. I need to test registration/login, so want to create a test sqlite3 database, and pre-populate it with some data. No sure how to do it. I created a setup method: def setup(): setup_test_environment() create_test_db() But getting

Article lists

2009-01-27 Thread Oleg Oltar
Hi! I'm planing to add an article list to my application. The idea is to show every article stored in the database but in a truncated way. So I used the following template tags to produce the list {% autoescape off %} {% for article in list_of_articles %} {{article.title}} {{article.bod

Re: Creating test databases. Nose framework

2009-01-27 Thread Oleg Oltar
wrote: > >> On Tue, Jan 27, 2009 at 3:51 PM, Oleg Oltar wrote: >> >>> Hi! >>> I am trying to create few nose test for my application. >>> I need to test registration/login, so want to create a test sqlite3 >>> database, and pre-populat

Re: Creating test databases. Nose framework

2009-01-28 Thread Oleg Oltar
Can't find how to add predefined data to the db. Sorry for being silly, maybe someone can point me? Please On Wed, Jan 28, 2009 at 2:45 AM, Russell Keith-Magee wrote: > > On Wed, Jan 28, 2009 at 5:51 AM, Oleg Oltar wrote: > > Hi! > > I am trying to create few nose

Re: Creating test databases. Nose framework

2009-01-28 Thread Oleg Oltar
Any idea? On Wed, Jan 28, 2009 at 11:41 AM, Oleg Oltar wrote: > Can't find how to add predefined data to the db. Sorry for being silly, > maybe someone can point me? > Please > > > On Wed, Jan 28, 2009 at 2:45 AM, Russell Keith-Magee < > freakboy3...@gmail.com&g

Changing database fields

2009-01-28 Thread Oleg Oltar
Hi! I am creating my first application. Which is to be a small publishing system. I defined a model, which represent a single article, and also added about 15 articles to my database (which is sqlite3). Now I understand that I should extend my models with few more fields (e.g. need to add categor

Re: Creating test databases. Nose framework

2009-01-29 Thread Oleg Oltar
> > Generally, you'll want to wait more than 6 hours before asking again. A > couple of days, at least, would be a reasonable period. > Sorry...Will note On Thu, Jan 29, 2009 at 2:54 AM, Malcolm Tredinnick < malc...@pointy-stick.com> wrote: > > On Wed, 2009-01-28 at

Nosetests. maximum recursion depth exceeded

2009-02-03 Thread Oleg Oltar
Hi! I am creating one of my firsts django projects. I created nose tests to cover my application and got 100% code coverage My repo is git://github.com/oltarasenko/usermanaging.git Now I am trying to modify my project to make settings be platform independent. So I added following lines to my sett

Re: Nosetests. maximum recursion depth exceeded

2009-02-03 Thread Oleg Oltar
following: import os import re os.environ['PYTHNONPATH'] = '$PYTHONPATH:$PWD' os.environ['DJANGO_SETTINGS_MODULE'] = 'settings' # Is this correct? I presume that the second line is incorrect. Where it looks for the settings? On Tue, Feb 3, 2009 at 7:08 PM, St

Re: Nosetests. maximum recursion depth exceeded

2009-02-03 Thread Oleg Oltar
e, Feb 3, 2009 at 8:59 PM, Oleg Oltar wrote: > Why it worked before I tried to change settings.py? Why actually site > works? > Maybe something is in my tests? > > Btw, my code organized this way: > > /proj >urls.py >settings > ./app > tests.py >

Re: Nosetests. maximum recursion depth exceeded

2009-02-03 Thread Oleg Oltar
Well seems I found the solution. I just moved the project folder in my repo (so now we have repo->myproject), so the name myproject will not change after cloning, and now it all works Any idea why? On Tue, Feb 3, 2009 at 9:05 PM, Oleg Oltar wrote: > Seems no :( > I tried to manuall

Processing multiple forms on one page

2009-06-23 Thread Oleg Oltar
Hi! I am writing a small application for user profile management. I need to display and to process output from 2 form on the page of own profile. How can I do it? 1. Form if to change avatar. (Contains browse and upload buttons) 2. Form is for changing user details, e.g. info field, or maybe em

Re: Processing multiple forms on one page

2009-06-24 Thread Oleg Oltar
ation/profile.html', data) Should I use this if owner.username == currentUser.username: in all 3 views which I will have? On Wed, Jun 24, 2009 at 11:42 AM, Daniel Roseman wrote: > > On Jun 24, 6:45 am, Oleg Oltar wrote: >> Hi! >> >> I am writing a small application for

How to handle image uploading in a proper way

2009-06-24 Thread Oleg Oltar
Hi! I use a following code: def handleUploadedFile(file): destination = open('%s'%(file.name), 'wb+') for chunk in file.chunks(): destination.write(chunk) destination.close() return destination I call it from view using this code. handleUploadedFile(request.FILES['avat

Sending JSON response from views

2009-07-11 Thread Oleg Oltar
Hi! I am trying to implement something like a jubber web application, using django and flex The server code should send a list of users who's online. Here's how I defined a model class ActiveList(models.Model): STATUS_CHOISES = ( (u'F', u'free'), (u'B', u'busy'), )

Accessor for field clashes with related field

2009-07-17 Thread Oleg Oltar
Hi! I want to create an object that contains 2 links to users. For example class GameClaim(models.Model): target = models.ForeignKey(User) claimer = models.ForeignKey(User) isAccepted = models.BooleanField() but I am getting an error when running server: Accessor for field 'target'

ForeignKey drop box modification in admin site

2009-08-03 Thread Oleg Oltar
Hi! I have 3 models: categories sections articles Each section is related to some category, and in similar way each article is related to some section: The code looks like this: class Category(models.Model): category = models.CharField(max_length=200) name = models.CharField(max_le

Django testing applications: using fixtures

2009-09-06 Thread Oleg Oltar
Django testing application: using fixtures Hi ! I came across strange problem while trying to use mixtures in my unittests For example, I created a fixture from the database: silver:jin oleg$ python manage.py dumpdata > datastored.json Strange, but when the fixture is loaded while the test ru

Django unittests, django.contrib.admin.sites.AlreadyRegistered error

2009-09-07 Thread Oleg Oltar
Hi! I am trying to run unitests for one of my application. Here is the code of the test (it doesn't do anything yet) import os import re #import unittest from django.core import management from django.test import TestCase from django.test.client import Client from django.core import mail from d

Re: Django testing applications: using fixtures

2009-09-07 Thread Oleg Oltar
cute_sql(None) File "/opt/local/lib/python2.5/site-packages/Django-1.0.2_final-py2.5.egg/django/db/models/sql/subqueries.py", line 117, in execute_sql cursor = super(UpdateQuery, self).execute_sql(result_type) File "/opt/local/lib/python2.5/site-packages/Django-1.0.2_final-py2.5.e

Sitemap index examples needed

2009-09-07 Thread Oleg Oltar
Hi! I have following models relation: class Section(models.Model): section = models.CharField(max_length=200, unique=True) name = models.CharField(max_length=200, blank = True) class Article (models.Model): url = models.CharField(max_length = 30, unique=True)

Encoding question

2009-09-09 Thread Oleg Oltar
Hi! One of my tests returned following text () The test: from django.test.client import Client c = Client() resp = c.get("/") resp.content In [25]: resp.content Out[25]: '\r\n\r\n\r\nhttp://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>\r\n\r\nhttp://www.w3.org/1999/xhtml";>\r\n \r\n\r\n \r

Re: Encoding question

2009-09-09 Thread Oleg Oltar
xb2\xd0\xb0\xd1\x80\xd1\x8b > \xd0\xaf\xd0\xbf\xd0\xbe\xd0\xbd\xd0\xb8\xd1\x8f" />\n\r\n\r\n' > >>> soup = BeautifulSoup(html) > >>> print soup.prettify() > www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> > http://www.w3.org/1999/xhtml&qu

Re: Encoding question

2009-09-09 Thread Oleg Oltar
ating my django now. (was using 1.0) On Wed, Sep 9, 2009 at 2:37 PM, Karen Tracey wrote: > On Wed, Sep 9, 2009 at 5:06 AM, Oleg Oltar wrote: > >> Hi! >> >> One of my tests returned following text () >> >> The test: >> from django.test.client imp

Deploying django application

2009-04-05 Thread Oleg Oltar
Hi! I am trying to serve my project using server-spawned processes I created file .htaccess in my web_root directory which contains: AddHandler fastcgi-script .fcgi RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ mysite.fcgi/$1 [QSA,L] And also added file mysite.fcgi to

Re: Deploying django application

2009-04-06 Thread Oleg Oltar
erver redirected me to mysite.fcgi 3. I am using fedora, so installed fcgid from yum, but not fcgi. Can it cause the problem? Should I install fcgi instead? Thanks in advance, Oleg On Mon, Apr 6, 2009 at 1:41 AM, Daniel Roseman wrote: > > On Apr 5, 10:04 pm, Oleg Oltar wrote: >> Hi! >>

Customizing admin form

2009-04-10 Thread Oleg Oltar
Hi! I have a model which contains several TextFields and CharFields. I want to make all char fields longer and wider. How to do it? Thanks, Oleg --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group.

Creating custom feeds

2009-04-20 Thread Oleg Oltar
Hi! I want to create RSS2 feed. I read the doc http://www.djangoproject.com/documentation/0.96/syndication_feeds/ So created a class # coding: utf-8 from django.contrib.syndication.feeds import Feed from articleManager.models import Article as article class LatestEntries(Feed): title = 'TI

Re: Creating custom feeds

2009-04-20 Thread Oleg Oltar
Even more. How feeds are different from any other pages? What if I will simply generate a template of needed structure using django models + views (as described in tutorials) Thanks, Oleg On Mon, Apr 20, 2009 at 3:14 PM, Oleg Oltar wrote: > Hi! > > I want to create RSS2 feed. I rea

Creating sub sections

2009-04-21 Thread Oleg Oltar
Hi! I am writing an application - a kind of article manager. I defined my model this way: class Section(models.Model): #id = models.IntegerField(unique=True) section = models.CharField(max_length=200, unique=True) name = models.CharField(max_length=200, blank = True) def __unicod

Re: Creating sub sections

2009-04-21 Thread Oleg Oltar
ting the path. > > On Apr 21, 1:30 pm, Oleg Oltar wrote: > > Hi! > > I am writing an application - a kind of article manager. I defined my > model > > this way: > > > > class Section(models.Model): > > #id = models.IntegerField(unique=True) &

Django development on OS X. Accessing development server from local network

2009-04-28 Thread Oleg Oltar
Have a problem. Just noticed that my application has a layout issue in IE7. I just wanted to make tests on development server from other PC (with IE installed), on my local network. How can I do it? Don't really want to deploy apache on local PC for testing Please help me to understand how to

Displaying content in different styles.

2009-04-29 Thread Oleg Oltar
Hi! I created a simple view to display articles on my homepage. Here's the code: def homepage(request): news = models.Section.objects.get(section = 'News') articles = models.Article.objects.exclude(section = news.id ).order_by("-pub_date") list_of_news = models.Article.objects.filter

Clearing ImageField from django admin

2009-05-06 Thread Oleg Oltar
Hi! I am using ImageField to add optional images to my articles from admin. image2 = models.ImageField(upload_to="upload", blank=True) I added one image from my server to this field Is there a way to remove the image. If i for example decided not to use the image on the article at all? Thanks, O

Re: Clearing ImageField from django admin

2009-05-08 Thread Oleg Oltar
Didn't find solution yet. So if you can please help me! On Wed, May 6, 2009 at 6:29 PM, Oleg Oltar wrote: > Hi! > I am using ImageField to add optional images to my articles from admin. > > image2 = models.ImageField(upload_to="upload", blank=True) > > I added

creating objects in views

2009-05-12 Thread Oleg Oltar
Hi! I am running small blog-styled information site. Which contains articles added via admin application Now I am trying to add possibility to add comments, so I defined a comment Model (which contains Foreign Key to article object, and few text fields), also defined forms. Can you please explain

Re: creating objects in views

2009-05-14 Thread Oleg Oltar
'article' : article, 'articles' : articles_list} ) Not sure how to fill the article field :( Thanks in advance, Oleg On Tue, May 12, 2009 at 1:01 PM, Daniel Roseman < roseman.dan...

Re: creating objects in views

2009-05-15 Thread Oleg Oltar
about it here: > http://docs.djangoproject.com/en/dev/ref/contrib/comments/custom/#ref-contrib-comments-custom > > Gene > > On May 14, 12:59 pm, Oleg Oltar wrote: > > Well, the problem with built in comments framework is that I need few > more > > fields i

Adding new permissions to django-admin

2009-05-15 Thread Oleg Oltar
Hi! I am writing small django based informational site. I have several publishers, who add articles to my database using the adding application. I have defined my main article model this way: class Article (models.Model): # Tiny url url = models.CharField(max_length = 30, unique=True, h

Counting pageviews

2009-05-15 Thread Oleg Oltar
Hi! I am writing simple article manager application. Is there a way I can store pageviews number for my articles in database (want to display them in future, and use for rating on site) Thanks in advance, Oleg --~--~-~--~~~---~--~~ You received this message becaus

Re: Counting pageviews

2009-05-17 Thread Oleg Oltar
: > > 2009/5/15 Oleg Oltar : > > Hi! > > > > I am writing simple article manager application. Is there a way I can > store > > pageviews number for my articles in database (want to display them in > > future, and use for rating on site) > > > > T

Exception in model in admin with non unicode

2009-05-19 Thread Oleg Oltar
Hi! I am creating a simple application for managing articles. It contains of several entities: 1) categories 2) sections 3) articles The code: class Categoty(models.Model): categoty = models.CharField(max_length=200) name = models.CharField(max_length = 200, help_text="Имя категории")

Re: Exception in model in admin with non unicode

2009-05-20 Thread Oleg Oltar
On Wed, May 20, 2009 at 4:12 PM, Karen Tracey wrote: > 2009/5/20 Oleg Oltar > >> [snip]Strange when I am adding an article with russian text or Section >> with russian name, everything is OK >> But when I a trying to add a new category via admin, and use name of it i

Re: Exception in model in admin with non unicode

2009-05-20 Thread Oleg Oltar
Well... I just restored my database from production dump... On prod I have correct UTF-8 On Wed, May 20, 2009 at 4:49 PM, Karen Tracey wrote: > On Wed, May 20, 2009 at 9:37 AM, Oleg Oltar wrote: > >> Hm... You're right...But I don't understand how it happened... I use

Displaying objects in template

2009-05-20 Thread Oleg Oltar
Hi! I have a model with a Sections and Categories related this way: class Category(models.Model): categoty = models.CharField(max_length=200) name = models.CharField(max_length = 200, help_text=u"Имя категории") def __unicode__(self): return u"Категория %s" %self.name class S

Re: Displaying objects in template

2009-05-20 Thread Oleg Oltar
Ok, I got it now What about the inheritance? Question 2? On Wed, May 20, 2009 at 9:30 PM, Alex Gaynor wrote: > > > 2009/5/20 Oleg Oltar > > Hi! >> I have a model with a Sections and Categories related this way: >> >> class Category(models.Model): >>

Re: Displaying objects in template

2009-05-20 Thread Oleg Oltar
Is there any doc I can read about it? On Wed, May 20, 2009 at 9:50 PM, Alex Gaynor wrote: > > > 2009/5/20 Oleg Oltar > >> Ok, I got it now >> What about the inheritance? Question 2? >> >> On Wed, May 20, 2009 at 9:30 PM, Alex Gaynor wrote: >> &g

Re: Displaying objects in template

2009-05-20 Thread Oleg Oltar
Just want to tell you big big thank you! On Wed, May 20, 2009 at 10:52 PM, Alex Gaynor wrote: > > > 2009/5/20 Oleg Oltar > >> Is there any doc I can read about it? >> >> On Wed, May 20, 2009 at 9:50 PM, Alex Gaynor wrote: >> >>> >>> >>

Re: Displaying objects in template

2009-05-20 Thread Oleg Oltar
Strange :( This code produces nothing in template how can I debug it? Please help 2009/5/20 Oleg Oltar > Just want to tell you big big thank you! > > > On Wed, May 20, 2009 at 10:52 PM, Alex Gaynor wrote: > >> >> >> 2009/5/20 Oleg Oltar >> &

How to use filtering

2009-05-25 Thread Oleg Oltar
Hi! I am trying to understand how to use filters in django. I have following models: class Section(models.Model): section = models.CharField(max_length=200, unique=True) name = models.CharField(max_length=200, blank = True) category = models.ForeignKey(Category, blank=True) pub

Uploading Images

2009-06-14 Thread Oleg Oltar
Hi! I know that the problem probably was discussed many times already, but I really can't make it working. I read the documentation and prepared the following code: model: class UserProfile(models.Model): """ User profile model, cintains a Foreign Key, which links it to the user pr

Re: Uploading Images

2009-06-14 Thread Oleg Oltar
} But I am getting: MultiValueDictKeyError at /account/profile/test "Key 'file' not found in " :( On Mon, Jun 15, 2009 at 6:54 AM, Oleg Oltar wrote: > Hi! > > I know that the problem probably was discussed many times already, but > I really can't ma

Manager is not accessible via model instances

2009-09-18 Thread Oleg Oltar
Hi! I have following model: class UserProfile(models.Model): """ User profile model, cintains a Foreign Key, which links it to the user profile. """ about = models.TextField(blank=True) user = models.ForeignKey(User, unique=True) ranking = models.IntegerField(default

Re: Manager is not accessible via model instances

2009-09-18 Thread Oleg Oltar
the code I use is active_list = UserProfile.objects\ .get_active_members()\ .exclude(user = current_user) On Fri, Sep 18, 2009 at 7:28 PM, Daniel Roseman wrote: > > On Sep 18, 4:34 pm, Oleg Oltar ltarase...@gmail.com> > wrote: > > Hi! > > &g

Linking items from the same model

2009-10-17 Thread Oleg Oltar
Hi I am trying to create a model for Article site. I want to link each article with 3-5 related articles, so what I am thinking of is creating code this way: class Article (models.Model): # Tiny url url = models.CharField(max_length = 30, unique=True) is_published = mo

Re: Linking items from the same model

2009-10-17 Thread Oleg Oltar
sible to arrange some filters to the list? On Sat, Oct 17, 2009 at 7:40 PM, bruno desthuilliers < bruno.desthuilli...@gmail.com> wrote: > > > > On 17 oct, 17:45, Oleg Oltar wrote: > > Hi > > > > I am trying to create a model for Article site. I want to link eac

Re: Linking items from the same model

2009-10-17 Thread Oleg Oltar
I would really want to add some sort of filtering to that http://img.skitch.com/20091017-mfs2mbhbuudk2rgquium1bu61d.png On Sat, Oct 17, 2009 at 10:00 PM, Oleg Oltar wrote: > I tried to do it. It works really nice. > > I wonder how can I query all articles related to the current one in

Re: digg style pagination

2009-11-18 Thread Oleg Oltar
I am trying to use the application http://code.google.com/p/django-pagination/, that you proposed in the latest post. But getting an exception. Could you help to fix it please? TemplateSyntaxError at /section/home Caught an exception while rendering: 'request' Original Traceback (most recent c

Re: digg style pagination

2009-11-20 Thread Oleg Oltar
Agree. Fixed now On Thu, Nov 19, 2009 at 11:51 AM, Tim Chase wrote: >> But getting an exception. Could you help to fix it please? >> >> TemplateSyntaxError at /section/home >> >> Caught an exception while rendering: 'request' >> >> Original Traceback (most recent call last): >>   File "/opt/local

Serving admin media files

2009-11-23 Thread Oleg Oltar
Hi I am trying to serve static files from another domain (sub domain of current domain). To serve all media files I used this settings: MEDIA_URL = 'http://media.bud-inform.co.ua/' So when in template I used {{ MEDIA_URL }} it was replace with the setting above. Now I am trying to serv

Django: PYTHON_EGG_CACHE, access denied error

2009-12-06 Thread Oleg Oltar
Hi! I am deploying my django application on a server, and on last stages I am getting this error: ExtractionError at /admin/ Can't extract file(s) to egg cache The following error occurred while trying to extract file(s) to the Python egg cache: [Errno 13] Permission denied: '/.python-eggs' T

Help me to fix problem related to migration from one server to another

2009-12-15 Thread Oleg Oltar
Hi, I've moved my django application from one server to another, and spotted strange bug with media after it: Traceback (most recent call last): File "/usr/lib/python2.5/site- packages/Django-1.1.1-py2.5.egg/django/core/handlers/base.py", line 92, in get_response response = callback(request,

Django, serving different comments for site in other language

2010-01-25 Thread Oleg Oltar
Hi I have created an article site, where articles are published in several languages. I am using transmeta (http://code.google.com/p/django-transmeta/) to support multiple languages in one model. Also I am using generic comments framework, to make articles commentable. I wonder what will happen i

Re: dump utf8 data from database

2010-01-25 Thread Oleg Oltar
Which database do you use? Also you can dump data using python manage.py help dumpdata (So data can be imported to any database). Thanks, Oleg On Tue, Jan 26, 2010 at 6:22 AM, Weiwei wrote: > Hi all, > > is there a easy way to dump utf8 data from database? > > Thanks > > -- > You received this

Django comments application. How to make comments private by default?

2010-04-02 Thread Oleg Oltar
Someone is posting many bad comments to my site. Is there possibility to make all submitted comments private by default (so I will need to review them to enable)? (I am using http://docs.djangoproject.com/en/dev/ref/contrib/comments/) -- You received this message because you are subscribed to th

Re: Django comments application. How to make comments private by default?

2010-04-03 Thread Oleg Oltar
explain the problem, or you can check the comment documentation<http://docs.djangoproject.com/en/dev/ref/contrib/comments/>for more help. Without any other explanations... On Fri, Apr 2, 2010 at 9:19 PM, Rolando Espinoza La Fuente < dark...@gmail.com> wrote: > On Fri, Apr 2, 201

Help with django translation for django-sorting

2011-05-12 Thread Oleg Oltar
Hi need help, I am using django soring application: https://github.com/directeur/django-sorting I just wonder if there is a way to make local names for sorting filters... E.g. I am trying to localize following: {% anchor total Rating %} And using standard django trick {% anchor total _("Ratin