On Sun, Aug 27, 2006 at 10:36:29AM +0100, Derek Hoy wrote:
> On 8/25/06, Baurzhan Ismagulov <[EMAIL PROTECTED]> wrote:
> > I add /dir to PYTHONPATH. In this layout, I have to put the html
> > templates to /dir/verdjnlib/templatepages/templates/templatepages. How
> > can I customize the direc
Jay Parlar wrote:
> The problem is your indentation of the last two lines. You have them
> inside of the 'if request.POST'. Take them each back four spaces, and
> you should be fine.
>
> Jay P.
That's it! Kinda embarassing ;-)
Lorenzo
--~--~-~--~~~---~--~~
You
On 28 Aug 2006, at 01:40, gabor wrote:
>
> [EMAIL PROTECTED] wrote:
>> What does one need to do to set up MySQL to handle Unicode with
>> Django?
>> I found that I could not input Unicode characters in the admin
>> interface when using MySQL as the back end. Everything works
>> perfectly
>
Hello,
I have this 2 models:
class TimeInterval(models.Model):
start = models.TimeField()
stop = models.TimeField(null=True, blank=True)
class Day(models.Model):
day = models.CharField(maxlength=2)
timeintervals = models.ManyToManyField(TimeInterval)
I fill it with some d
On 8/28/06, Michal <[EMAIL PROTECTED]> wrote:
I suppose, that I get one objects, which accomplish all given parameters.But I get list of two (first match condition day='th' andtimeinterval=t2, second match day='th' and timeinterval=t3).Is there any way to write query, which will fetch from DB only
> If I understand you correctly, you are looking to construct a query for all
> Date objects that have exactly 2 related time intervals (t2 and t3) which
> also have day=th; that is, a query something like:
>
> Date.objects.filter(day='th', timeintervals__eq=[t2,t3])
yes something like this...
> Using .* in your URL regexes is not recommended, you only want to match
> what you absolutely need to match. Something like the following would
> be better:
>
> (r'^tags/(?P([a-zA-Z0-9-]+/)+)$', 'ssrc.blog.views.tags')
OK, cool. Thanks!
> This could be very much simplified now, and with the r
> An SQL query that describes your requirements is not easy to compose, as SQL
> is ultimately restricted to comparisons performed on individual rows. I
> suspect you may need to hand-roll some SQL to achieve the query results you
> are seeking.
If I'm following correctly, this is the same scenar
Alan,
I think what you're talking about is this paragraph from the doc:
"Also, you can give RequestContext a list of additional processors,
using the optional, third positional argument, processors. In this
example, the RequestContext instance gets a ip_address variable:
def ip_address_processor
I want included-including templates to be able to act independently
from each other. I want the including template to not have to know
anything about the particulars of the template it's including.
I want to be able to write {%include magic_template%} and
magic_template would be a url that would
How can I see thumbnails instead of links on "edit" admin page ?
I see { bound_field_line } is printed there, what should I fix to have image
instead of link to file ?
I tried PhotoField, ImageWithThumbnailField.
--~--~-~--~~~---~--~~
You received this message
When I have syntax error in python code of an app, where it goes ?
I'm working under apache, same config as production, but MaxRequestsPerChild 1
There are no syntax errors in apache error log or site error log.
What's up ?
How should I setup things ?
my vhost --
Ok, so I've got my Django stuff complete with accounts, registration
and all that,, and I've got a legacy db handling punBB, but I'd really
like to set it up so one user registration works everywhere. The
obvious answer would be a BB in django, but the zyons solution doesn't
seem quite ready for p
Ok, so I'm new and I'm having a problem with generic views and I can't
seem to find any documentation on this. I have the detail_list view
working as I want it, pulling everything in the database up and
rendering it out as I want.
When you go to view the detail of one object, tho, I can't seem to
Hey all, I'm new and get lost easily, and I'm probably just unable to
find the documentation on this, but I'm stuck.
I'm using the generic views to create a list of objects in a module and
then to show the details of any one of those objects. The problem that
I have is that I want to have 'previo
My application needs to limit the size of the user's files when they
upload it!
The doc didn't say anything about it!
I do need these answers!
thanks!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users"
New Release!
Download: http://www.rk.edu.pl/diamanda.zip
New in 0.1:
- Many2Many categories for WikiPages.. and WikiNews
- Categories are Many2One with them self (trees + poor mans tree
system)
- Better CSS & look
- page showing full tree of categories with titles & links of WikiPages
in them
-
You could cross integrate django and punBB:
-registration on punBB creates a user in Django -> insert proper data
in the proper tables
- Register on django does the same on punBB (this is easier :) )
I've been playing with some punBB PHP integrations so I can help a bit
with the Python one :)
Hi everyone,
I am trying to upload multiple image files in one of my projects.
Single-File upload works fine, but how do I Get to upload many files in
the same form?
I have many of these in the templates:
{{ form.picture }} {{ form.picture_file }}
Then on my views i have:
fo
Hi fellows,
I have been using Django administration via Web to manage my
application, but now need one more functionality, i.e., when I save a
new register the application should be creates, for example,a new
directory tree (/var/newregister/).
Where can I add this feature?. I have used postgr
On 8/28/06, Ilia Kantor <[EMAIL PROTECTED]> wrote:
>
>
> When I have syntax error in python code of an app, where it goes ?
>
> I'm working under apache, same config as production, but MaxRequestsPerChild 1
>
> There are no syntax errors in apache error log or site error log.
> What's up ?
I don'
Try overriding the save method in your model as documented here:
http://www.djangoproject.com/documentation/model_api/#overriding-default-model-methods
If you only want to create the directory when a new entry is made try
something like this:
def save(self):
# check if we are updating o
If you run
On 8/28/06, Jay Parlar <[EMAIL PROTECTED]> wrote:
>
> On 8/28/06, Ilia Kantor <[EMAIL PROTECTED]> wrote:
> >
> >
> > When I have syntax error in python code of an app, where it goes ?
> >
> > I'm working under apache, same config as production, but
> > MaxRequestsPerChild 1
> >
> > Th
I have single static IP on my home host, and 80 port is occupied by apache.
I'm very satisfied by dev process using it.
After all, I think such behavior ("eating" errors) is simply wrong.
I want track errors from logs after deployment, because fixes on live server
should be possible.
> On 8/2
On 8/28/06, Ilia Kantor <[EMAIL PROTECTED]> wrote:
> After all, I think such behavior ("eating" errors) is simply wrong.
> I want track errors from logs after deployment, because fixes on live server
> should be possible.
When the 'DEBUG' setting is False, Django will email tracebacks of any
erro
On 8/28/06, Ilia Kantor <[EMAIL PROTECTED]> wrote:
>
>
> I have single static IP on my home host, and 80 port is occupied by apache.
> I'm very satisfied by dev process using it.
>
> After all, I think such behavior ("eating" errors) is simply wrong.
> I want track errors from logs after deploymen
thanks, that help me a lot :)
--~--~-~--~~~---~--~~
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 [E
You note
> With adding the script AddFileBrowser.js to your model, you are getting a
> link to the FileBrowser
> as well as an Image-Preview.
How can I use it in my model to have previews for image field ?
I see
init: function() {
var helptext = document.getElementsByTagName('p');
my settings.py starts with
DEBUG = True
TEMPLATE_DEBUG = DEBUG
> On 8/28/06, Ilia Kantor <[EMAIL PROTECTED]> wrote:
> > After all, I think such behavior ("eating" errors) is simply wrong.
> > I want track errors from logs after deployment, because fixes on live
> > server should be possible.
>
Hi everyone,I have been learning django and got my devel server up and running, I can access the admin section after going though the tutorial.I have got my own application going, and running the examples but with my own templates I can not get my stylesheet or images loaded.the following is my tem
Hi everyone,
I have been learning django and got my devel server up and running, I
can access the admin section after going though the tutorial.
I have got my own application going, and running the examples but with
my own templates I can not get my stylesheet or images loaded.
the following is
You can do something like this:
def extra_object_detail(...):
context = {"next":nextObj, "previous":previousObj}
return object_detail(..., extra_context=context)
The generic view adds the extra_context parameter to the context so you
can access it in your template.
Chris
--~--~---
On 8/28/06, Ilia Kantor <[EMAIL PROTECTED]> wrote:
>
> my settings.py starts with
>
> DEBUG = True
> TEMPLATE_DEBUG = DEBUG
>
Are you listed in ADMINS? Is your system properly configured to send
email? (ie.on my setup, I needed to configure the EMAIL_HOST and
SERVER_EMAIL options).
Jay P.
--~--
Hi,
I have been putting up several web sites with django. I use a single
media server, with symlinks from the different projects. This includes
the admin interface.
In the \django\contrib\admin\media you find an admin folder for
--~--~-~--~~~---~--~~
You received
in your model use something like this:
image = models.CharField('Image', help_text='FileBrowser: /images/
2006/blog/', maxlength=200, blank=True, null=True)
the script you mentioned searches for the help_text "FileBrowser" and
the given directory (the directory is optional, of course).
then,
btw, I´m about to rewrite that script using jquery ...
patrick
Am 28.08.2006 um 20:11 schrieb [EMAIL PROTECTED]:
>
> You note
>> With adding the script AddFileBrowser.js to your model, you are
>> getting a link to the FileBrowser
>> as well as an Image-Preview.
>
> How can I use it in my mode
when I send an email to the group, it takes about one hour for this
mail to show up on the list.
is that intended?
patrick
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this grou
Sorry, my email was sent earlier than expected. Complete email here.
Hi,
I have been putting up several web sites with django. I use a single
media server, with symlinks from the different projects. This includes
the admin interface.
In the /django/contrib/admin/media you find an admin folder f
On Mon, 2006-08-28 at 11:18 -0700, casibbald wrote:
> Hi everyone,
>
> I have been learning django and got my devel server up and running, I
> can access the admin section after going though the tutorial.
>
> I have got my own application going, and running the examples but with
> my own templat
Hi Malcom.Ive tried this and it does not work "Static setting"any other ideasregardscharles- Original Message From: Malcolm Tredinnick <[EMAIL PROTECTED]>To: django-users@googlegroups.comSent: Monday, August 28, 2006 7:32:17 PMSubject: Re: Django working but cant load stylesheet or images o
I have added the details from static_files example as follows:
from django.conf.urls.defaults import *
from django.conf import settings
urlpatterns = patterns('openbilling.polls.views',
# (r'^openbilling/', include('openbilling.apps.foo.urls.foo')),
(r'^polls/$', 'index'),
(r
no, I did not care about it yet.
I'm under Gentoo box w/ sendmail wrapper
> On 8/28/06, Ilia Kantor <[EMAIL PROTECTED]> wrote:
> > my settings.py starts with
> >
> > DEBUG = True
> > TEMPLATE_DEBUG = DEBUG
>
> Are you listed in ADMINS? Is your system properly configured to send
> email? (ie.on
Can I integrate that with ImageField (or its inheritants) ?
> btw, I´m about to rewrite that script using jquery ...
>
> patrick
>
> Am 28.08.2006 um 20:11 schrieb [EMAIL PROTECTED]:
> > You note
> >
> >> With adding the script AddFileBrowser.js to your model, you are
> >> getting a link to the
Works great!
But probably the better way would be to make a special FileBrowserField.
Such fixing is kind of hack..
> btw, I´m about to rewrite that script using jquery ...
>
> patrick
>
> Am 28.08.2006 um 20:11 schrieb [EMAIL PROTECTED]:
> > You note
> >
> >> With adding the script AddFile
On Mon, 2006-08-28 at 12:12 -0700, casibbald wrote:
> I have added the details from static_files example as follows:
[...]
> if settings.DEBUG:
> urlpatterns += patterns('',
> (r'^site_media/(?P.*)$', 'django.views.static.serve',
> {'document_root': '/var/www/vhosts/opentelcom.org/open
Hi Malcom,
So you mean something like this:
if settings.DEBUG:
urlpatterns += patterns('',
(r'^images/(?P.*)$', 'django.views.static.serve',
{'document_root': '/var/www/vhosts/opentelcom.org/openbilling/media'}),
)
and then in my template i can refer to an image as follows:
Title: Problem with models.HORIZONTAL in admin inline editing
I’m seeing different behavior for filter_interface=models.HORIZONTAL when I’m editing inline vs. adding an object directly. I’ve tried to boil this down to a short model that demonstrates the problem:
from django.db import models
cl
Sean Perry wrote:
> magus wrote:
> > Yes, but "cheapness" is only one of my concerns. I have two bigger
> > concerns:
> >
> > 1. By limiting the external dependencies (i.e. the number of django
> > modules I use) I will lower the risk of being hit by a bug that I don't
> > control.
> > 2. AFAIC
I read about template contexts and wanted to get a sample of one. I
put this in my base template:
{% block debug %}
{% if debug %}
Debug is true!
{% endif %}
{% for s in sql_queries %}
SQL: {{ s.sql }}
TIME: {{ s.time }}
{% endfor %}
{% endblock %}
In my settings.py Debug is s
On 8/28/06, Rob Hudson <[EMAIL PROTECTED]> wrote:
> In my settings.py Debug is set to True, which, according to the docs is
> what activates this context. But I don't see anything in my template.
Hey Rob,
Are you using RequestContext, rather than Context, when you populate
the template? You'll
Adrian Holovaty wrote:
> Hey Rob,
>
> Are you using RequestContext, rather than Context, when you populate
> the template? You'll only get access to the 'debug' and 'sql_queries'
> variables if you use RequestContext.
I was using the render_to_response shortcut. I added this as the 3rd
argumen
Rob Hudson wrote:
> Adrian Holovaty wrote:
>> Hey Rob,
>>
>> Are you using RequestContext, rather than Context, when you populate
>> the template? You'll only get access to the 'debug' and 'sql_queries'
>> variables if you use RequestContext.
>
> I was using the render_to_response shortcut. I ad
Can you use both? I saw a link to a post about this sort of here:
http://groups.google.com/group/django-developers/browse_thread/thread/818c2ee766550426/e311d8fe6a04bb22
but didn't see a resolution.
Thanks,
Rob
--~--~-~--~~~---~--~~
You received this message beca
Hi Mae,
On 8/29/06, Mae <[EMAIL PROTECTED]> wrote:
> I think what you're talking about is this paragraph from the doc:
> "Also, you can give RequestContext a list of additional processors,
> using the optional, third positional argument, processors.
Actually, I was more thinking that you could w
On 27-Aug-06, at 4:14 AM, [EMAIL PROTECTED] wrote:
> There will be rather more new stuff that total change of the current
> API. 0.95 is quite new release and 1.0 won't come out soon.
> My advice is to use Django 0.95 - learn it and when the /trunk in SVN
> starts getting serious 1.0 features th
On 8/29/06, cerealito <[EMAIL PROTECTED]> wrote:
Hi everyone,I am trying to upload multiple image files in one of my projects.Single-File upload works fine, but how do I Get to upload many files inthe same form?...
But my question is... How do I "save" them?imageManipulator.do_html2python(new_d
Hmm. Alan, your post gives me much to think about and try.
Thank you.
Mae
--~--~-~--~~~---~--~~
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
On 28-Aug-06, at 10:46 PM, Jay Parlar wrote:
>>
>> When I have syntax error in python code of an app, where it goes ?
>>
>> I'm working under apache, same config as production, but
>> MaxRequestsPerChild 1
>>
>> There are no syntax errors in apache error log or site error log.
>> What's up ?
>
On 29-Aug-06, at 12:19 AM, patrickk wrote:
>
> when I send an email to the group, it takes about one hour for this
> mail to show up on the list.
> is that intended?
it is not normal - does it take one hour to show on the web
interface, or one hour to get back to you?
--
regards
kg
http://
Hello:
I have a table with two columns, first column is declared as
unique=True:
==
code = description
==
FI = Finance
AC = Accounting office
HR = Human resorces
.
.
etc.
Under "admin" if user creates another record whose code is AC, an error
message appears becaus
Is there any reason why the Django admin only allows alphanumeric
characters for the username? In some instances, people might just want
to use an email address to log in, instead of a separate name.
Obviously, @ is not allowed at this time.
I was just curious if this were a feature or there
On 8/28/06, patrickk <[EMAIL PROTECTED]> wrote:
> when I send an email to the group, it takes about one hour for this
> mail to show up on the list.
> is that intended?
Hi Patrick,
Some django-users (and django-developers) messages are flagged
automatically by Google Groups as potential spam. In
My shared hosting plan had a server problem that I'm having problems
recovering from.
Prior to server issues, my homepage was displaying flatpage content.
Following recovery from the server problem, my homepage returns the
following:
ImproperlyConfigured: Error importing middleware
django.contri
On Aug 28, 2006, at 8:52 PM, Vizcayno wrote:
> Is there a way to solve my need without using manipulators/validators?
No, actually, because validators are *exactly* what you want to use
here :) The right way to do what you want is to add a validator that
checks that your ``code`` field is up
On 29-Aug-06, at 6:58 AM, keukaman wrote:
> Is there a way simple way to reestablish all of the relationships
> between apps, etc, after a server outage?
is it possible that your .pyc files have got out of sync? Maybe you
could rm -rf the whole django tree and reinstall it? could help. Or
r
I see that there is a _get_sql_clause() method, but is there a function
that will return the constructed query string?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, sen
[EMAIL PROTECTED] wrote:
> > def tags(request, url):
> > # Don't need the last item in the list since it will
> > # always be an empty string since Django will append
> > # a slash character to the end of URLs by default.
> > tags = url.split('/')[:-1]
> > posts = Post.objects.
Why can't objects be used in python sets? Example:
>>> [u.username for u in User.objects.all()]
['bar', 'foo', 'foobar']
>>> a = User.objects.filter(username__contains='foo')
>>> b = User.objects.filter(username__contains='bar')
>>> set.intersection(set(a), set(b))
set([])
but...
>>> a
[, ]
>>
Gary Wilson wrote:
> Why can't objects be used in python sets? Example:
>
[u.username for u in User.objects.all()]
> ['bar', 'foo', 'foobar']
a = User.objects.filter(username__contains='foo')
b = User.objects.filter(username__contains='bar')
set.intersection(set(a), set(b))
69 matches
Mail list logo