On Sep 3, 3:36 am, Rodney Topor wrote:
> Suppose you've just processed posted form data and successfully added
> a new item to the database. Now you return HttpResponseRedirect('/
> items/') (I know, you should use a pattern name not an absolute URL
> here) to display the list of items, includin
There is anyway to avoid some templates parts to not be cached?
Something like:
{% nocache %}
Hello, {{username}}
{% endnocache %}
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to t
Look up template context processors.
--
Andy McKay
www.clearwind.ca
On 2009-09-02, at 7:03 PM, "richardcur...@googlemail.com"
wrote:
>
> Hi,
>
> I want to use two 'global' variables in all pages. Obviously I don't
> want to put the same variable in all template dictionaries.
>
> Is ther
Suppose you've just processed posted form data and successfully added
a new item to the database. Now you return HttpResponseRedirect('/
items/') (I know, you should use a pattern name not an absolute URL
here) to display the list of items, including the newly added item.
But, suppose you want t
On Wednesday 02 September 2009 07:03:04 pm richardcur...@googlemail.com wrote:
> Hi,
>
> I want to use two 'global' variables in all pages. Obviously I don't
> want to put the same variable in all template dictionaries.
>
> Is there a simpler way to have something like 'global' variables in
> Djang
Hi,
I want to use two 'global' variables in all pages. Obviously I don't
want to put the same variable in all template dictionaries.
Is there a simpler way to have something like 'global' variables in
Django?
Thanks.
--~--~-~--~~~---~--~~
You received this messag
On Wed, Sep 2, 2009 at 10:14 AM, Spoksss wrote:
>
> Hi,
>
> I have very strange problem with simple QuerySet.
> I get error just on one of servers, and I realy don't know why.
>
> When I use very simple code like:
>
> Model.objects.filter(is_published=True)
>
> I get stupid error:
>
> "Cannot reso
On Wed, Sep 2, 2009 at 7:53 AM, Ozymandias wrote:
>
> Karen,
>
> Thank you. I will give that a shot a little later this afternoon.
>
> The MEDIA_ROOT change really does break the sites CSS though. Not
> sure why.
>
> Was I doing the changes correctly if I were going to be hosting this
> on an a
On Wed, Sep 2, 2009 at 11:38 PM, phoebebright wrote:
>
> And it's not a missing __init__.py program that I can see.
>
> Am trying to move a site to a new server - CentOS to Ubuntu and
> version of python are changing from 2.4.3 to 2.5.2 and using wsgi now
> instead of mod_python.
>
> I already hav
Hi,
I am trying to set up a sort of smal CMS where the input is
RestructuredText. The restructured text is parsed by a templatetag with the
following code (taken from the PyCon rst project):
@register.filter
def restructuredparts(value, **overrides):
"""return the restructured text parts"""
Joakim Hove wrote:
>
>
> Hello,
>
> thanks for the tip:
>
>> It is usually not a good idea to give business meaning to a primary key
>> in a relational database. The literature is full of reasons against it.
>
> I had a nagging feeling this might be the case. Do you have any links
> to "Best
Hi
I have the same problem. Have you found any solution?
Thanks and regards.
On 15 ago, 17:18, fruity wrote:
> Hi everyone,
>
> This is not my code, but the code of washtub the liquidsoap controller
> made with django so for I've mailed both ML, django and liquidsoap
>
> I have a directory ful
I'm looking for a passionate co-founder to help me build a novel and
meaningful start-up using Django. In a nutshell, Insightica (working
name) is about making scientific modeling accessible and fun. This
might sound impossible, but I have the proven technology and the great
new concept to make it
hi Folks
I have a model which has in it some stuff that looks like:
class Simulation(models.Model):
...
boundaryCondition=models.ManyToManyField
('SimCoupling',blank=True,null=True)
...
class Coupling(models.Model):
...
class SimCoupling(models.Model):
...
original=model
Taking the Book and Author example from
http://docs.djangoproject.com/en/dev/topics/forms/modelforms/
When creating a book, I would like to add an author if no such author exists.
I believe by default
class BookForm(ModelForm):
class Meta:
model = Book
displays "Author" as a drop
On Wed, Sep 2, 2009 at 12:32 PM, arbi wrote:
>
> As for the PATH I thought it was for compilation and not for make
> message.
> Should I write this for make message ?
>
> PATH=$PATH:/Applications/Poedit.app/Contents/MacOS/
> python /Library/python/2.5/site-packages/django/bin/make-messages.py
> ?
On Wednesday 02 September 2009 01:53:40 am NMarcu wrote:
> Hello all,
>
>I have a project that is need to be run like: "http://localhost/";.
> In this case, I can't access phppgadmin like: "localhost/phpmyadmin"
> because is looking in my project files. I configure the Apache 2,
> httpd.conf li
On Wed, Sep 2, 2009 at 6:47 PM, Eric wrote:
>
> Im using the Django deserialization method shown here:
>
> http://docs.djangoproject.com/en/dev/topics/serialization/
>
ok, try pasting your json (the original, not your re-typed version) here:
http://www.jsonlint.com/
--
Andrew McGregor
07940 22
On Wed, Sep 2, 2009 at 4:44 PM, Sandra Django wrote:
> Hi friends, Can I do a condition depending on my model name? For example, I
> did that:
> {% ifequal model.name "Mymodelname" %}
> do something
> {% endifequal %}
>
> But don't work. Someone could help me?
As part of your select could yo
> I would like to parse it so that I can loop over the pairs/arrays to
> access the data. When I try to deserialize the data, I get the django
> error "string indices must be integers". Can anybody please help me
> determine what exactly this means and how I may fix this? Is there
> another metho
On Wed, Sep 2, 2009 at 12:37 PM, Eric wrote:
>When I try to deserialize the data, I get the django
> error "string indices must be integers"
it's not on your example, but i guess you're missing a colon between a
fieldname and an array, something like this:
{"gantts"[{"rows".
instead of
Im using the Django deserialization method shown here:
http://docs.djangoproject.com/en/dev/topics/serialization/
It goes something like:
"
...
gantt_data = request.POST.get('ganttdata')
for obj in serializers.deserialize("json", gantt_data):
...
"
On Sep 2, 10:41 am, Andrew McGregor w
I want to write a signal that tracks activities on certain models, but
I'd also like to keep track of who did what. Is there any way, from
the signal action, to get the value of request.user?
--~--~-~--~~~---~--~~
You received this message because you are subscribe
I forgot to mention that I am trying to deserialize the data as
follows:
"
...
gantt_data = request.POST.get('ganttdata')
for obj in serializers.deserialize("json", gantt_data):
...
"
On Sep 2, 10:37 am, Eric wrote:
> Hi,
> I am attempting to parse a json string passed to my view via a fo
Hi,
I am attempting to parse a json string passed to my view via a form
post. A simple example of my json structure is as follows (indented
for readability):
{
"ganttgroups":[
{
"gantts":[
{
"rows":[
{"stt":1, "
I'm not sure I understand your question. The formfield_for_foreignkey
method takes the field_name as an argument so you can have different
(or same) action for any of them, see
http://docs.djangoproject.com/en/dev/ref/contrib/admin/#django.contrib.admin.ModelAdmin.formfield_for_foreignkey
What ex
Storybird is adding a Python/Django developer to the team. We're a
small group working on a fun, Django-backed site that's just at the
initial launch stage. We have more ideas than developer time, so we're
looking to expand the team.
Details and contact info are at:
http://blog.storybird.com/200
Hi Joost,
I installed aspell and en library on web server and now spellcheker is
running fine.
Thanks a ton for your help and it is a great application.
Thanks,
Sincerely,
Sonal.
On Sep 1, 3:37 pm, Sonal Breed wrote:
> Hello Joost,
>
> I came acrosshttp://code.google.com/p/django-tinymce/issu
Hi friends, Can I do a condition depending on my model name? For example, I
did that:
{% ifequal model.name "Mymodelname" %}
do something
{% endifequal %}
But don't work. Someone could help me?
--~--~-~--~~~---~--~~
You received this message because you are su
As for the PATH I thought it was for compilation and not for make
message.
Should I write this for make message ?
PATH=$PATH:/Applications/Poedit.app/Contents/MacOS/
python /Library/python/2.5/site-packages/django/bin/make-messages.py
?
And then I do django-admin.py makemessages -l fr ?
thx (I am
And it's not a missing __init__.py program that I can see.
Am trying to move a site to a new server - CentOS to Ubuntu and
version of python are changing from 2.4.3 to 2.5.2 and using wsgi now
instead of mod_python.
I already have one django site running on the new server so the basic
setup is o
Be more specific, is model in the context ? is name a property of
model ?
On 2 sep, 17:44, Sandra Django wrote:
> Hi friends, Can I do a condition depending on my model name? For example, I
> did that:
> {% ifequal model.name "Mymodelname" %}
> do something
> {% endifequal %}
>
> But don't
hi list,
im trying to customise the django comment form and i have no problems
subclassing the Comment model and add my custom fields but i would need
to remove the name, url and email fields because i will let only logged
in users add and see comments in my project and the app fills the fields
i
> Hello can you tell me where i can find example how to download file
> with django
CURL?
http://pycurl.sourceforge.net/
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group,
Hi everybody,
i've been tinkering around with cookies scinc some days. They work so far
for me, but i fear the way that i use them right now is not the django way
and it isn't a DRY way.
This is how i do it right now, i have some views and everytime the view is
called it checks if there is a certa
On Wed, Sep 2, 2009 at 11:58 AM, arbi wrote:
>
> I have a pb when doing this (i am under osx) :
>
> $ django-admin.py makemessages -l fr
> processing language fr
> Error: errors happened while running xgettext on __init__.py
> /bin/sh: xgettext: command not found
>
> I went there :http://www.pkshi
I hacked my soaplib_handler.py in django to test what was missing.
The following envelope works:
http://www.w3.org/2001/XMLSchema-
instance"
xmlns:SOAP-ENV="http://
schemas.xmlsoap.org/soap/envelope/"
xmlns="http://
www.donnelley
I have a pb when doing this (i am under osx) :
$ django-admin.py makemessages -l fr
processing language fr
Error: errors happened while running xgettext on __init__.py
/bin/sh: xgettext: command not found
I went there :http://www.pkshiu.com/loft/archive/2008/01/gettext-on-
leopard-for-django-int
Hi,
I have very strange problem with simple QuerySet.
I get error just on one of servers, and I realy don't know why.
When I use very simple code like:
Model.objects.filter(is_published=True)
I get stupid error:
"Cannot resolve keyword 'is_published' into field. Choices are: id,
is_published,
Hello can you tell me where i can find example how to download file
with django
Regards
Luca
--~--~-~--~~~---~--~~
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@go
Karen,
Thank you. I will give that a shot a little later this afternoon.
The MEDIA_ROOT change really does break the sites CSS though. Not
sure why.
Was I doing the changes correctly if I were going to be hosting this
on an actual server? I'd need to change the MEDIA_ROOT in order to
get tha
This question is not django related.
On Sep 2, 6:53 pm, NMarcu wrote:
> Hello all,
>
> I have a project that is need to be run like: "http://localhost/";.
> In this case, I can't access phppgadmin like: "localhost/phpmyadmin"
> because is looking in my project files. I configure the Apache 2,
I have used formfield_for_foreignkey in the admin and it works well.
However, suppose you have two foreign keys in your model and you want
to restrict the choices on both of them?
Paul Hide
--~--~-~--~~~---~--~~
You received this message because you are subscribed
On Sep 2, 10:59 am, Matthias Kestenholz
wrote:
> On Wed, Sep 2, 2009 at 10:38 AM, Enrico
>
> Sartorello wrote:
> >> if you need this only for the administration site you'd hvae other
> >> hooks that you could override. Either take a look at the documentation
> >> or at django/contrib/admin/option
On Wed, Sep 2, 2009 at 10:38 AM, Enrico
Sartorello wrote:
>> if you need this only for the administration site you'd hvae other
>> hooks that you could override. Either take a look at the documentation
>> or at django/contrib/admin/options.py
>>
>
> If you mean overriding the ModelAdmin.form objec
Hello,
thanks for the tip:
> It is usually not a good idea to give business meaning to a primary key
> in a relational database. The literature is full of reasons against it.
I had a nagging feeling this might be the case. Do you have any links
to "Best practice" om these questions - I am a d
Hello all,
I have a project that is need to be run like: "http://localhost/";.
In this case, I can't access phppgadmin like: "localhost/phpmyadmin"
because is looking in my project files. I configure the Apache 2,
httpd.conf like:
SetHandler python-program
PythonHandler django.core.h
I change the Method to trust, and it's word. Thank you for help.
2009/9/1 Karen Tracey
> On Tue, Sep 1, 2009 at 10:54 AM, NMarcu wrote:
>
>>
>> Hello all,
>>
>> I'm very new in python, Django... I have a Django project. If I run
>> it like: python manage.py runserver, everything is OK. When I
On Wed, Sep 2, 2009 at 10:25 AM, Matthias Kestenholz wrote:
>
> On Wed, Sep 2, 2009 at 9:15 AM, Enrico
> Sartorello wrote:
> > Up.
> >
>
> Already?
>
>
Yes, cause it seemed to me that a message buried by other 30 messages was
about to be left unanswered :-)
>
>
>
> > On Tue, Sep 1, 2009 at 11:
> and if you look up-screen at the "breadcrumbs" you should see ...
>
> Home >> Customers >> 2: George
>
> Does that do it?
Well - I know (and thanks for the info) - but I would really like to
get it even clearer.
Joakim
--~--~-~--~~~---~--~~
You received this me
Joakim Hove wrote:
> Thank you both for answering; however I am afraid we are
> misunderstanding eachother here.
>
> I have created a admin.py file and registered my CustomerClass with
> the admin interface. That works, and I can select the CustomerClass
> when logged in to the admin interface.
>
Joakim Hove wrote:
> Thank you both for answering; however I am afraid we are
> misunderstanding eachother here.
>
> I have created a admin.py file and registered my CustomerClass with
> the admin interface. That works, and I can select the CustomerClass
> when logged in to the admin interface.
>
On Wed, Sep 2, 2009 at 9:15 AM, Enrico
Sartorello wrote:
> Up.
>
Already?
> On Tue, Sep 1, 2009 at 11:06 AM, Enrico Sartorello
> wrote:
>>
>> Wait a moment: this solution doesn't solve my problem.
>> Remember that the form I need has to be used on the admin site, so I can't
>> deal with it dir
On Sep 1, 7:03 pm, Bill Freeman wrote:
> Add the filesystem template loader, put it before app directories loader,
> and put the (absolute) path to your templates directory (e.g.;
> /home/moho/myapp/templates) in TEMPLATES_DIR.
thanks, this actually works for me.
Aljosa
--~--~-~--~~
Thank you both for answering; however I am afraid we are
misunderstanding eachother here.
I have created a admin.py file and registered my CustomerClass with
the admin interface. That works, and I can select the CustomerClass
when logged in to the admin interface.
Let us say I have created three
Try signals[1], namely pre_save[2]. I would stick to this way instead
of overriding model's save() method.
[1] http://docs.djangoproject.com/en/dev/topics/signals/
[2]
http://docs.djangoproject.com/en/dev/ref/signals/#django.db.models.signals.pre_save
On Sep 1, 4:21 pm, Harish wrote:
> Hi Frie
2009/9/2 Bins :
>
> On my django run website, I've this sidebar which calls 5 random
> pictures from entries.. here's the code that does it :-
>
> {% for entry in thumb_entries %}
> '110' src='{{entry.img}}' style='border:none;' / >
>
>
Up.
On Tue, Sep 1, 2009 at 11:06 AM, Enrico Sartorello <
enrico.sartore...@gmail.com> wrote:
> Wait a moment: this solution doesn't solve my problem.
> Remember that the form I need has to be used on the admin site, so I can't
> deal with it directly (in fact, I can't instantiate it and provide
>
58 matches
Mail list logo