from django.contrib.comments.models import Comment
from post.models import Post
#get comments for model
Comment.objects.for_model(Post).count()
#get comment for instance
Comment.objects.for_model(Post.objects.get(id=1)).count()
2008/11/2 David.D <[EMAIL PROTECTED]>
>
> I can get comment_count i
Hi,
Try this,
http://code.djangoproject.com/wiki/DjangoOnWindowsWithIISAndSQLServer
Hope this help
Chatchai
2008/11/19 seperelli <[EMAIL PROTECTED]>
>
> Dear,
> I have a site that is working with django,mysql,phyton on a linux
> system.
> This site should be put on a windows system where iis i
{% get_comment_count for *form *as comment_count %}
make sure you put the right object (in your code is form, what is it? do you
have template context names form?) for comment templatetag and it is
available
chatchai
2008/11/27 izzy <[EMAIL PROTECTED]>
>
> Hi all.
>
> I've been having a problem
#x27;You are not allowed to view this report.'
>return render_to_response('shiftmanager/
> packagingreport_details.html', {'form': form, 'messages': messages,
> 'errors': errors})
>
>
> The context form is a PackagingReport Object
>
> On Nov
Yes, it looks like *extra_context *is not* *available for rendering.
Don't know how to fix, finally use templatetag to do this task.
Thanks, Chachai
2008/8/27 Malcolm Tredinnick <[EMAIL PROTECTED]>
>
>
> On Tue, 2008-08-26 at 07:10 -0700, chatchai wrote:
> > Hi ,
> >
> > It's not easy to explai
Rob
You can control cookie expiration by setting SESSION_COOKIE_AGE.
Default value is 2 week (1209600 seconds). You can try 'remember' user login
by closing browser without clicking 'Log out' button. Nex time your visite
that page, you can access it without re-login.
For security
Yes, it seem to be problem only on Window environment. I asked my friend to
run command under Linux. It works fine.
Cheers.
Chatchai
2008/4/24 Mihai Damian <[EMAIL PROTECTED]>:
>
> Not shure yet but this could be a Windows only issue. I'll get back
> later with some tests.
> >
>
--~--~---
Hi,
You can pass "allow_empty=True" to generic views in case of you don't like
404.
Cheer
Chatchai
2008/4/24 David Reynolds <[EMAIL PROTECTED]>:
>
>
> On 21 Apr 2008, at 10:14 pm, Jon Lesser wrote:
>
> > It seems that if there are no entries for a particular month, the
> > archive link to that
Thanks for opening a ticket.
Regards
2008/4/25 TMihai Damian <[EMAIL PROTECTED]>:
>
> Ticket opened here:
>
> http://code.djangoproject.com/ticket/7084
> >
>
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django
*Sorry for confusing,my English is bad also.
The problem is django-voting is not provide templatetags to access vote for
particular object. Instead it provide templatetags to access only template
context variable (Correct me if I'm wrong). See bebow,
score_for_object
Retrieves t
When I installed my web at webfaction I did this to see which module python
use,
at settings.py
import os
import django, PIL
logfile = open('path.log', 'w')
django_path = django.__file__
pil_path = PIL.__file__
logfile.write('django - %\n pil - %s\n' % (django_path, pil_path))
logfile.close()
mod_python (django.core.handlers.modpython),
request.META['GATEWAY_INTERFACE'] = 'CGI/1.1'
or
request.META['SERVER_SOFTWARE'] = 'mod_python''
or
'ModPythonRequest' in request.__str__()
Django, wsgi handler (django.core.handlers.wsgi)
'WSGIRequest' in request.__str__()
Hope this help,
C
t; before I have a request object to look at?
>
> On May 12, 6:56 pm, "Chatchai Neanudorn" <[EMAIL PROTECTED]> wrote:
> > mod_python (django.core.handlers.modpython),
> >
> > request.META['GATEWAY_INTERFACE'] = '
from tagging.fields import TagField
class Post(models.Model):
tags = TagField()
#in your template. For example, object_details
{% load tagging_tags %}
{% tags_for_object object as tag_list %}
{% if tag_list %}
Tags:
{% for tag in tag_list %}
{{ tag }}{% if not
themplatetag + django session (or caching), you can maintain state of
variable.
I have a change to look at ASP.NET. For my understanding, it automatically
generate
Javascript for developer, good if dont want to deal with javascript, for me
it is bad idea.
ViewState, it keep state data in memory (
Hi,
If you want to add functionalities to test client, you may need to modify
(or subclass, if posible ) the client code (django.test.client.Client).
I used to add ability to set, get "HTTP_HOST" environment, For example,
> self.client.http_host = "google.com"
So, when my I run unit test, my co
http://www.feedfrog.net/blog/2008/may/29/using-ms-sql-django/
Hope this help,
Chatchai
2008/6/25 Russell Keith-Magee <[EMAIL PROTECTED]>:
>
> On Wed, Jun 25, 2008 at 7:03 AM, Nagu <[EMAIL PROTECTED]> wrote:
> >
> > Hi,
> >
> > After doing some search on Google, Django has some kind of backend
>
First thing when you work with Java script is, make sure it is available. In
this case, where is your urls config.
>From these,
Can you start web server and type
http://localhost/usr/share/tinymce/www/tiny_mce.js
Oh, Fixed me, 404 (File not found!)
I was in situation like you, before. Some instruction or recipe assume you
have basic understanding of django.
There are a lot of django recipe assume that you put js or css under the
same place of admin media.
In this case, you don't need to configure media ur
http://192.168.1.4:8000/tiny_mce/tiny_mce.js vs [08/Jul/2008 19:37:23] "GET
/tiny_mce/langs/en.js HTTP/1.1" 404 1771
What is "lang" at the right side?
Chatchai
2008/7/9 LRP <[EMAIL PROTECTED]>:
>
> Hi,
>
> Thanks to all for responses, but puzzle persists...
>
> Mathias, I added the slash. Still
Ok, Got you. Where is retrun code for
/tiny_mce/tiny_mce.js<http://192.168.1.4:8000/tiny_mce/tiny_mce.js>itself,
Did you mean all js under /tiny_mce cannot be loadded by django?
What is environment you are working on?
2008/7/9 Chatchai Neanudorn <[EMAIL PROTECTED]>:
> http://1
I 'm implementing file upload app. A client can be both web and desktop
application. I have tested using html form and receive file via
request.FILES, it success. For desktop app, I use python urllib which data
can be encoded into python dictionary (urllib.urlencode) and send it to my
django web wi
I need to know what is structure of request/response create by django. How
to capture or are there any tools to see what request and response is?
Thank
chatchai
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django
<[EMAIL PROTECTED]>:
>
>
> On 1/29/07, Chatchai Neanudorn <[EMAIL PROTECTED]> wrote:
> > I need to know what is structure of request/response create by django.
> How
> > to capture or are there any tools to see what request and response is?
>
>
Hi
Are there comparing performance of uploading between django itseft and
tramlime. What is the best way, installation and proformace are subject of
comparing.
Thank
Chatchai
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Go
25 matches
Mail list logo