mizan rahman wrote:
> No, i've checked that i've created a user named "djangouser" and the
> problem still exist what will i do? Plz help me
and you've checked that the password in settings.py is correct?
You only confirmed one of the two problems I suggested.
If both are correct, you may have
sky...@abc255:/$ sudo updatedb
[sudo] password for skylar:
sky...@abc255:/$ locate pg_hba.conf
/etc/postgresql/8.3/main/pg_hba.conf
sky...@abc255:/$ sudo vim /etc/postgresql/8.3/main/pg_hba.conf
There should be some lines something like this (for local access):
local all postgres
No, i've checked that i've created a user named "djangouser" and the
problem still exist what will i do? Plz help me
Regards,
Mizan
On 5/29/09, Tim Chase wrote:
>
>> File "/usr/local/lib/python2.6/dist-packages/django/db/backends/
>> postgresql_psycopg2/base.py", line 84, in _cursor
>> se
> File "/usr/local/lib/python2.6/dist-packages/django/db/backends/
> postgresql_psycopg2/base.py", line 84, in _cursor
> self.connection = Database.connect(conn_string, **self.options)
> psycopg2.OperationalError: FATAL: Ident authentication failed for
> user "djangouser"
Sounds like your
I'm new in django and just installed django 1.0.2. Everything works
fine until i use the following command in the terminal
r...@tafin-desktop:/home/tafin/mysite# python manage.py syncdb
The following error occurred
Traceback (most recent call last):
File "manage.py", line 11, in
execute_
Hi Alex,
I did exactly as you suggested with no luck. Any other suggestions?
Kevin
On May 25, 12:27 pm, Alex Koshelev wrote:
> Hi, Kevin.
>
> You can try to set FORCE_SCRIPT_NAME = '/directory' [1] settings
> variable. Or setup your web server to provide valid SCRIPT_NAME
> environment variabl
Hi, Kevin.
You can try to set FORCE_SCRIPT_NAME = '/directory' [1] settings
variable. Or setup your web server to provide valid SCRIPT_NAME
environment variable.
[1]: http://docs.djangoproject.com/en/dev/ref/settings/#force-script-name
---
Alex Koshelev
On Mon, May 25, 2009 at 10:52 PM, Kevi
My web host set up a django instance for me that can be accessed at
http://www.mysite.com/directory/. They've set up an Apache rule (or
something) that strips out the /directory/ before passing it on to
django, so as a result that url gets resolved by my url pattern "^$".
This is nice, the only p
On May 20, 9:01 am, google torp wrote:
> > Hi,
>
> > Hi,
>
> > my_date_list = ['01', '02',
> > '03','04','05','06','07','08','09','10','11','12','13','14','15','16','17',
> > '18','19','20','21','22','23','24','25','26','27','28','29','30','31']
> > str_date_list=[]
> > for item in my_date_list
This is probably more a python issue than a Django issue. Also
I don't really know what it is you want to do, but you should
consider if you really need to make all these lists? Also when
dealing with dates or datetimes python can do a lot of string
conversion for you. If you want to do it the way
Hi,
Hi,
my_date_list = ['01', '02',
'03','04','05','06','07','08','09','10','11','12','13','14','15','16','17','18','19','20','21','22','23','24','25','26','27','28','29','30','31']
str_date_list=[]
for item in my_date_list:
str_date_list.append(item+'-'+'05' + '-' +'09')
counter= 0
i = it
_list.append(item)
>
It appears he is appending the UserStatus instance.
W
-Original Message-
From: django-users@googlegroups.com
[mailto:django-us...@googlegroups.com] On Behalf Of Tom Evans
Sent: Tuesday, May 19, 2009 10:33 AM
To: django-users@googlegroups.com
Subject: Re: Need help for
On Tue, 2009-05-19 at 06:46 -0700, laspal wrote:
> Hi,
> My model is :
>id val msg
>20 1234 text
>20 1245text
>20 1275
: Django users
Subject: Need help for nested list in template
Hi,
My model is :
id val msg
20 1234 text
20 1245text
20 1275
Hi,
My model is :
id val msg
20 1234 text
20 1245text
20 1275 text
20 1356 t
hi,
I am trying to write a facebook app where user can see the status
history of his friends.
Everything seems to work fine until I try to save the status
information in my DB.
here is code :
class UserStatus(models.Model):
facebookid = models.IntegerField()
time = models.IntegerField()
On Thu, May 14, 2009 at 12:01 PM, Prabhjyot Singh wrote:
>
> I am using
>resultset = queryset.get(status__in=['pending'])
> but it is giving me error which says:
>
> Exception Type: MultipleObjectsReturned
> Exception Value:
>
> get() returned more than one WapAd -- it returned 3!
I am using
resultset = queryset.get(status__in=['pending'])
but it is giving me error which says:
Exception Type: MultipleObjectsReturned
Exception Value:
get() returned more than one WapAd -- it returned 3! Lookup parameters were
{'status__in': ['pending']}
Exceptio
On Mon, May 11, 2009 at 3:50 AM, laspal wrote:
>
> Hi,
> I am trying to build facebook app but ran into problem.
>
> here is the code:
>
> [snip]from django.http import HttpResponse
> from django.views.generic.simple import direct_to_template
>
> import facebook.djangofb as facebook
>
> from fbla
Hi,
I am trying to build facebook app but ran into problem.
here is the code:
from django.http import HttpResponse
from django.views.generic.simple import direct_to_template
import facebook.djangofb as facebook
from fblaspal.models import FacebookUser
@facebook.require_login()
def canvas(requ
On May 8, 12:03 am, Daniel Roseman
wrote:
> On May 7, 5:56 pm, Eric Chamberlain wrote:
>
> > Our view is taking too long to render, can anyone offer suggestions to
> > improve its speed?
>
> > There are 5830 profiles.
>
> > Total query count: 23809
> > Total duplicate query count: 493
> > Tota
On May 7, 5:56 pm, Eric Chamberlain wrote:
> Our view is taking too long to render, can anyone offer suggestions to
> improve its speed?
>
> There are 5830 profiles.
>
> Total query count: 23809
> Total duplicate query count: 493
> Total SQL execution time: 66.003
> Total Request execution time
On 5/7/2009 11:16 AM, Eric Chamberlain wrote:
>
> On May 7, 2009, at 10:36 AM, George Song wrote:
>
>> On 5/7/2009 8:56 AM, Eric Chamberlain wrote:
>>> Our view is taking too long to render, can anyone offer suggestions
>>> to
>>> improve its speed?
>>>
>>> There are 5830 profiles.
>>>
>>> /To
On May 7, 2009, at 10:36 AM, George Song wrote:
>
> On 5/7/2009 8:56 AM, Eric Chamberlain wrote:
>> Our view is taking too long to render, can anyone offer suggestions
>> to
>> improve its speed?
>>
>> There are 5830 profiles.
>>
>> /Total query count:/ 23809
>> /Total duplicate query count:/
On 5/7/2009 8:56 AM, Eric Chamberlain wrote:
> Our view is taking too long to render, can anyone offer suggestions to
> improve its speed?
>
> There are 5830 profiles.
>
> /Total query count:/ 23809
> /Total duplicate query count:/ 493
> /Total SQL execution time:/ 66.003
> /Total Request execu
Our view is taking too long to render, can anyone offer suggestions to
improve its speed?
There are 5830 profiles.
Total query count: 23809
Total duplicate query count: 493
Total SQL execution time: 66.003
Total Request execution time: 142.931
class Profile(Model):
id = UUIDField(primary_
I got a new question. I notice in the admin panel I can see
flatpages. In each page in the admin it offers content.
Do I put html code in their? Or is it just a fast way to change text?
I was given a zip folder that is named flatpages. Inside is each html
page of what the website has or supp
I took a look at that site. It's informative. I just don't see
anything about flagpages. I saw how to map a url to a view meaning
server-sided code.
currently I need 3 things to show up. 2 forms and content from
flagpages to display. I also need to use if statements to display
those 2 forms on
well, I am currently employed in a company. I need to finish adding my
web design for their site.
when I took the job I assumed he used apache or some hosting service
provider.
I later on after designing the stuff and getting hired it. I asked him
what he uses for a server he said google. I neve
Those are both good, and the book _Practical Django Projects_ by
Bennett is another good choice.
Jim
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-u
You already know the Django Documentation. Another good ressource is
the Django Book. Have a look at this: http://djangobook.com/ Maybe you
should work through the entire book to get a good understanding how
forms and flatpages work.
--~--~-~--~~~---~--~~
You receiv
Hi, I am trying to learn how to use if statements.
I need a form to appear on 2 pages.
Also how does flatpages work?
I was given by my workplace a zip file that contains the flatpages
html pages.
I used the admin to add flatpages and I added a template. I then have
4 pages.
Currently these p
figured it out on the IRC channeli basically just needed to modify
my view as follows to make it work
def results(request):
select = request.GET.getlist('select')
results = Warranty.objects.filter(id__in=select)
return render_to_response('admin/report_list.html',
{'results':results, 'se
ok i am having an issue getting getlist() to work properly. it displays the
correct number of rows in the template but there is not any data in those
rows. firebug shows the following:
*Request Headers*
Host: wartrac.lormfg.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.
On Mar 10, 2009, at 12:43 AM, bax...@gretschpages.com wrote:
>
> I'm trying to build a combined feed, and not having much luck. Here's
> what I have:
>
> class CombinedFeed(Feed):
>title = site.name +" combined feed"
>link = "/"
>description = "Latest updates from all "+site.name +"
I'm trying to build a combined feed, and not having much luck. Here's
what I have:
class CombinedFeed(Feed):
title = site.name +" combined feed"
link = "/"
description = "Latest updates from all "+site.name +" feeds"
description_template = 'feeds/combined.html'
def items(self
Hi, I haven't much forms with image/files, but I believe you should do
something like this:
photo = self.cleaned_data.get('photo')
This is for your second version.
When doing stuff like this I find it sometimes can be helpful to
insert an error like just typing raise. Django will in the debug
scr
Hi :)
I'm trying to validate an uploaded image's size and filetype.
However i have problems even gettings to the validation as django
keeps telling me that there's no object.
When i don't use the validation part I can upload an image just fine.
So the upload thing works.
I just can't figure out
On Thu, Feb 12, 2009 at 3:49 PM, Michael Repucci wrote:
>
> Oh, bummer. Is there a *not so good* way to do it in 1.0.2? It'd be
> nice to do it at all.
>
> Or is it perhaps not as scary as I think (as a newbie) to use the
> latest development version?
>
> On Feb 12, 3:35 pm, Alex Gaynor wrote:
>
Oh, bummer. Is there a *not so good* way to do it in 1.0.2? It'd be
nice to do it at all.
Or is it perhaps not as scary as I think (as a newbie) to use the
latest development version?
On Feb 12, 3:35 pm, Alex Gaynor wrote:
> On Thu, Feb 12, 2009 at 3:33 PM, Michael Repucci wrote:
>
>
>
>
>
> >
On Thu, Feb 12, 2009 at 3:33 PM, Michael Repucci wrote:
>
> It seems that the formfield_for_dbfield method doesn't have a hook for
> the request. So unless I'm mistaken, I can't use it to filter the
> Contact instances by the currently logged in user (request.user). Any
> other thoughts?
>
> On Fe
It seems that the formfield_for_dbfield method doesn't have a hook for
the request. So unless I'm mistaken, I can't use it to filter the
Contact instances by the currently logged in user (request.user). Any
other thoughts?
On Feb 12, 3:12 pm, Michael Repucci wrote:
> Oh. It doesn't mention that
On Thu, Feb 12, 2009 at 3:12 PM, Michael Repucci wrote:
>
> Oh. It doesn't mention that in the documentation. I am using 1.0.2-
> final. I'll check out formfield_for_dbfield. Thanks for the pointer!
>
> On Feb 12, 3:09 pm, Alex Gaynor wrote:
> > On Thu, Feb 12, 2009 at 3:07 PM, Michael Repucci >
Oh. It doesn't mention that in the documentation. I am using 1.0.2-
final. I'll check out formfield_for_dbfield. Thanks for the pointer!
On Feb 12, 3:09 pm, Alex Gaynor wrote:
> On Thu, Feb 12, 2009 at 3:07 PM, Michael Repucci wrote:
>
>
>
>
>
> > I'm new to Django, and already loving it. But I'
On Thu, Feb 12, 2009 at 3:07 PM, Michael Repucci wrote:
>
> I'm new to Django, and already loving it. But I'm stumbling a bit with
> how to accomplish the following task. Perhaps this isn't the best
> approach, but most of the site is working as planned, and it was super
> easy to get up and runni
I'm new to Django, and already loving it. But I'm stumbling a bit with
how to accomplish the following task. Perhaps this isn't the best
approach, but most of the site is working as planned, and it was super
easy to get up and running.
I have a Contact model and a Person model, the latter of whic
hi guys;
i am preparing to blog and i need help about comments. i am using
v1.0.2.
who can tell me how can i add comments on html?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
gt; visible = ...
> > text = models.CharField(max_length=255)
>
> > approcah 3:
> > class NewsBase():
> > date = ...
> > visible = ...
>
> > class News(NewsBase):
> > lang = models.CharField(max_length=5, choices=settings.LANGUAGES)
class News(NewsBase):
> lang = models.CharField(max_length=5, choices=settings.LANGUAGES)
> text = models.CharField(max_length=255)
>
> (Any other approaches are welcome.)
>
> The one I like the least is the second one.
>
> I really need help here, please tell me
NewsBase():
date = ...
visible = ...
class News(NewsBase):
lang = models.CharField(max_length=5, choices=settings.LANGUAGES)
text = models.CharField(max_length=255)
(Any other approaches are welcome.)
The one I like the least is the second one.
I really need help here, please tell
Thanks Malcom,
Looks like sorted in combination with the operator module is the key
to my problem. Now I can do:
import operator
vehicle_list = Vehicle.objects.all().select_related(depth=1)
vehicles = list(sorted(vehicle_list, key=operator.attrgetter
('model_year or whatever')))
...and do vehi
On Wed, 2009-01-21 at 21:40 -0800, Brandon Taylor wrote:
> Hi everyone,
>
> I need to do some table sorting and paging. To reduce trips to the DB,
> I'm storing my initial queryset in a session using the file system
> backend for local development.
>
> I was thinking I might be able to use the d
Hi everyone,
I need to do some table sorting and paging. To reduce trips to the DB,
I'm storing my initial queryset in a session using the file system
backend for local development.
I was thinking I might be able to use the dictsort filter and just
pass in the column as a variable to do the colu
Hello, I'm customizing the admin site, and I've run into an issue I
cannot find the solution to. I'm trying to create a new button on the
change_list page that, when pressed, runs a particular script with
input values dependent on the filters that are currently applied to
that change_list page.
S
solved:
os.chdir(path)
Hope that helps someone!
On Dec 20, 10:13 pm, Brandon Taylor wrote:
> Hi everyone,
>
> I'm unpacking files in a .zip and need to save each file into a
> particular directory, but I can't seem to find a way to set the
> directory to save into. Here is part of my code wher
Hi everyone,
I'm unpacking files in a .zip and need to save each file into a
particular directory, but I can't seem to find a way to set the
directory to save into. Here is part of my code where I'm opening
the .zip and iterating over the files:
thumb_zip_file = zipfile.ZipFile(obj.thumbnail_ima
Ok thanks but I ran into some other problem.
I have company1 with 3 callreports with dates -> 20 Nov, 25 Nov, 28
Nov
company 2 with callreports dates -> 10 Nov, 13 nov.
so my problem here is when I do :
company_list = Company.objects.select_related().order_by('-
callreports__meetingdate')
gives
Any one???
On Nov 25, 4:09 pm, laspal <[EMAIL PROTECTED]> wrote:
> Hi,
>
> ***view
> company_list = Company.objects.order_by('name')
> selected_companies_id_list = request.POST.getlist
> ('selected_companies_id_list')
> companies_list =[]
> for company_id in se
Hi,
***view
company_list = Company.objects.order_by('name')
selected_companies_id_list = request.POST.getlist
('selected_companies_id_list')
companies_list =[]
for company_id in selected_companies_id_list:
company = Company.objects.get(id = company_id)
On Nov 25, 12:27 am, laspal <[EMAIL PROTECTED]> wrote:
> Exception Type: FieldError
> Exception Value: Cannot resolve keyword 'callreports_meetingdate'
> into field.
Your error indicates a missing model field named
'callreports_meetingdate' since you used a single underscore.
Use
No It give me error
Exception Type: FieldError
Exception Value:Cannot resolve keyword 'callreports_meetingdate'
into field.
Thanks.
On Nov 25, 12:21 pm, Donn <[EMAIL PROTECTED]> wrote:
> On Tuesday, 25 November 2008 09:11:36 laspal wrote:
>
> > sortby = callreports.meetingdate
>
On Tuesday, 25 November 2008 09:11:36 laspal wrote:
> sortby = callreports.meetingdate
> company_list = Company.objects.order_by(sortby)
Try:
sortby = callreports__meetingdate
\d
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Go
Hi,
Code :
***Model**
class Company(models.Model):
name = models.CharField( max_length=100)
created_on = models.DateTimeField(auto_now_add=True)
updated_on = models.DateTimeField( auto_now = True)
class CallReport(models.Model):
company = models.Fore
HELP PLEASE
I keep getting this error:
MOD_PYTHON ERROR
ProcessId: 29055
Interpreter:'mysite.com' (this has been changed by me)
ServerName: 'mysite.com'
DocumentRoot: '/var/www/'
URI:'/admin'
Location: '/'
Directory: None
Filename: '/var/www/admin'
I need the user to be able to check the box on groups that apply to
them. This was really easy to do with oldforms ...
VIEWS:
# Get all that user's
groups
groups =
Groups.objects.filter(userProfile__user__pk=request.user.id)
# Create the FormWrapper, template, context, response
hi. I am trying to setup 11 websites sharing a common admin and
database using the sites framework. can someone help me out and tell
me how to get this installed over at webfaction.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the
I've lately noticed that Drupal is very cool, especially if you know
Django. The URL system is similar, source code is elegant and
lightweight, it does have forms, and the framework provides a lot of
stuff out of the box plus a lot of reusable modules (like Django apps).
Erik
On 06.10.2008
You should try Simfony: http://www.symfony-project.org
On Oct 6, 10:12 am, binaryj <[EMAIL PROTECTED]> wrote:
> i love Django . but my company is not so cool like me to try out
> new things in life.
>
> Well i know people here would be using python but i guess a lot of
> them would have some
i love Django . but my company is not so cool like me to try out
new things in life.
Well i know people here would be using python but i guess a lot of
them would have some php background.
The framework i would like to find is phpDjango but i know its not
there
but a desent frame work wi
After a little work, I realized that it IS performing the search, but
it only returns objects with fields that match EXACTLY. Is there any
way to make it so it does a partial search as well? Like if a field
contains part of that query, it still finds it?
On Oct 4, 7:07 pm, M Godshall <[EMAIL P
First of all, I'm trying to find a simple search solution that will
allow me to search specific fields in a model and display the results
according to their relevance (I'm using mysql). After much searching
it seemed like the djangosearch app would be the best solution (but I
welcome other sugges
{% ifnotequal CurrentComponent None %}
{% for key in ComponentDict %}
{{ComponentDict.CurrentComponent}} //
CurrentComponent = 'project'
{% endfor %}
{% endifnotequal %}
I write this code to the template code, but this does not work.
Wenn I write this:
{% i
Thank you much. I'll be looking closer at your Django forum code, too.
I'm liking what I see.
On Jul 23, 9:56 am, "Jonathan Buchanan" <[EMAIL PROTECTED]>
wrote:
> On Wed, Jul 23, 2008 at 3:26 PM, [EMAIL PROTECTED]
>
>
>
> <[EMAIL PROTECTED]> wrote:
>
> > On a forum I'm working on (http://grassroo
PROTECTED] On Behalf Of Dan
Sent: Friday, July 18, 2008 11:25 AM
To: django-users@googlegroups.com
Subject: Re: NEED HELP BADLY
On Thu, Jul 17, 2008 at 10:53 PM, Joshua Jonah <[EMAIL PROTECTED]>
wrote:
Is this the best way to organize the files in Django?
Not important, it's pe
On Thu, Jul 17, 2008 at 10:53 PM, Joshua Jonah <[EMAIL PROTECTED]> wrote:
> Is this the best way to organize the files in Django?
>
> Not important, it's personal taste.
>
Although, it is most of the time preferable to use regex group in your URLs
rather than GET. It looks much nicer.
--~--~---
How about:http://www.djangoproject.com/documentation/tutorial03/
On Fri, Jul 18, 2008 at 4:53 AM, Joshua Jonah <[EMAIL PROTECTED]> wrote:
> Is this the best way to organize the files in Django?
>
> Not important, it's personal taste.
>
> Also in a web cart scenario where is the best area to p
Is this the best way to organize the files in Django?
Not important, it's personal taste.
Also in a web cart scenario where is the best area to put the data of
the items inside the cart?
Umm, i would say in a database
Is it good to put the checking if the user has login in the base
template
In views.py you define as many python functions as cotrollers you
want. Hech one has thsi signature:
def view1(request, *args, **kwargs)
You also have a urls.py file that maps urls to view functions.
--
Juanjo Conti
--~--~-~--~~~---~--~~
You received this messa
Good Day to all!
I just want to clarify my knowledge in Django
Because right now I am a little bit confused.
The views.py is the "controller" so this file is the
one who will be handling the POST and GET.
So there will be only one method that will be handling
the POST and GET for the
On Thu, Jul 17, 2008 at 1:57 AM, Kadusale, Myles <[EMAIL PROTECTED]> wrote:
> Can anybody help me by sending snippets of code on using ComboField in
> forms?
Something like this from the regression tests?
http://code.djangoproject.com/browser/django/trunk/tests/regressiontests/forms/fields.py?rev
Good Day!
Can anybody help me by sending snippets of code on using ComboField in
forms?
Need it badly
Thanks
Myles
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send e
@googlegroups.com
Subject: RE: NEED HELP (Revised)
Help!
The indentions of my code in my editor are ok
I hope the code will not be distorted here again
I am trying out Django but I get this error in my console
C:\DjangoProj\UserApp>python manage.py syncdb
Error: Couldn't install apps, becau
Help!
The indentions of my code in my editor are ok
I hope the code will not be distorted here again
I am trying out Django but I get this error in my console
C:\DjangoProj\UserApp>python manage.py syncdb
Error: Couldn't install apps, because there were errors in one or more
models:
UserApp.Us
Help!
The indentions of my code in my editor are ok
I hope the code will not be distorted here again
I am trying out Django but I get this error in my console
C:\DjangoProj\UserApp>python manage.py syncdb
Error: Couldn't install apps, because there were errors in one or more
models:
UserApp.Use
Please post the code at dpaste.com, and paste the URL in the mail :-)
As Kenneth suggested, I think it looks like an indentation error, but it's
hard to detect or confirm while the mail is displayed with a non-monospaced
font.
Oscar
On Wed, Jul 16, 2008 at 7:39 AM, Kadusale, Myles <[EMAIL PROTECT
On 16-Jul-08, at 11:09 AM, Kadusale, Myles wrote:
> 12.user_fname = models.CharField('First Name', max_length=30)
>user_lname = models.CharField('Last Name', max_length=50)
>user_email = models.EmailField('Email Address', blank=True)
>user_gndr = models.CharField(max_
Help!
I am trying out Django but I get this error in my console
C:\DjangoProj\UserApp>python manage.py syncdb
Error: Couldn't install apps, because there were errors in one or more
models:
UserApp.UserProfile: invalid syntax (models.py, line 12)
These changes sound like just what I need. Thanks for the explanations.
I update my SVN checkout almost every day, so I'll be on the lookout
for these changes...
Thanks!
Jon Brisibn
http://jbrisbin.com
On Jul 11, 2008, at 8:51 AM, Marty Alchin wrote:
>
> On Fri, Jul 11, 2008 at 9:08 AM, Jon
Awesome! Thanks!
Jon Brisibn
http://jbrisbin.com
On Jul 11, 2008, at 8:37 AM, Malcolm Tredinnick wrote:
>
>
> On Fri, 2008-07-11 at 08:35 -0500, Jon Brisbin wrote:
>> I've considered a custom field. I just don't think I know Django well
>> enough yet to pull it off quickly. I'm still learning t
On Fri, Jul 11, 2008 at 9:08 AM, Jon Brisbin <[EMAIL PROTECTED]> wrote:
> I was a little bummed to discover that the Postgres blob support we depend
> on at work I can't use through Django in a project for myself. I'm trying to
> keep multiple versions of an original document (including the embedd
On Fri, 2008-07-11 at 08:35 -0500, Jon Brisbin wrote:
> I've considered a custom field. I just don't think I know Django well
> enough yet to pull it off quickly. I'm still learning the basics and
> this advanced usage of it is a little beyond my understanding at the
> moment. I could probably f
I've considered a custom field. I just don't think I know Django well
enough yet to pull it off quickly. I'm still learning the basics and
this advanced usage of it is a little beyond my understanding at the
moment. I could probably figure it out, but I don't know how long that
would take
On Fri, Jul 11, 2008 at 9:08 AM, Jon Brisbin <[EMAIL PROTECTED]> wrote:
> I was a little bummed to discover that the Postgres blob support we depend
> on at work I can't use through Django in a project for myself.
>
Have you considered writing a custom field?
http://www.djangoproject.com/documen
I was a little bummed to discover that the Postgres blob support we
depend on at work I can't use through Django in a project for myself.
I'm trying to keep multiple versions of an original document
(including the embedded content that's inside the file) and had
planned on using blobs to st
Hello,
I am a novice. I plan to study whether the design measures can predict
fault-prone classes in Python. Through investigating, Django is a good
experimental subject.
I need the the Django bug and version data. Is there any web API for
accessing the Django bug and version databases?
It is a l
Thanks very much for the advice Brian. I'll definitely switch that up
and try both approaches. I hadn't seen another way to get at a subset
of objects other than:
model_set.all
but now I do, thanks to your example.
Kind regards,
Brandon
On Jul 1, 12:28 pm, Brian Luft <[EMAIL PROTECTED]> wrote:
Another approach would be to add a method to your events model. Name
it something like "current_occurrences" and have it return the
filtered occurrences. Ex:
class event( models.Model ):
...
def current_occurrences( self ):
return
self.occurrence_set.filter( date__gte=datetime.dateti
Ok, you are asking for a list of events that have occurences on or
after today's date. Then with each event instance you are asking for
ALL occurence instances (event.occurrence_set.all). ALL means EVERY
occurence associated with that event object. You haven't done
anything to filter out occurre
I made a custom filter that tests for the date:
import datetime
from django import template
register = template.Library()
@register.filter('is_current')
def isPast(occurrence):
if occurrence.date >= datetime.datetime.today().date():
return True
return False
which works, but is
Hi everyone,
I have Events and Occurrences of an Event. Occurrence contains a
foreign_key for the Event.
In my template, I need to display the Event and Occurrences as such:
Event Title One
June 1, 2008 [times]
July 23, 2008 [times]
Event Title Two
August 25, 2008 [times]
Septem
901 - 1000 of 1151 matches
Mail list logo