2008/4/11 Dmitriy Sodrianov <[EMAIL PROTECTED]>:
> Is it possible to use only Django's built-in functions?
Yes, but you will end up essentially re-implementing all the code in
the application Alex suggested.
When an application exists that helps you to do what you want, it's
quite silly to go d
Is it possible to use only Django's built-in functions?
On 11 апр, 04:21, Alex Koshelev <[EMAIL PROTECTED]> wrote:
> Try to use this very good applicationhttp://code.google.com/p/django-mptt/.
>
> On Apr 10, 11:15 pm, Dmitriy Sodrianov <[EMAIL PROTECTED]> wrote:
>
> > Hi to all.
>
> > I have a mo
Hi
Getting pissed off with site blocking at work and University. Here is
the complete list of all the proxy servers.
Enjoy !!
www.proserver.co.nr
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django us
I already have seen those, but never had the demo. Do you know any
site which implements this Django forum app. This way I can get the
overview of features used.
On Apr 10, 10:23 pm, "Tane Piper" <[EMAIL PROTECTED]>
wrote:
> A simple browse on Django Forum would have brought you to this:
>
> http
Hi all--
I'd like my categories to be ordered reverse alphabetically, so I've
done the following:
class Category (models.Model):
name = models.CharField(max_length=50)
slug = models.SlugField(prepopulate_from=("name",))
supercategory = models.ManyToManyField(Supercategory
In the __init__ method of the newforms.forms.BaseForm object, the
initialized fields
are copied as the fields as seen below
# The base_fields class attribute is the *class-wide* definition of
# fields. Because a particular *instance* of the class might want to
# alter self.fields, we create self.
I have run into an interesting problem with newforms. I am trying to
create an arbitrary number of fields on a form based on model data.
This works fine.
class SonglistForm(forms.Form):
def __init__(self, *args, **kwargs):
super(SonglistForm, self).__init__(*args, **kwarg
Thanks for the replies, but I guess I didn't make myself clear
enough. Counter was just as an example, I don't want an actual page
counter.
I guess part of my question is: Yes, I can use AJAX-y XMLHttpRequest
to send info to the server in the background, but has someone done
this already in dja
In [19]: def show_sql(query):
: clauses = query._get_sql_clause()
: return 'SELECT %s %s' % (', '.join(clauses[0]),
clauses[1])
:
In [21]: show_sql(Page.objects.all())
Out[21]: 'SELECT "main_page"."id", "main_page"."title",
"main_page"."slug", "main_page"."content" F
On Wed, Apr 9, 2008 at 1:24 PM, binaryj <[EMAIL PROTECTED]> wrote:
>
> i plan to help on doing this but right now i dont have the time and a
> working app account to do this.
I can get you developer access on an account when you have time, just
let me know off list.
--~--~-~--~~---
I need to translate django db-api query code like
modelobject.objects.all() to a raw SQL from a shell, is it possible
without using connection.queries (which is logging all SQL - i just
need one for a particular line of code)
--~--~-~--~~~---~--~~
You received this
lol I actually have a job that use my programming skills (lol lack
of), but when I view some of your code out there, lol you guys are
programming circles around me.
On Apr 10, 6:53 pm, Roboto <[EMAIL PROTECTED]> wrote:
> whoa!
>
> Lots of great answers here. Thanks for the help, I'm going to go
whoa!
Lots of great answers here. Thanks for the help, I'm going to go
through all these answers one by one and figure out which is best for
me.
I won't be doing a straight dump, so it's gonna be interesting =p
It's easy to do in C# though! But hopefully a solution listed here
will be just as p
Hi,
I'm translating an application from French to English and everything
was going smoothly until I began work on a particular form. The code
looks like this:
# -*- coding: utf-8 -*-
from django import newforms as forms
from django.conf import settings
from django.utils.translation import ugette
Taylor wrote:
> Does something exist so that a link on a page performs an action
> rather than just showing a view?
> For example: I have a counter saved to the db, and every time a user
> clicks the link, the counter increases by a certain number and saves.
>
>
> without even visiting the pag
Hello Ralf,
A possible third option would be to bypass using sockets and use
something like XML-RPC instead (which can still use the same server
running) and have your 'client' issue XML-RPC requests. There's a
Google code project that makes this absolutely trivial through Django,
http://code.goo
Try to use this very good application http://code.google.com/p/django-mptt/.
On Apr 10, 11:15 pm, Dmitriy Sodrianov <[EMAIL PROTECTED]> wrote:
> Hi to all.
>
> I have a model that can be described briefly as follows:
>
> class Task(models.Model):
> title = models.CharField(max_length = 250)
>
Is it possible to get the timestamp of a page cached using the
@cache_page decorator (decorating a view)?
I'd like to display 'Last updated: %s' on the cached page, and provide
an "Update now" link (that would delete it from the cache).
--
Daryl Spitzer
--~--~-~--~~~
>
> If you plan on communicating between these two types of services over
> TCP sockets, I don't see why that would be easier with option #2 than
> with option #1. Socket communication shouldn't have to care if the end
> points of the socket belong to the same process or two different
> processe
Look into AJAX
On Thu, Apr 10, 2008 at 5:09 PM, Taylor <[EMAIL PROTECTED]> wrote:
>
> Does something exist so that a link on a page performs an action
> rather than just showing a view?
> For example: I have a counter saved to the db, and every time a user
> clicks the link, the counter increases
Does something exist so that a link on a page performs an action
rather than just showing a view?
For example: I have a counter saved to the db, and every time a user
clicks the link, the counter increases by a certain number and saves.
I know that I could create a URL that takes in a parameter a
On Apr 10, 1:40 pm, Rajesh Dhawan <[EMAIL PROTECTED]> wrote:
> On Apr 10, 3:58 pm, Mojave <[EMAIL PROTECTED]> wrote:
>
>
>
> > Given:
>
> > class Topic(models.Model):
> > title = models.CharField(maxlength=200)
> > link = models.CharField(maxlength=200)
>
> > class Item(models.Mo
On Apr 10, 3:58 pm, Mojave <[EMAIL PROTECTED]> wrote:
> Given:
>
> class Topic(models.Model):
> title = models.CharField(maxlength=200)
> link = models.CharField(maxlength=200)
>
> class Item(models.Model):
> topic = models.ForeignKey(Topic)
> user = models.Foreig
Okay, solved this. It was the offending latest(). I thought it
returned a QuerySet, but I was badly mistaken. I don't even know how I
got the idea... :)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" g
Given:
class Topic(models.Model):
title = models.CharField(maxlength=200)
link = models.CharField(maxlength=200)
class Item(models.Model):
topic = models.ForeignKey(Topic)
user = models.ForeignKey(User)
I want to get a list of Items ordered by the title of their
>
> If you enter a valid email address in the ADMINS tuple of your
> settings.py, any tracebacks will be emailed to you.
> --
Yes, sorry, I should have been clearer. I'm not having a problem
getting the tracebacks by email, but they contain much less data than
the traceback screens do with DEBUG=
shabda wrote:
> I have tried to write a Django tutorial for Appengine.
> A live install of this can be seen at http://blogango.appspot.com
I get a 403 Forbidden when I try to vote...
Kent
--~--~-~--~~~---~--~~
You received this message because you are subscribe
http://ccpdz.sarl.tk
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTEC
On 10 Apr, 20:03, "Hancock, David (dhancock)" <[EMAIL PROTECTED]>
wrote:
> We've got a Django system deployed, and we set DEBUG=False in the settings
> file. What I'd still like to be able to do, though, is get the full
> traceback for viewing if needed. (The one that shows up with DEBUG=True.)
>
I believe that the last e-mail was spam. Anyway django can send you an email
whenever there is an error:
http://www.djangoproject.com/documentation/settings/#error-reporting-via-e-mailThis
is very helpful. Of course you need all the settings set up right and
an e-mail server on your server or elsew
salut
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more o
http://membres.lycos.fr/ccpfordz
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [
Hi to all.
I have a model that can be described briefly as follows:
class Task(models.Model):
title = models.CharField(max_length = 250)
subtasks = models.ManyToManyField('Task', null=True, blank=True)
How can I build a tree of task and subtask with level greater than
two?
--~--~--
http://ccpdz.sarl.tk
2008/4/10, Hancock, David (dhancock) <[EMAIL PROTECTED]>:
>
> We've got a Django system deployed, and we set DEBUG=False in the settings
> file. What I'd still like to be able to do, though, is get the full
> traceback for viewing if needed. (The one that shows up with DEBUG=T
We've got a Django system deployed, and we set DEBUG=False in the settings
file. What I'd still like to be able to do, though, is get the full
traceback for viewing if needed. (The one that shows up with DEBUG=True.)
The expandible/collapsible parts, local variables, etc., are helpful for
troubles
Ahh Rajesh you are a wonderful person and a life saver. May thousands
of glorious blessings come to you this day!
Thanks
--
matthew
On Apr 10, 12:20 pm, Rajesh Dhawan <[EMAIL PROTECTED]> wrote:
> On Apr 10, 1:39 pm, mthorley <[EMAIL PROTECTED]> wrote:
>
> > Greetings, I've got a django installat
I used xlrd to import form excel, it did everything i wanted it to do
On Apr 9, 9:56 pm, "Alex Ezell" <[EMAIL PROTECTED]> wrote:
> On Wed, Apr 9, 2008 at 5:44 PM, Todd O'Bryan <[EMAIL PROTECTED]> wrote:
> > There's also xlrd:
>
> >http://www.lexicon.net/sjmachin/xlrd.htm
>
> XLRD seems to have ha
Hi Rajesh,
Thanks.
This was a dumb-dumb mistake I did.
I think I never realized that I was using the wrong port. (
My mind turned a blind spot to this :)
The whole lighttpd setup is working smoothly.
Thanks,
Venkat
On Apr 10, 11:41 pm, Rajesh Dhawan <[EMAIL PROTECTED]> wrote:
> Hi Venkat,
Hi Venkat,
>
> My fastcgi config is (added at the end of conf file),
> fastcgi.debug = 1
> fastcgi.server = (
> "/django.fcgi" => (
> "main" => (
> "host" => "127.0.0.1",
> "port" => 3456,
> )
>
> When I request the home page like,
> links 'http://127.0
Oops, gave wrong link. The correct link is
http://www.42topics.com/dumps/django/docs.html
. That one I wrote yesterday for people who already know Django.
On Apr 10, 11:35 pm, shabda <[EMAIL PROTECTED]> wrote:
> I have tried to write a Django tutorial for Appengine. This can be
> found herehttp:
Hi,
> I'm creating an application containing two interfaces: a socket server
> and a web interface. Both interfaces require access to the same
> database, and there will be a small amount of communication between
> the two interfaces.
>
> I want to use Django for the web interface, as well as the
I have tried to write a Django tutorial for Appengine. This can be
found here http://www.42topics.com/dumps/appengine/doc.html. This is a
port of the django tutorial from
http://www.djangoproject.com/documentation/tutorial01/
to use Appengine. A live install of this can be seen at
http://blogang
On Apr 10, 1:39 pm, mthorley <[EMAIL PROTECTED]> wrote:
> Greetings, I've got a django installation with 259,535 auth_user
> records, (not that many), but the admin is running REALLY slow.
set raw_id_admin=true wherever you have a ForeignKey to the auth User
table.
See the description for "raw
Jarek Zgoda wrote:
> Chris Hoeppner napisał(a):
>
>
>> This is new to me. Dojo will be the official js toolkit for django?
>> Above jQuery? How come?
>>
>
> No. It was stated many times: Django would not have any "official js
> toolkit" and will not "be bound to" or "embrace" any single to
Greetings, I've got a django installation with 259,535 auth_user
records, (not that many), but the admin is running REALLY slow.
The user index pulls up fast, but when I click a record to see it in
detail, it takes forever and ever! In fact, I haven't been able to get
an individual record to disp
A simple browse on Django Forum would have brought you to this:
http://djangoplugables.com/projects/django-forum/
On Thu, Apr 10, 2008 at 6:12 PM, myst3rious <[EMAIL PROTECTED]> wrote:
>
> Hi,
> I am working on a Django project for Intranet. and I took a lots time
> in developing apps, just o
Hi,
I am working on a Django project for Intranet. and I took a lots time
in developing apps, just opposite to the Django philosophy of quick
but clean development. That is completely my fault, and overtime in
requirement analysis and application architecture design.
Now, I need to create/integrat
I used a similar technique as well. Instead of adding another
parameter , I used "initial=" parameters in view which is passed
through **kwargs.
form = NewCaseForm(initial={'my_group': data}). and my solution seems
more hack than yours.
But it works too. Passing through *args, bind the form and t
You can also just call
form.base_fields['tasks'].queryset = tasks
which will do this:
form.base_fields['tasks']._set_queryset( tasks )
How I found it? I actually looked at the django code. As you said in
your post, I've never seen it documented anywhere. I came across it
after I found it i
I tried spawn-fcgi, doesn't work for me :(
The worst part is, even wget times out, and no clue is present
anywhere.
I guess I will have to try Njinx.
Regards,
Venkat
On Apr 10, 7:22 pm, Etienne Robillard <[EMAIL PROTECTED]>
wrote:
> On Thu, 10 Apr 2008 06:06:16 -0700 (PDT)
>
>
>
> annacoder <
Nianbig schrieb:
> Anyone know whats causing this error message? I get several of them
> per day, now from diffrent IP-addresses.
>
>> Traceback (most recent call last):
>>
>> File "/usr/lib/python2.4/site-packages/django/core/handlers/base.py",
>> line 68, in get_response
>>callback, callba
ok I seem to have been able to make it work by passing in an extra
parameter in through the __init__ is this the best solution?? even
though it works it feels like i am doing something incorrect...
class AddMemberForm(forms.ModelForm):
def __init__(self, obj, *args, **kwargs):
super(
I usually do it via JavaScript [1]. However, this only works in an
environment when you trust the person editing the content (i.e. the
Admin).
-Mike
1: http://mike.axiak.net/media/js/admin_overrides.js
--~--~-~--~~~---~--~~
You received this message because you
> Whoa,
> You can just overwrite save in the models and/or the form and get the person
> who created the object. If you want to limit access to these models it gets
> more complicated as the other users told you, but to get the original
> creator just:
>
> class Article(models.Model):
>
Hi
I am trying to create a ModelForm with a ModelChoiceField which has a
should have a limited queryset that is filtered by the userprofile
logged in, so far i have this:
class AddMemberForm(forms.ModelForm):
member =
forms.ModelChoiceField(Member.objects.filter(userprofile=userprofile))
Whoa,
You can just overwrite save in the models and/or the form and get the person
who created the object. If you want to limit access to these models it gets
more complicated as the other users told you, but to get the original
creator just:
class Article(models.Model):
owner = model
On Thu, Apr 10, 2008 at 10:31 AM, Manuel Meyer <[EMAIL PROTECTED]>
wrote:
>
> Hey,
>
> I have a type Article in which i hold a Type HeaderImage within an
> OneToOneField-Relationship.
> When adding an article via contrib.admin interface everything works
> as expected.
> But if I edit an existing a
Hey,
I have a type Article in which i hold a Type HeaderImage within an
OneToOneField-Relationship.
When adding an article via contrib.admin interface everything works
as expected.
But if I edit an existing article, the drop-down list doesn't appear
anymore.
class Article(models.Model):
On Thu, Apr 10, 2008 at 4:54 AM, firtzel <[EMAIL PROTECTED]> wrote:
>
>
> > A few details on what "does not seems to work properly" looks like might
> > help people help you.
>
> Thanks for your reply. You're absolutely right. Here are some more
> details:
> In the admin, when I try to save a cata
On Thu, 10 Apr 2008 06:06:16 -0700 (PDT)
annacoder <[EMAIL PROTECTED]> wrote:
>
> Hi,
> I am trying hard to figure out why my lighttpd + fastcgi + django
> setup is not working.
> First, I have verified my django project is OK by running it with the
> local web server provided by django.
>
>
Hi all,
I want the search in the admin site to search in reverse ForeignKey
related objects' text fields. I know similar issues have been brought
up before but I haven't found anything that quite fits my situation.
I've tried searching quite a bit and asking on #django but haven't
found any answe
Hi,
I am trying hard to figure out why my lighttpd + fastcgi + django
setup is not working.
First, I have verified my django project is OK by running it with the
local web server provided by django.
To setup lighttpd, I followed the setup instructions from here:
http://wiki.slicehost.com/doku
CSS swapping via settings file seems like good idea. Thanks for that..
But when it comes storing messages in the database: I don't think it's
feasible.
By messages I mean almost all of the strings throughout the source;
page titles, headers in templates, error messges that are added to
user messag
On Apr 10, 3:22 am, Tim Chase <[EMAIL PROTECTED]> wrote:
> > yeah but the thing is XLS spreadsheets have a lot more
> > meta-data than CVS can handle
>
> I've found the easiest way for us was to use the "XML
> Spreadsheet" option (available via the Save As->Type drop-down in
> at least Excel 200
Maybe I'm over simplyfying this ... but why not just swap out the css
file you are using based on a setting you can change in your
settings.py fileas well as modify the database you are calling in
your settings.py file, and store your messages in a table... where the
data would be different in
Hi,
I'm creating an application containing two interfaces: a socket server
and a web interface. Both interfaces require access to the same
database, and there will be a small amount of communication between
the two interfaces.
I want to use Django for the web interface, as well as the ORM for th
There's something that I don't really grasp about appengine models.
I see the similarities between them and django models, tho Django knows
where to look for them, and thus knows how to manage those classes.
Appengine has it's own stuff, and at the bottom of the django page it's
said that you do
Here's the custom manager code. I didn't have the latest version with
me, so I try to recreate the get_hot() method below.
class PublishedManager(models.Manager):
def get_query_set(self):
return super(PublishedManager,
self).get_query_set().filter(published=True).filter(c
On Apr 10, 12:38 pm, Jarek Zgoda <[EMAIL PROTECTED]> wrote:
> Can your get_hot() method (is it manager?) use filter() instead of
> get()? This way you would get QuerySet.
Well, it is a custom manager method that uses filter(). I just named
it get_hot (which, now that you mention it, may be a bit
On Thu, Apr 10, 2008 at 12:13 PM, Daniel Roseman
<[EMAIL PROTECTED]> wrote:
>
> On Apr 10, 10:50 am, "Almir Karic" <[EMAIL PROTECTED]> wrote:
> > i have an error caused by the following line (which worked without
> > problems on regular django trunk)
> >
> > slug =
> models.SlugField("url_pr
foxbunny napisał(a):
> I'm trying to shove some custom query sets into extra context for
> something like 5 generic view items. One of the QSs finds all news
> items that are marked as 'hot' and is used to display those item (if
> they exist) in a small list on any page along with whatever content
I'm trying to shove some custom query sets into extra context for
something like 5 generic view items. One of the QSs finds all news
items that are marked as 'hot' and is used to display those item (if
they exist) in a small list on any page along with whatever content is
intended for the main col
On Apr 10, 10:50 am, "Almir Karic" <[EMAIL PROTECTED]> wrote:
> i have an error caused by the following line (which worked without
> problems on regular django trunk)
>
> slug =
> models.SlugField("url_prefix",max_length=50,unique=True,prepopulate_from=('name',),help_text='e.g.
> "janez_marijan_p
Came across this the other day, never used it.
http://code.google.com/p/django-databasetemplateloader/
It seems to allow you to store templates in the database, so could this be
used together with the sites framework to skin your sites differently?
Tim.
On Thursday 10 Apr 2008, Polat Tuzla w
Polat Tuzla napisał(a):
> I'd like to build two sites, say, two polls sites, each having their
> own domain name. Their functionalities are almost exactly the same.
> They're different only by theme. By theme, I mean both the site design
> (visual theme) and the site messages. For example one is
On 2008-04-10, at 0312, Polat Tuzla wrote:
>
> Hi,
> I'd like to build two sites, say, two polls sites, each having their
> own domain name. Their functionalities are almost exactly the same.
> They're different only by theme.
> [...]
> What exact way of achieving this would you suggest me?
> Than
i have an error caused by the following line (which worked without
problems on regular django trunk)
slug =
models.SlugField("url_prefix",max_length=50,unique=True,prepopulate_from=('name',),help_text='e.g.
"janez_marijan_potokar_novak" (PAZI, SUMNIKI)')
any ideas what am i doing wrong?
Traceb
Hi all,
Can anyone share a code of integrating freecomments and recaptcha. I have
seen that it is easy to integrate it using newforms. However, I am running
into a few issues whenever I try it with the classic freecomments
integration.
I am talking of integrating with free_preview.html and freef
Hi,
I'd like to build two sites, say, two polls sites, each having their
own domain name. Their functionalities are almost exactly the same.
They're different only by theme. By theme, I mean both the site design
(visual theme) and the site messages. For example one is for polls
about music and the
> A few details on what "does not seems to work properly" looks like might
> help people help you.
Thanks for your reply. You're absolutely right. Here are some more
details:
In the admin, when I try to save a catalog with more than one BadItem,
I get the following error:
Exception Value:
On 9 Apr 2008, at 5:55 pm, Rodrigo Culagovski wrote:
>
> Thanks for the answers. I ended up using Pilgrim & Swartz's
> 'sanitize.py' [1], and adding a custom 'save' function to the classes
> where I need it, like so:
>
> def save(self):
> self.summary=util.SomeTags(self.summary,'utf8'
>
> Hey fellow Djangorians,
> >
> > I've got an encoding problem with the latest checkout of Django. I
> > just upgraded, on Mac OS X, from 0.96 over to the current SVN trunk.
> > The migration worked well except for the fact that when I create an
> > entry with the admin interface that makes use
>
> I'm looking for the easiest way to parse xml file in Django/Python
> without using dom methods like getelementbyid etc. I preffer jquery-
> like syntax/selectors. Unfortunatelly I can't find that kind of
> library for Python.
elementtree is your friend; included with Python 2.5
file = 'my.xm
Ian Holsman napisał(a):
> Writing it here as lefora is written on django, and he or the developer
> who wrote it for him will see it and be ashamed of themselves.
>
> This guy just IM'd me asking me to digg his forum software.
>
> I have never met the guy, and am assuming he also spammed other
Marc Fargas escribió:
> Simply set DEBUG=False in your settings.py, when an exception raises
> django will send the traceback to the people defined in ADMINS (also in
> settings.py)
>
> Documentation about that is:
> http://www.djangoproject.com/documentation/settings/#error-reporting-via-e-mail
Simply set DEBUG=False in your settings.py, when an exception raises
django will send the traceback to the people defined in ADMINS (also in
settings.py)
Documentation about that is:
http://www.djangoproject.com/documentation/settings/#error-reporting-via-e-mail
Regards,
Marc
El jue, 10-04-2008
Does anyone else think I should add a ticket request for this as a
future feature?
On Apr 9, 7:32 pm, Waldemar Kornewald <[EMAIL PROTECTED]> wrote:
>
> Most of this can be automated (scanning installed apps for media
> folders, generating urlpatterns, etc.) and IMHO Django should provide
> a sta
Hi,
I've read somewhere that there is a way in django to send exceptions by
mail. I can't remember where.
Does anyone know where could I find documentation about that?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Grou
I would like to get an answer for this too. Just reading through
Justin's code, I have figured out the solution to a problem I was
stuck on for a few days (I am new to Django so reading and learning
about the _set_queryset function was a godsend).
Also, I was wondering if someone can point me in
89 matches
Mail list logo