Ahh...never mind!
I tried doing a {% for S.M %}
that didn't work, but {% for S.M.all %} did
thanks for being my sounding board...
On Apr 10, 10:38 pm, Anthony wrote:
> Hello,
>
> I'm passing queryset 'S' to a template. S has several attributes, M,
> N and O.
>
> M has
Hi,
I am using django, python and sqlite3 for my web page.
I want the datas from the database between two dates. how do i handle
it in django.
i want the query for this
select * from Table where dates BETWEEN '2009-01-01' AND '2009-01-31'
Can any one help me?
On Saturday 11 April 2009 11:16:52 Nalini wrote:
> select * from Table where dates BETWEEN '2009-01-01' AND '2009-01-31'
> Can any one help me?
Model.objects.filter(mydate__gte='2009-01-01' ).filter(mydate__lte='2009-01-31')
--
regards
kg
http://lawgon.livejournal.com
On Sat, Apr 11, 2009 at 2:44 AM, Kenneth Gonsalves
wrote:
>
> On Saturday 11 April 2009 11:16:52 Nalini wrote:
> > select * from Table where dates BETWEEN '2009-01-01' AND '2009-01-31'
> > Can any one help me?
>
> Model.objects.filter(mydate__gte='2009-01-01'
>
On Apr 11, 3:11 am, Malcolm Tredinnick
wrote:
> Django's SQL is going exactly what you suspect and not using any outer
> join here. Using a simplified version of the original two models:
>
> class Student(models.Model):
> ...
>
> class
for those who is interested, the issue is solved:
http://groups.google.com/group/pinax-users/browse_thread/thread/58d45dab96840ee5/0f62760ab5223b2e
regards
valery
On Apr 7, 8:27 pm, Valery wrote:
> Hi
>
> no answers... does it mean that it is impossible in Django to
On Sat, 2009-04-11 at 01:02 -0700, nikita kozlovsky wrote:
> On Apr 11, 3:11 am, Malcolm Tredinnick
> wrote:
>
>
> > Django's SQL is going exactly what you suspect and not using any outer
> > join here. Using a simplified version of the original two models:
> >
> >
Hello,
My application serves content with different mimetypes: 'application/
xhtml+xml', 'application/xml', 'application/json'. Specifying mimetype
for every view is not DRY. Is it possible to define default mimetype
for url groups?
Roman
--~--~-~--~~~---~--~~
That's the workaround we were about to implement. But what I was
searching for, was a more consistent way to modify the **model**
itself (which will be reflected into the database structure and
consequently in the forms), not the way Django handles the forms.
I think Django choice isn't so silly,
There is no such capabilities.
Write your own set of decorators that will be path response object
with needed mimetype - almost DRY solution.
On Sat, Apr 11, 2009 at 10:40 AM, Roman Timushev wrote:
>
> Hello,
>
> My application serves content with different mimetypes:
On Apr 11, 12:32 pm, Malcolm Tredinnick
wrote:
> That's definitely a small bug, then. I've opened ticket #10790 so that
> it gets fixed eventually. Since it's not a functionality bug (the answer
> is still correct), it will be fixed after 1.1 now, but we will fix it.
Hi
I think a 'problem' of Django is that it is produced by programmers
and doesn`t mention that programming is the minor important part of a
successfull site.
Far more important is content and the visual way content is presented
in a brain catching way to the customer.
Both isn`t comprised in
On Fri, 2009-04-10 at 23:40 -0700, Roman Timushev wrote:
> Hello,
>
> My application serves content with different mimetypes: 'application/
> xhtml+xml', 'application/xml', 'application/json'. Specifying mimetype
> for every view is not DRY. Is it possible to define default mimetype
> for url
In the project I'm working on it makes a lot of sense to store pretty
much everything in 1-2 models, as there are a lot of common operations
being done on any object or property - moderation, versioning, etc. I
wanted to have something similar to this approach:
If anybody is interesed in new technologies, you'll love this new
language called Falcon [1], which has been open sourced ago little
time.
Falcon is a scripting engine ready to empower mission-critical
multithreaded applications. It provides six integrated programming
paradigms: procedural,
Hello,
I'm planning a site with django.
It need to have some functionalities that are very similar to Django's
admin (like CRUD in some tables, with validations, etc...). But I
would not like to have two sections (frontend and admin) in it
So, my question is: is there a way to use already
Malcom,
Google, FaceBook, and LinkedIn have been using email authentication
for how long now? With the default constraints you've put on Django a
developer would have to "work around" the out of the box code to make
the project behave like the big 3 names on the web. In this light it
sounds
Hi all, i am really fed up and have tried number of way. Please read
my last line which really describe where i am facing problem.
First Attempt.
models.py
-
class UserProfile(models.Model):
user = models.ForeignKey(User, unique=True, verbose_name=_
('user'))
gender =
Hello,
I am new to Django, I've been reading over the Django "Sites" Model
framework but I still have not come up with a creative way to design a site
which hosts multiple sites - providing different html layouts, style sheets.
I am looking for someone to kind of explain to me some best
On Apr 11, 3:55 pm, Praveen wrote:
> Hi all, i am really fed up and have tried number of way. Please read
> my last line which really describe where i am facing problem.
> First Attempt.
> Problem:Data is saving for register and contact but for profile i get
>
I agree with you on this, but it is often impractical due to the
volume of the data required. I have this data already in my database,
I shouldn't have to spend a few days moving it to the tests file...
Fixtures are a quick way to import your data to the test DB without
having to recreate
Hello,
In the Django admin site, I find myself going back and forth between
adding more columns to list_display to enhance the list view and then
removing them when I realize that they make the list view too big for
the popup version displayed when clicking on the add button or the
raw_id_fields
Hi Karen,
On Apr 8, 2:33 am, Karen Tracey wrote:
> On Tue, Apr 7, 2009 at 8:39 PM, George wrote:
>
> > I'm pretty sure this shouldn't happen; but the error is no doubt my
> > fault. Maybe something about the doc doesn't apply to my system? I
> > have
has anyone any idea why the inlines might go missing?
I have a model 'song' and a model 'recording'. I've created a
recordingInline class, and in the modelAdmin I set:
inlines = [recordingInline]
this all works fine on my Ubuntu installation running python 2.5.2 and
django 1.0.2, but on another
Every time that a load a form on my site, I see the following errors.
If I reload the page, they go away and everything works just fine.
Does anyone know why? Thank you in advance.
TemplateSyntaxError at /eaccounts/register/
Caught an exception while rendering: Tried edit in module
ps. I used the 'song' and 'recording' models as an example, in fact I
have several apps that use inlines, and on the one installation they are
missing in every case. No errors are thrown and I can see nothing
relevant in the logs.
On Sat, 2009-04-11 at 19:50 +0100, Andy Wilson wrote:
> has
Hello Russell,
I can't say this is best practice but my approach to a similar goal
has been to create projects for each website. These projects/websites
are unrelated to each other as far as content goes but all install a
common set of apps, some off the shelf, some custom. I have sites
I realise im kind of spamming here, but does nobody really has
encountered similar problem?
Alan.
On Apr 11, 12:07 am, zayatzz wrote:
> Ok, I did some search on web and i took closer look at the
> errormessage. :
>
> Request information
> GET
>
> No GET data
> POST
>
There is an explanation below, having to do with management
dependencies and dates the versions and packages became available. But
for the record, the solution is to install the py-sqlite3 package in
addition to py-djangoi (with sqlite enabled).
--George
On Sat 11 Apr 2009 at 08:25:04 PM +0200,
I would to pluralize into a translation block [1] but I also want to
apply the 'apnumber' template filter [2]
---
{% load humanize %}
{% load i18n %}
{% blocktrans count list|apnumber as number %}
There is {{ number }} object.
{% plural %}
There are {{ number }} objects.
{% endblocktrans
fixed
after trying all sorts of approaches I finally got it to work by
chmod'ing o+r to the files under the django/contrib/admin directory.
Most of them already had read permissions but I could see that a few
didn't.
a
On Sat, 2009-04-11 at 19:58 +0100, Andy Wilson wrote:
> ps. I used the
I've read some other posts regarding this issue as well as the
following article: http://www.b-list.org/weblog/2007/nov/03/working-models/.
I cannot seem to get this thing to work. Thank you in advance for any
help. Here is my code.
-- view --
from django.db.models import
Working through the tutorial everything went well until I came to the
section "Decoupling the URLconfs" where
the "include" option for urls in a subdirectory is not working as advertised.
What did I do wrong?
In mysite/urls.py I have:
==
from
On Sat, Apr 11, 2009 at 4:16 PM, Johann Spies wrote:
>
> Working through the tutorial everything went well until I came to the
> section "Decoupling the URLconfs" where
> the "include" option for urls in a subdirectory is not working as
> advertised.
>
> What did I do
On Apr 11, 9:25 pm, codecowboy wrote:
> I've read some other posts regarding this issue as well as the
> following article:http://www.b-list.org/weblog/2007/nov/03/working-models/.
> I cannot seem to get this thing to work. Thank you in advance for any
> help. Here is my
Hi,
My http://localhost:8000/admin page is hanging in the django server
and I get "Error 320 (net::ERR_INVALID_RESPONSE): Unknown error."
after a while.
I am running on fedora 7.
I am following the django tutorial and I am using the latest svn
django version.
After I set this in the
On Apr 11, 8:42 pm, adelein wrote:
> Hi,
>
> Myhttp://localhost:8000/adminpage is hanging in the django server
> and I get "Error 320 (net::ERR_INVALID_RESPONSE): Unknown error."
> after a while.
>
> I am running on fedora 7.
>
> I am following the django tutorial and I am
On Apr 11, 7:57 pm, codecowboy wrote:
> Every time that a load a form on my site, I see the following errors.
> If I reload the page, they go away and everything works just fine.
> Does anyone know why? Thank you in advance.
>
> TemplateSyntaxError at /eaccounts/register/
>
On Sat, Apr 11, 2009 at 10:52 AM, pkenjora wrote:
>
> You are correct, username authentication has always been around.
> However, the explicit banning and obfuscating of email authentication
> in the default module has not. That is the part that worries me, that
> is where
2009/4/11 Alex Gaynor :
> mysite/urls.py needs to have the full urlpatterns = thing like the
> polls/urls.py has so it would look like:
>
> from django.conf.urls.defaults import *
>
> admin.autodiscover()
>
> urlpatterns = patterns('',
> (r'^polls/',
Thank you Daniel. I got it working. That link that you gave me
helped me to figure it out. I'm curious though, is there ever a
reason in Django to define a method in a model class or would I always
use a custom manager method?
I'm going to post my code here for anyone who has the same
Hi,
I'm in the exact same situation
"
Validating models...
0 errors found
Django version 1.0.2 final, using settings 'mylu.settings'
Development server is running at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
Error: That port is already in use. "
but the solution above doesn't
I've followed some examples from around the Django community and that
is why I use the reverse() method at all. What is the point of using
the reverse() method?
On Apr 11, 5:03 pm, Daniel Roseman
wrote:
> On Apr 11, 7:57 pm, codecowboy
On Sat, 2009-04-11 at 11:51 -0300, Marcello Parra wrote:
> Hello,
>
> I'm planning a site with django.
> It need to have some functionalities that are very similar to Django's
> admin (like CRUD in some tables, with validations, etc...). But I
> would not like to have two sections (frontend and
On Saturday 11 April 2009 03:13:18 pm codecowboy wrote:
> What is the point of using the reverse() method?
>
I'm answering this because I want to make sure that my idea of it is the same
as the rest of the community and would definately like feedback on it.
Using this example:
urlpatterns =
On Sat, Apr 11, 2009 at 5:13 PM, codecowboy wrote:
> I've followed some examples from around the Django community and that
> is why I use the reverse() method at all. What is the point of using
> the reverse() method?
Well, there's a problem you'll run into fairly often.
On Sat, 2009-04-11 at 12:40 -0700, Kless wrote:
> I would to pluralize into a translation block [1] but I also want to
> apply the 'apnumber' template filter [2]
> ---
> {% load humanize %}
> {% load i18n %}
>
> {% blocktrans count list|apnumber as number %}
> There is {{ number }}
On Sat, 2009-04-11 at 07:52 -0700, pkenjora wrote:
> Malcom,
Well, I'm not "Malcom" (sic), but I'll reply anyway.
>Google, FaceBook, and LinkedIn have been using email authentication
> for how long now? With the default constraints you've put on Django a
> developer would have to "work
Thanks!
It works as charm.
On 11 abr, 22:54, Malcolm Tredinnick wrote:
> Indeed, this is possible. You need to use a number for the counting
> portion of the blocktrans-plural combination, so that gettext can use
> the number to determine the plural form. The trick is
On Sat, 2009-04-11 at 17:49 -0500, James Bennett wrote:
> On Sat, Apr 11, 2009 at 5:13 PM, codecowboy wrote:
> > I've followed some examples from around the Django community and that
> > is why I use the reverse() method at all. What is the point of using
> > the reverse()
On Sat, Apr 11, 2009 at 7:21 PM, Malcolm Tredinnick <
malc...@pointy-stick.com> wrote:
>
> On Sat, 2009-04-11 at 17:49 -0500, James Bennett wrote:
> > On Sat, Apr 11, 2009 at 5:13 PM, codecowboy wrote:
> > > I've followed some examples from around the Django community and
On Sat, 2009-04-11 at 19:23 -0400, Alex Gaynor wrote:
[...]
>
>
> Even if your application is exclusively for your own usage, it's not
> uncommon for the pointy haired boss to come in with requests to change
> a URL hierarchy, and there's no reason to create more work for
> yourself.
On Sat, Apr 11, 2009 at 7:24 PM, Malcolm Tredinnick <
malc...@pointy-stick.com> wrote:
>
> On Sat, 2009-04-11 at 19:23 -0400, Alex Gaynor wrote:
> [...]
> >
> >
> > Even if your application is exclusively for your own usage, it's not
> > uncommon for the pointy haired boss to come in with
Hi,
Sorry, I meant to say urls.py of course. So, given I did put the code
in the right file, the problem still remains.
-Adelein
On Apr 11, 1:58 pm, Daniel Roseman
wrote:
> On Apr 11, 8:42 pm, adelein wrote:
>
>
>
> > Hi,
>
> >
Hello Malcom,
Thanks for your help...
I think of a frontend as the user part of the site... where I will
provide users pages with proper layout and the admin site, is the one
provided by django admin where I would manage some tables, with
default django layout...
You must consider that I very
On Sat, 2009-04-11 at 21:10 -0300, Marcello Parra wrote:
> Hello Malcom,
>
> Thanks for your help...
> I think of a frontend as the user part of the site... where I will
> provide users pages with proper layout and the admin site, is the one
> provided by django admin where I would manage some
On Sat, 2009-04-11 at 17:09 -0700, adelein wrote:
>
> Hi,
>
> Sorry, I meant to say urls.py of course. So, given I did put the code
> in the right file, the problem still remains.
If you're following the tutorial, then you will be running the
development server. So all "server log" style
Yes, and I see no errors there. Still the admin page does not load at
all. I cant find any similar problems through google.
On Apr 11, 5:17 pm, Malcolm Tredinnick
wrote:
> On Sat, 2009-04-11 at 17:09 -0700, adelein wrote:
>
> > Hi,
>
> > Sorry, I meant to say urls.py
This is the server output:
[r...@bellatrix djangoblog]# python manage.py runserver
93.186.171.54:8001
Validating models...
0 errors found
Django version 1.1 beta 1 SVN-10504, using settings
'djangoblog.settings'
Development server is running at http://93.186.171.54:8001/
Quit the server with
Since no messages are shown in the log, the connection is most likely being
blocked somewhere upstream. Check that you've allowed port 8001 through any
firewalls or routers you have set up.
Zain
On Sat, Apr 11, 2009 at 5:23 PM, adelein wrote:
>
> This is the server output:
>
OK Malcom
Thanks again...
I will play some more with it.
Marcello
On 4/11/09, Malcolm Tredinnick wrote:
>
> On Sat, 2009-04-11 at 21:10 -0300, Marcello Parra wrote:
>> Hello Malcom,
>>
>> Thanks for your help...
>> I think of a frontend as the user part of the
Hi Zain,
The thing is that I was able to access the main page before I changed
the urls.py file, so I think that means that the port isnt being
blocked. Something to do with the urls.py file is messed up : (
Thanks
On Apr 11, 5:35 pm, Zain Memon wrote:
> Since no messages
On Sat, 2009-04-11 at 17:40 -0700, adelein wrote:
> Hi Zain,
>
> The thing is that I was able to access the main page before I changed
> the urls.py file, so I think that means that the port isnt being
> blocked. Something to do with the urls.py file is messed up : (
Then go back and try things
Hi guys,
In one of our views, we're getting the error below:
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
On Sat, Apr 11, 2009 at 9:45 PM, Iqbal Abdullah wrote:
>
> Hi guys,
>
> In one of our views, we're getting the error below:
>
> Traceback (most recent call last):
> File "/usr/lib/python2.5/site-packages/django/core/servers/
> basehttp.py", line 278, in run
>self.result
I have a legacy database that I used inspectdb to create the models.
I cleaned up the models, set primary keys, foriegn keys etc. But when
I tried to create a view I get an "unknown column activity.fp_id_id
in field list". I'm not sure why its appending an extra id to the end
of a foriegnkey
oh, forgot to add the view I'm using. Here is the view.
def country_detail(request, country):
c = Country.objects.get(slug=country)
lobbyists = Activity.objects.filter(country=c)
return render_to_response('country/country_detail.html',
{'country':c,
'lobbyists':lobbyists})
On Apr
Forgot to add the view I'm using.
def country_detail(request, country):
c = Country.objects.get(slug=country)
lobbyists = Activity.objects.filter(country=c)
return render_to_response('country/country_detail.html',
{'country':c,
'lobbyists':lobbyists})
On Sat, 2009-04-11 at 18:56 -0700, nixon66 wrote:
> I have a legacy database that I used inspectdb to create the models.
> I cleaned up the models, set primary keys, foriegn keys etc. But when
> I tried to create a view I get an "unknown column activity.fp_id_id
> in field list". I'm not sure
69 matches
Mail list logo