Re: Need help

2009-05-31 Thread Tim Chase
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

Re: Need help

2009-05-31 Thread Skylar Saveland
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

Re: Need help

2009-05-31 Thread mizan rahman
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

Re: Need help

2009-05-28 Thread Tim Chase
> 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

Need help

2009-05-28 Thread trevath...@gmail.com
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_

Re: Need help with URL rewrites

2009-05-25 Thread Kevin Audleman
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

Re: Need help with URL rewrites

2009-05-25 Thread Alex Koshelev
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

Need help with URL rewrites

2009-05-25 Thread Kevin Audleman
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

Re: need help for using counter inside for loop

2009-05-20 Thread Daniel Roseman
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

Re: need help for using counter inside for loop

2009-05-20 Thread google torp
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

need help for using counter inside for loop

2009-05-20 Thread laspal
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

RE: Need help for nested list in template

2009-05-19 Thread Will Matos
_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

Re: Need help for nested list in template

2009-05-19 Thread Tom Evans
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

RE: Need help for nested list in template

2009-05-19 Thread Will Matos
: Django users Subject: Need help for nested list in template Hi, My model is : id val msg 20 1234 text 20 1245text 20 1275

Need help for nested list in template

2009-05-19 Thread laspal
Hi, My model is : id val msg 20 1234 text 20 1245text 20 1275 text 20 1356 t

need help for facebook app

2009-05-15 Thread laspal
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()

Re: need help in query set

2009-05-14 Thread Michael
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!

need help in query set

2009-05-14 Thread Prabhjyot Singh
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

Re: Need help for using facebook api

2009-05-11 Thread Karen Tracey
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

Need help for using facebook api

2009-05-11 Thread laspal
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

Re: Need help optimizing a view, too many queries

2009-05-08 Thread Daniel Roseman
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

Re: Need help optimizing a view, too many queries

2009-05-07 Thread Daniel Roseman
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

Re: Need help optimizing a view, too many queries

2009-05-07 Thread George Song
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

Re: Need help optimizing a view, too many queries

2009-05-07 Thread Eric Chamberlain
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:/

Re: Need help optimizing a view, too many queries

2009-05-07 Thread George Song
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

Need help optimizing a view, too many queries

2009-05-07 Thread Eric Chamberlain
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_

Re: Need help first user of django..

2009-04-16 Thread Aaron
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

Re: Need help first user of django..

2009-04-16 Thread Aaron
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

Re: Need help first user of django..

2009-04-16 Thread Aaron
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

Re: Need help first user of django..

2009-04-16 Thread commander_coder
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

Re: Need help first user of django..

2009-04-16 Thread johan.uhIe
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

Need help first user of django..

2009-04-15 Thread Aaron
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

Re: Need help figuring out how to make request.GET.getlist to work plz --SOLVED

2009-03-23 Thread bsisco
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

Need help figuring out how to make request.GET.getlist to work plz

2009-03-23 Thread Blake M. Sisco
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.

Re: Need help with combined feed

2009-03-09 Thread Eric Abrahamsen
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 +"

Need help with combined feed

2009-03-09 Thread bax...@gretschpages.com
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

Re: need help validating imagefield in modelform..

2009-02-14 Thread Briel
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

need help validating imagefield in modelform..

2009-02-14 Thread PeteDK
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

Re: need help limiting choices on admin form for ForeignKey field

2009-02-12 Thread Alex Gaynor
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: >

Re: need help limiting choices on admin form for ForeignKey field

2009-02-12 Thread Michael Repucci
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: > > > > > > >

Re: need help limiting choices on admin form for ForeignKey field

2009-02-12 Thread Alex Gaynor
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

Re: need help limiting choices on admin form for ForeignKey field

2009-02-12 Thread Michael Repucci
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

Re: need help limiting choices on admin form for ForeignKey field

2009-02-12 Thread Alex Gaynor
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 >

Re: need help limiting choices on admin form for ForeignKey field

2009-02-12 Thread 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'

Re: need help limiting choices on admin form for ForeignKey field

2009-02-12 Thread Alex Gaynor
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

need help limiting choices on admin form for ForeignKey field

2009-02-12 Thread Michael Repucci
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

i need help about comments.

2009-01-31 Thread Muslu Yüksektepe
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.

Re: Need help with models

2009-01-24 Thread Adrián Ribao
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)

Re: Need help with models

2009-01-24 Thread Kless
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

Need help with models

2009-01-24 Thread Adrián Ribao
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

Re: Need help changing the ordering of a queryset stored in session

2009-01-22 Thread Brandon Taylor
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

Re: Need help changing the ordering of a queryset stored in session

2009-01-22 Thread Malcolm Tredinnick
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

Need help changing the ordering of a queryset stored in session

2009-01-21 Thread Brandon Taylor
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

Accessing filter values on the admin site? (i.e. need help running a filter-dependent script)

2009-01-20 Thread Eric
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

Re: Need help writing file to specific directory

2008-12-20 Thread Brandon Taylor
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

Need help writing file to specific directory

2008-12-20 Thread Brandon Taylor
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

Re: Need help for sorting

2008-11-28 Thread laspal
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

Re: Need help regarding form

2008-11-26 Thread laspal
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

Need help regarding form

2008-11-25 Thread laspal
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)

Re: Need help for sorting

2008-11-25 Thread Andy Young
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

Re: Need help for sorting

2008-11-24 Thread laspal
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 >

Re: Need help for sorting

2008-11-24 Thread Donn
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

Need help for sorting

2008-11-24 Thread laspal
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

Need help with mod python

2008-10-23 Thread R C
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'

Need help with newforms ...

2008-10-17 Thread dbee
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

multiple sites on webfaction (need help with installation)

2008-10-16 Thread Bobby Roberts
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

Re: Sadly shifting to php sob sob. Need help finding right framework

2008-10-06 Thread Erik Allik
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

Re: Sadly shifting to php sob sob. Need help finding right framework

2008-10-06 Thread ionut
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

Sadly shifting to php sob sob. Need help finding right framework

2008-10-06 Thread binaryj
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

Re: Need help with djangosearch app

2008-10-04 Thread M Godshall
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

Need help with djangosearch app

2008-10-04 Thread M Godshall
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

need help

2008-09-12 Thread vytautas
{% 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

Re: Need help with some custom pagination

2008-07-25 Thread [EMAIL PROTECTED]
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

RE: NEED HELP BADLY

2008-07-17 Thread Kadusale, Myles
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

Re: NEED HELP BADLY

2008-07-17 Thread Dan
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. --~--~---

Re: NEED HELP BADLY

2008-07-17 Thread TiNo
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

Re: NEED HELP BADLY

2008-07-17 Thread Joshua Jonah
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

Re: NEED HELP BADLY

2008-07-17 Thread Juanjo Conti
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

NEED HELP BADLY

2008-07-17 Thread Kadusale, Myles
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

Re: Need help in using ComboField for Forms

2008-07-17 Thread Arien
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

Need help in using ComboField for Forms

2008-07-16 Thread Kadusale, Myles
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

RE: NEED HELP (I HAVE SOLVED ALREADY)

2008-07-16 Thread Kadusale, Myles
@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

RE: NEED HELP (Revised)

2008-07-16 Thread Kadusale, Myles
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

NEED HELP (Revised)

2008-07-16 Thread Kadusale, Myles
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

Re: NEED HELP

2008-07-16 Thread Oscar Carlsson
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

Re: NEED HELP

2008-07-16 Thread Kenneth Gonsalves
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_

NEED HELP

2008-07-15 Thread Kadusale, Myles
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)

Re: since I don't have a blob property...need help with files

2008-07-11 Thread Jon Brisbin
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

Re: since I don't have a blob property...need help with files

2008-07-11 Thread Jon Brisbin
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

Re: since I don't have a blob property...need help with files

2008-07-11 Thread Marty Alchin
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

Re: since I don't have a blob property...need help with files

2008-07-11 Thread Malcolm Tredinnick
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

Re: since I don't have a blob property...need help with files

2008-07-11 Thread Jon Brisbin
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

Re: since I don't have a blob property...need help with files

2008-07-11 Thread Karen Tracey
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

since I don't have a blob property...need help with files

2008-07-11 Thread Jon Brisbin
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

How to get the Django bug and version data ?-I need help:)

2008-07-09 Thread BlueSky
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

Re: Need help filtering a queryset

2008-07-01 Thread Brandon Taylor
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:

Re: Need help filtering a queryset

2008-07-01 Thread Brian Luft
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

Re: Need help filtering a queryset

2008-07-01 Thread Brian Luft
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

Re: Need help filtering a queryset

2008-07-01 Thread Brandon Taylor
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

Need help filtering a queryset

2008-07-01 Thread Brandon Taylor
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

<    5   6   7   8   9   10   11   12   >