Hi I don't believe you can use variables within variables. What you
can do is use/make a template tag that will look up in the list.
Or you could make if forloop.counter == statements.
Or you can make a dictionary and fx make the day_list keys
And the table_list values and iterate over the key, va
I am trying to use a 'dotted variable' (forloop.counter in this case)
as an index to a list, but without success so far.
I have a list of strings called 'table_string' and the following code:
{% for d in day_list %}
{{d}}{{table_string.forloop.counter}}
{% endfor %}
What I'm trying to do is
Hi Malcom,
thanks for your response!
On Sat, 04 Apr 2009 12:21:11 +1100
Malcolm Tredinnick wrote:
> You're not really trying to solve a valid problem here. The
> development server isn't intended for streaming data or anything like
> that. It's a very simplistic server for basic stuff. So if y
THANK YOU SO MUCH. Saved me a lot of time and frustration.
On Feb 8, 6:46 pm, Technicalbard wrote:
> If you are looking for this, I compiled it using MSVC++2008 Express,
> against MySQL 5.0.67 using Python2.6and theMySQLdb1.2.2 source:
>
> http://www.technicalbard.com/files/MySQL-python-1.2.2.wi
Thanks.
That works.
--~--~-~--~~~---~--~~
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
django-users+
On Fri, Apr 3, 2009 at 9:32 PM, Malcolm Tredinnick wrote:
>
> On Fri, 2009-04-03 at 21:07 -0400, Alex Gaynor wrote:
> [...]
> > A lazy reverse shouldn't be too difficult to implement in your own
> > code though:
> >
> > from django.utils.functional import lazy
> > reverse_lazy = lazy(reverse, str
> That looks good, but I think what I want it to do is create_or_update.
> Is there a logical way to do that?
If you are using the login_required decorator, then your view should
already have the current user available to it as part of the request
object. You shouldn't have to worry that the user
On Fri, 2009-04-03 at 17:56 -0700, TheIvIaxx wrote:
> I have an object that will be viewed, edited, or added. I would like
> to give a url for edit/add but default to view if nothing is given.
> For example:
>
> http://www.example.com/page/edit --> Goes to edit page template
> http://www.example
On Fri, 2009-04-03 at 21:07 -0400, Alex Gaynor wrote:
[...]
> A lazy reverse shouldn't be too difficult to implement in your own
> code though:
>
> from django.utils.functional import lazy
> reverse_lazy = lazy(reverse, str)
This would have to be "unicode", not "str", since reverse() really
retu
On Fri, 2009-04-03 at 21:54 +0200, Alex Rades wrote:
> Hi,
> I'm developing a simple site which has 2 basic models: Article and
> StaticPage (not using flatpages since i have some custom fields
> attached).
>
> Now, I need to create a search form which should search among both
> articles and stat
On Sat, 2009-04-04 at 00:22 +0200, Marcus Weseloh wrote:
> Hello again,
>
> I think I solved my problem (at least for the development server) by
> monkey patching django.core.servers.basehttp.ServerHandler. Does
> anybody know of any horrible side effects this might have, or can
> suggest a more
On Fri, Apr 3, 2009 at 9:13 PM, atik wrote:
>
> Thanks both of you.
> @Rosemarie
> It doesn't work.
> @Alex
> I use the latest stable version 1.0.2. Plz do something so i can do it
> successfully.
> I have trying this tutorial
> http://docs.djangoproject.com/en/dev/intro/tutorial02/#intro-tutoria
Thanks both of you.
@Rosemarie
It doesn't work.
@Alex
I use the latest stable version 1.0.2. Plz do something so i can do it
successfully.
I have trying this tutorial
http://docs.djangoproject.com/en/dev/intro/tutorial02/#intro-tutorial02
And problem is with "Active Admin Panel".
Plz help.
--~--~-
On Fri, Apr 3, 2009 at 9:03 PM, Malcolm Tredinnick wrote:
>
> On Fri, 2009-04-03 at 01:24 -0700, robin wrote:
> > It seems like you cannot use reverse within urls.py
> >
> > url(r'^add/$','items.views.add_item_wizard',name='add_item_wizard'),
> >
> > url(r'^add/complete/
> > $','django.views.
On Fri, 2009-04-03 at 01:24 -0700, robin wrote:
> It seems like you cannot use reverse within urls.py
>
> url(r'^add/$','items.views.add_item_wizard',name='add_item_wizard'),
>
> url(r'^add/complete/
> $','django.views.generic.simple.direct_to_template',{
> 'template':'message.html',
>
On Fri, Apr 3, 2009 at 8:56 PM, TheIvIaxx wrote:
>
> I have an object that will be viewed, edited, or added. I would like
> to give a url for edit/add but default to view if nothing is given.
> For example:
>
> http://www.example.com/page/edit --> Goes to edit page template
> http://www.example.
I have an object that will be viewed, edited, or added. I would like
to give a url for edit/add but default to view if nothing is given.
For example:
http://www.example.com/page/edit --> Goes to edit page template
http://www.example.com/page/ -- Goes to view template
however if i put an argumen
On Fri, 2009-04-03 at 04:39 -0700, Praveen wrote:
> def queryset(self, request):
> qs = super(EventAdmin, self).queryset(request)
> if not request.user.is_superuser:
> qs = qs.filter(city=request.user.get_profile().res_city)
> r
On Fri, 2009-04-03 at 01:14 -0700, Zeal wrote:
> Thanks Malcolm, I think I've find the issue. I set time.time() to
> test several steps in my program, retrieving data is pretty fast, the
> entire function spent 6s to finish the task. However, at the final
> stage on template rendering, seems Exp
On Fri, 2009-04-03 at 01:41 -0700, Zeal wrote:
> I'm a newbie, I've been using Django to develop an application. The
> entire application need to be based on an authorization mechnism. As
> of my current programe, I just put user's id in session when they log
> in, and there is a authorization dec
On Fri, 2009-04-03 at 09:35 +0100, Mic Pringle wrote:
> Hi,
>
> I've been googling this for a while but can't seem to find any
> relevant information.
>
> Is it possible to utilise the admin interface without requiring
> authorisation ? Is it as simple as not including the authorisation
> module
On 3-Apr-09, at 12:54 PM, Alex Rades wrote:
>
> Now, I need to create a search form which should search among both
> articles and static pages and return the list of matches. I'd like
> very much to return an object_list so that this search result would be
> automatically paginated.
[snip]
>
> I
Hello again,
I think I solved my problem (at least for the development server) by
monkey patching django.core.servers.basehttp.ServerHandler. Does
anybody know of any horrible side effects this might have, or can
suggest a more elegant solution?
Thanks in advance,
Marcus
--- the monke
On Fri, 2009-04-03 at 13:14 -0700, Albert wrote:
>
> class Musician(models.Model):
> first_name = models.CharField(max_length=50)
> last_name = models.CharField(max_length=50)
>
> class Album(models.Model):
> artist = models.ForeignKey(Musician)
> name = models.CharField(max_leng
On Fri, Apr 3, 2009 at 4:59 PM, Rosemarie Loewe wrote:
> Hi Alex,
>
>
>
> I had the same problem, it must be an error in tutorial. Following works:
>
>
>
> (r'^admin/', include(admin.site.root)),
>
>
>
>
>
> Best Regards
>
> Rosemarie
>
>
> --
>
> *Von:* django-users
Hi Atik,
I had the same problem, it must be an error in tutorial. Following works:
(r'^admin/', include(admin.site.root)),
Best Regards
Rosemarie
-Ursprüngliche Nachricht-
Von: django-users@googlegroups.com [mailto:django-us...@googlegroups.com] Im
Auftrag von atik
Gesendet: Freita
Hi Alex,
I had the same problem, it must be an error in tutorial. Following works:
(r'^admin/', include(admin.site.root)),
Best Regards
Rosemarie
_
Von: django-users@googlegroups.com [mailto:django-us...@googlegroups.com] Im
Auftrag von Alex Gaynor
Gesendet: Freitag, 3
Hi.
A quick solution would be to add a datefield to the album
the release date. You could then use that to find the
latest and it would be updated automatically when
adding new albums. You could use ot for other things
as well, but I don't know your needs. Will also make the
lookup a bit slower bu
On Fri, Apr 3, 2009 at 4:25 PM, Andrew G. wrote:
>
> The following code in a fresh project/app will cause the database
> creation to fail.
>
> class Position(models.Model):
>description = models.CharField(max_length=20, blank=True,
> null=True)
>parts = models.ManyToManyField('Part', db_t
On Fri, Apr 3, 2009 at 4:13 PM, atik wrote:
>
> hi! I am new to dijango and i have the tutorial of official release is
> helping me. while part 1 of the tutorial is done nicely, but when i
> have tried to part 2, that is Activate the admin site, i have be
> getting hard time. It is telling me No
Hi,
Say I have these simple models:
class Musician(models.Model):
first_name = models.CharField(max_length=50)
last_name = models.CharField(max_length=50)
class Album(models.Model):
artist = models.ForeignKey(Musician)
name = models.CharField(max_length=100)
Now in `Musician`
hi! I am new to dijango and i have the tutorial of official release is
helping me. while part 1 of the tutorial is done nicely, but when i
have tried to part 2, that is Activate the admin site, i have be
getting hard time. It is telling me No module named admin.site.urls. I
have configured urls.py
The following code in a fresh project/app will cause the database
creation to fail.
class Position(models.Model):
description = models.CharField(max_length=20, blank=True,
null=True)
parts = models.ManyToManyField('Part', db_table='part_positions')
class PartPosition(models.Model):
r
Hi,
I'm developing a simple site which has 2 basic models: Article and
StaticPage (not using flatpages since i have some custom fields
attached).
Now, I need to create a search form which should search among both
articles and static pages and return the list of matches. I'd like
very much to retu
That looks good, but I think what I want it to do is create_or_update.
Is there a logical way to do that?
On Apr 3, 11:26 am, Alex Gaynor wrote:
> On Fri, Apr 3, 2009 at 2:22 PM, mjlissner wrote:
>
> > I've been trying for the past week or so to make a rather simple view
> > work the way I thin
On Apr 3, 12:59 pm, phoebebright wrote:
> I implemented syncr (http://code.google.com/p/django-syncr/) quickly
> and easily but have one strange problem. I can display thumbnails but
> not the full size image. But if I copy the URL in the src tag into
> the browser, I see the image perfectly!
On Apr 3, 2:48 pm, El Marto wrote:
> Hi all
>
> I m working on a web project that also interacts with users through
> email. I can send emails through SMTP, but I dont know how to receive
> emails and process them in a django.
>
> Does someone know how to do this?
Use Python's built-in support
Hi all
I m working on a web project that also interacts with users through
email. I can send emails through SMTP, but I dont know how to receive
emails and process them in a django.
Does someone know how to do this?
Cheers!
Martin
--~--~-~--~~~---~--~~
You receiv
On Fri, Apr 3, 2009 at 2:22 PM, mjlissner wrote:
>
> I've been trying for the past week or so to make a rather simple view
> work the way I think it should, and I keep failing miserably.
>
> What I'd like to do is to extend the user model with an app by
> allowing a user to supply one piece of in
I've been trying for the past week or so to make a rather simple view
work the way I think it should, and I keep failing miserably.
What I'd like to do is to extend the user model with an app by
allowing a user to supply one piece of information about themselves,
their twitter user name. I could
Great, thanks guys! Just wanted to make sure I wasn't missing
anything.
On Apr 2, 8:46 pm, Malcolm Tredinnick
wrote:
> On Thu, 2009-04-02 at 18:29 -0700, Dave Fowler wrote:
>
> [...]
>
> > Profile.objects.all().select_related()
>
> > But it seems weird to base everything around the object tha
On Apr 3, 5:42 pm, Karen Tracey wrote:
> On Fri, Apr 3, 2009 at 12:07 PM, Simon Greenwood wrote:
>
>
>
>
>
> > On Apr 3, 4:05 pm, Ayaz Ahmed Khan wrote:
> > > On 03-Apr-09, at 7:43 PM, simong wrote:
>
> > > > if request.method == 'POST':
> > > > productform = ProductForm(request.POST,
I implemented syncr (http://code.google.com/p/django-syncr/) quickly
and easily but have one strange problem. I can display thumbnails but
not the full size image. But if I copy the URL in the src tag into
the browser, I see the image perfectly!! How is this possible?
For example, this is fine
On Fri, Apr 3, 2009 at 12:07 PM, Simon Greenwood wrote:
>
> On Apr 3, 4:05 pm, Ayaz Ahmed Khan wrote:
> > On 03-Apr-09, at 7:43 PM, simong wrote:
> >
> > > if request.method == 'POST':
> > > productform = ProductForm(request.POST, instance=product)
> > > productform.user = user
> >
On Apr 3, 4:05 pm, Ayaz Ahmed Khan wrote:
> On 03-Apr-09, at 7:43 PM, simong wrote:
>
> > if request.method == 'POST':
> > productform = ProductForm(request.POST, instance=product)
> > productform.user = user
> > if productform.is_valid:
>
> `is_valid` is a method bound to t
Hi all,
I'm using the code below to stream the response of an external command to
the user. While that is all working fine, I would like to be able to react
to the user closing the browser or hitting ESC by terminating the external
process.
When using the development server, I get a 'broken pipe
On 03-Apr-09, at 7:43 PM, simong wrote:
> if request.method == 'POST':
> productform = ProductForm(request.POST, instance=product)
> productform.user = user
> if productform.is_valid:
`is_valid` is a method bound to the BaseForm class. The expression in
the snippet above _w
I'm not sure if reversing inside the url patterns is possible (but I
kinda doubt it), but maybe I can help out with a different, and
probably better, solution. It seems you only want to use the URL to
your add_item_wizard function inside your message.html template. Then
you could use the builtin u
I have this model to add new products to a database:
--
class Product(models.Model):
user = models.ForeignKey(User)
productid = models.CharField(max_length=40, blank=True)
prodname = models.CharField(max_length=255, verbose_name='Product
name')
proddesc = models.Te
Michael,
The 1.0.2 version of comments is buggy, at least it can't be used on a
custom interface. Try reading the __init__.py, views/comments.py
functions of comments framework. I tryed to apply a custom form on the
comments framework (without a new model, only adding captcha), I have
no success
On Fri, Apr 3, 2009 at 3:08 AM, mjlissner wrote:
>
> Thanks to IRC, the fix is in.
>
> The line for admin/doc must be BEFORE the line for admin.
>
> Furthermore, this post seems to be wrong:
>
> http://groups.google.com/group/django-users/browse_thread/thread/a202105e3e6731fd?fwc=1
>
>
You are po
On Thu, Apr 2, 2009 at 1:15 PM, laird18 wrote:
>
> Hi Karen, thanks for the reply, and sorry for not being clearer in my
> original message.
>
> I've done a bit more debugging and I've found that whenever I put any
> form of import line, such as
> "from django.db import models" or
> "from interna
On Fri, Apr 3, 2009 at 8:16 AM, Oli Warner wrote:
> See: http://www.djangosnippets.org/snippets/93/
>
>
> On Fri, Apr 3, 2009 at 8:22 AM, Masarliev wrote:
>
>>
>> In zend framework there is php profiler that shows every mysql Query
>> in firebug console, but I can't find something similar in dja
On Wed, Apr 1, 2009 at 5:34 PM, Miguel wrote:
> Hi Karen,
> i didn't want to bother you too much (because of that I dindnt send too
> much code).
>
But without specifics on the model involved here there's nothing more I can
think to tell you that might help. raw_id_admin on any (all) related ob
On Apr 1, 3:11 am, Russell Keith-Magee wrote:
> On Wed, Apr 1, 2009 at 3:48 AM, Aryeh Leib Taurog wrote:
>
> > I have an API implementation for ordered many-to-many relation fields
> > which uses the Python list interface to allow easy data manipulation
> > via the special manager associated wit
Authenticating against NIS is very possible with Django. You can find
information on writing a custom authentication backend in the django
documentation at
http://docs.djangoproject.com/en/dev/topics/auth/#other-authentication-sources.
I'm sure someone may have already done this. A quick search o
Is it possible to use NIS as an authentication backend in Django ?
Thx/Mahesh
--~--~-~--~~~---~--~~
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
T
MongoDB has added a connector [1] that lets you use it as the
persistent store in your Python AppEngine applications. This is very
important to avoid the use of a propietary database.
It would be great if there would more connectors using another key/
value databases as Tokyo Cabinet [2].
[1] h
See: http://www.djangosnippets.org/snippets/93/
On Fri, Apr 3, 2009 at 8:22 AM, Masarliev wrote:
>
> In zend framework there is php profiler that shows every mysql Query
> in firebug console, but I can't find something similar in django.
>
> >
>
--~--~-~--~~~---~--~-
Karen may be on to something. I have django running on CentOS but I
have disable selinux. Selinux has bitten me before so I just disable
it all together.
On Mar 31, 9:49 am, Karen Tracey wrote:
> On Tue, Mar 31, 2009 at 9:27 AM, knight wrote:
>
> > Hi,
>
> > I'm trying to install my django ap
Thanks. That sorted it. It was the database.
Ironically, the sites have disappeared from the admin app since
upgrading to 1.0 from 0.96 so haven't seen them for a while. I had to
update via SQL. I will look into why they disappeared.
On 3 Apr, 07:14, Alex Koshelev wrote:
> Have you changed your
def queryset(self, request):
qs = super(EventAdmin, self).queryset(request)
if not request.user.is_superuser:
qs = qs.filter(city=request.user.get_profile().res_city)
return qs
it works fine as but it list out all the
Guys, I found this article http://www.hoboes.com/Mimsy/?ART=675
I have tested this one and it working.
But is it really correct to do so?
Thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" grou
I believe that this is actually incorrect and the the admin/docs line
needs to be BEFORE the admin urls line.
On Feb 13, 8:40 am, Alex Gaynor wrote:
> On Thu, Feb 12, 2009 at 4:39 PM, Chris Haynes wrote:
>
> > I add (r'^admin/doc/', include('django.contrib.admindocs.urls')) to
> > urls.py and
In zend framework there is php profiler that shows every mysql Query
in firebug console, but I can't find something similar in django.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to
Hi,
I've been googling this for a while but can't seem to find any
relevant information.
Is it possible to utilise the admin interface without requiring
authorisation ? Is it as simple as not including the authorisation
module in my installed apps, or is there a bit more to it than that ?
What
You need to delete the model's tables from the database and then do
syncdb. Else you could use some of the django plugins that senses the
difference between the model and the existing database and then it
changes the database for you. google for django-extensions
On Apr 3, 2:14 am, jjgod wrote
One reason is that The pagination function does conflict my current
url design of my application.
And, another reason is, I use css+div to simulate the iframe style in
the page, so user is allowed to see all authorized data in one page by
scrolling the scrollbar. Comparing scrolling and paginati
Zeal, the issue in its current state seems to be unrelated to Django.
By the way, do you really need to display so many objects on one page?
Why not try pagination?
Regards,
Andy
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Go
I'm a newbie, I've been using Django to develop an application. The
entire application need to be based on an authorization mechnism. As
of my current programe, I just put user's id in session when they log
in, and there is a authorization decorater to judge whether a request
object include user i
By the way it will give the following error, if I do reverse in
urls.py:
Traceback (most recent call last):
File "/usr/lib/python2.5/site-packages/django/core/servers/
basehttp.py", line 278, in run
self.result = application(self.environ, self.start_response)
File "/usr/lib/python2.5/si
It seems like you cannot use reverse within urls.py
url(r'^add/$','items.views.add_item_wizard',name='add_item_wizard'),
url(r'^add/complete/
$','django.views.generic.simple.direct_to_template',{
'template':'message.html',
'extra_context':{
'title': 'Add Item Complete',
Thanks Malcolm, I think I've find the issue. I set time.time() to
test several steps in my program, retrieving data is pretty fast, the
entire function spent 6s to finish the task. However, at the final
stage on template rendering, seems Explorer(IE) will be under highly
loaded status(not respon
On Friday 03 April 2009 12:26:30 Miguel wrote:
> thank you. It is not an easy upgrade. It may take long time to do it...
> Maybe the differences between versions are no so big ...
I have some .90 sites to upgrade to trunk. I finally decided to rewrite
everything and manually migrate the db with
On Thu, Apr 2, 2009 at 5:42 PM, ChrisR wrote:
> Where is that code supposed to live? How do you actually send it?
> I've seen a few things that imply you did it from the Python API?
>
Probably the easiest thing to do is create an admin action for it [1]. I
just recently wrote this, so here is (
Thanks to IRC, the fix is in.
The line for admin/doc must be BEFORE the line for admin.
Furthermore, this post seems to be wrong:
http://groups.google.com/group/django-users/browse_thread/thread/a202105e3e6731fd?fwc=1
On Apr 2, 11:46 pm, mjlissner wrote:
> I am working on setting up my first
Just for clarity, admin/doc needs to be BEFORE admin. Otherwise, it
doesn't work. I just had this problem, per my own thread here:
http://groups.google.com/group/django-users/browse_thread/thread/629e8efca112388d
On Feb 12, 2:40 pm, Alex Gaynor wrote:
> On Thu, Feb 12, 2009 at 4:39 PM, Chris Hay
77 matches
Mail list logo