tinymce help

2008-10-25 Thread Bobby Roberts
hi. I'm using django 1.0 over at webfaction. I have the following setup /static (serves js, css, flash, images etc) /www (my django app) I have tiny_mce loaded to /static/js/tiny_mce/ I have followed the steps at this page: http://code.djangoproject.com/wiki/AddWYSIWYGEditor in this

passing css classes in forms

2008-11-11 Thread Bobby Roberts
how can I assign form fields to certain css classes in django? --~--~-~--~~~---~--~~ 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 fr

Re: passing css classes in forms

2008-11-11 Thread Bobby Roberts
> Seehttp://docs.djangoproject.com/en/dev/ref/forms/widgets/#customizing-w... > > -- > DR Man i'm glad that wasn't a snake. Many thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post

widget attribute help needed

2008-11-14 Thread Bobby Roberts
hi. I have the following code in my forms.py Anonymous = forms.ChoiceField (choices=Anonymous_Choices, widget=forms.RadioSelect(attrs={'class':'anonymous'})) which sets up a radio button UL on my form. This part is working great. however, i've got a problem. When viewing the source below:

required checkboxes issue

2008-11-17 Thread Bobby Roberts
I have a problem with one of my forms in regard to a series of checkboxes. They are displaying properly on the page with the right values in the checkboxes. I have this set to REQUIRED in my form. However, whether I check one box, or check them all, I still get this message: "Select a valid ch

Re: required checkboxes issue

2008-11-17 Thread Bobby Roberts
> Without looking at any docs or code, it seems you have a mismatch in the > number of values expected by the form (one) and what will be returned by the > widget (multiple).  Are you sure you don't really want to be using a > MultipleChoiceField? > > Karen That appears to have done it. --~--~--

form issue

2008-11-18 Thread Bobby Roberts
hi group. I have the following statement: return render_to_response('donate-now.html', {'form':form,'ErrCode':errcodevalue,'Status':responsestatus,'TextResult':responsetext}, context_instance=RequestContext(request)) Which pushes data back to the template where a form resides. I'm getting

sending emails to multiple people

2008-11-19 Thread Bobby Roberts
I am trying to send an email to three people as follows: if request.session['Email'] != '': #initialize email variables # render both html and text strings from the templates below textmessage = render_to_string('email_text.html', context_instance=RequestContext(reques

Re: form issue

2008-11-19 Thread Bobby Roberts
On Nov 19, 12:11 am, "David Zhou" <[EMAIL PROTECTED]> wrote: > It'll be helpful if you post the entire view, but well, like the error > says, is form defined? ah... i had it defined in another view and not in the current one... many thanks. --~--~-~--~~~---~--~~

del session variables

2008-11-20 Thread Bobby Roberts
is there a way to kill a session rather than running a del statement on each session variable? I know in .asp you can simply say session.abandon. Is there an equivalent with django? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

weird form issue

2008-11-24 Thread Bobby Roberts
I've got a form that is kind of working. It's very strange because only choice fields are being pushed to the form and the textfields are not visible. Has anyone ever run across this before? --~--~-~--~~~---~--~~ You received this message because you are subscr

time differences

2008-11-28 Thread Bobby Roberts
I need to know the # of seconds between two dates for my django application. I believe this has to be done with straight python. I've read the py docs on time functions but it doesn't make sense to me. Can anyone help? Here's my situation: timea='11/15/2008 11:35 AM' timeb=datetime.now() How

Re: time differences

2008-11-28 Thread Bobby Roberts
On Nov 28, 1:35 pm, "Horst Gutmann" <[EMAIL PROTECTED]> wrote: > If you convert timea into a normal datetime instance just substract > timea from timeb and you will get a datetime.timedelta instance which > has everything you need :-) > >     import datetime >     a = datetime.datetime(2008, 11,

time help (again)

2008-12-01 Thread Bobby Roberts
ok day 7 and no luck. I really need help. I need to calculate the difference between two dates, one pulled from the database, and one as the NOW time. I'm hoping someone out there can help me and explain the code to me. Yes I've read the docs but they don't make sense to me thus the reason i'm

Re: time help (again)

2008-12-01 Thread Bobby Roberts
> http://www.python.org/doc/2.5.2/lib/datetime-timedelta.html yeah i said I don't understand this. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django

Re: del session variables

2008-12-17 Thread Bobby Roberts
> Have a look at theflush() method; I believe that might well be close to > what you are after. > > Regards, > Malcolm I'm trying to call the view below: def DoSessionReset(request): request.session.flush() return HttpResponseRedirect ('../shop') I'm getting this error: TypeError at

need urls help

2008-12-29 Thread Bobby Roberts
hi group. I have an issue where I need a random quote to display on every page on my website. Writing the view is not a problem (at least I don't think it is), but how would I call the view on each page of my website in the urls file? --~--~-~--~~~---~--~~ You rec

Re: need urls help

2008-12-29 Thread Bobby Roberts
On Dec 29, 10:48 am, Briel wrote: > A solution, not sure if it's the best, would be to make a function in > basicly any file, that generates a quote. Then you can import the > function to every view you want and call it to get the random quote. > All you need then is to pass it to your html-fil

can't get a model in the admin

2009-01-11 Thread Bobby Roberts
here's my model: from django.db import models class Testimonial(models.Model): active=models.IntegerField(max_length=11, blank=False) testimony=models.CharField(max_length=500) name=models.CharField(max_length=75) postdate = models.DateTimeField (auto_now_add=True

Re: can't get a model in the admin

2009-01-11 Thread Bobby Roberts
> What version of Django are you using? The use of max_length instead of > maxlength implies something later than 0.96 but the use of 'class Admin' > implies something before 1.0. If you are using 1.0 or later 'class Admin' > is not how admin defs are specified any more, see the admin doc for th

Re: can't get a model in the admin

2009-01-13 Thread Bobby Roberts
can anyone help me on this issue? --~--~-~--~~~---~--~~ 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

template does not exist

2009-01-13 Thread Bobby Roberts
Hi everyone. I have checked and re-checked my path for my templates in the settings file. I have also confirmed at my template is sitting in the right directory: I'm trying to do a direct to template in my urls.py file as follows: from django.conf.urls.defaults import * urlpatterns = pattern

admin model search

2009-01-14 Thread Bobby Roberts
hi all... I have search fields setup in my admin model as such: search_fields = ['name','postdate','testimony'] When i try to search , it just shows everything in the database. Am I missing something here? TIA --~--~-~--~~~---~--~~ You received this

Thank you!

2008-07-14 Thread Bobby Roberts
Thanks to everyone for your pointers in the right direction and prompt answers to my questions. I was able to build the online bill payment system for a client. I hope to be able to contribute back to the group as I get my Django legs stronger. --~--~-~--~~~---~--~---

integer digit limit

2008-07-15 Thread Bobby Roberts
hi I've got an IntegerField setup with a max_value of 20. I'm wondering how to limit the initial input on the form field to no more than 6 characters. They can enter 20 characters for example. When they hit the submit button of course it will error out but i'd like to limit the initial len

Re: integer digit limit

2008-07-15 Thread Bobby Roberts
>   some_field = forms.IntegerField(widget=forms.TextInput(attrs={'maxlength': PERFECT! I missed that attrs dictionary in the form widgets... man that is really awesome! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Gro

preselecting radio buttons

2008-07-16 Thread Bobby Roberts
I've got a radio button group with 4 options and I was wondering if there is a way in Django to preselect one of the options. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group

simple python question

2008-08-21 Thread Bobby Roberts
hi. I'm trying to figure out how to dynamically replace things in a string as follows: results.append({'URL': '/feed/%s/show/%s' (%item.rss, %item.rssfeed),}) I think i'm close but it's not the right syntax. can anyone out there help? --~--~-~--~~~---~--~---

python list to string conversion

2008-09-01 Thread Bobby Roberts
Hi all. I have a simple list such as: ['1','2','3','4'] I need to convert this to a string such as: 1,2,3,4 so that I can use that in a sql function. any help is appreciated... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the G

Re: python list to string conversion

2008-09-01 Thread Bobby Roberts
On Sep 1, 9:34 am, "Valts Mazurs" <[EMAIL PROTECTED]> wrote: > yourList = ['1','2','3','4'] > stringForQuery = ','.join(yourList) > > Regards, > Valts. Thanks for the quick reply. here's what I have: selchecks=ctx.request.field_value("selItems") myselchecks=','.join(selchecks) assert False, m

Re: python list to string conversion

2008-09-01 Thread Bobby Roberts
On Sep 1, 9:47 am, "Valts Mazurs" <[EMAIL PROTECTED]> wrote: > Hello, > > "selItems" is not the same as "selitems". Probably you have mixed the name > of the field that you are looking for in the forst row. the variable name is selltems (with a capital i) --~--~-~--~~~

Re: python list to string conversion

2008-09-01 Thread Bobby Roberts
On Sep 1, 9:57 am, "Valts Mazurs" <[EMAIL PROTECTED]> wrote: > Hello, > > So, which exact line raises the error? > > Valts. very very strange seems to be working beautifully now. Thanks for your help! --~--~-~--~~~---~--~~ You received this message because yo

python list issue

2008-09-02 Thread Bobby Roberts
interesting situation. I've got a form where i can check off items to manipulate in the database, each checkbox containing the recordID to manipulate if i check one box, (recordID # 66) then the length of that value is 2 If i check two boxes (record id # 66,67) then the length of the list is 2

webfaction django installation

2008-09-20 Thread Bobby Roberts
hi. I'm setting up a small django project on webfaction and i'm havnig some issues getting my settings.py file correct in regards to media files for both the front end and admin. Can someone please help me --~--~-~--~~~---~--~~ You received this message because yo

Re: webfaction django installation

2008-09-21 Thread Bobby Roberts
> The "Getting started with Django at WebFaction" article should solve > Bobby's > problem:https://help.webfaction.com/index.php?_m=knowledgebase&_a=viewarticle... > Setting up a static application was easy and worked perfectly. Thanks! --~--~-~--~~~---~--~~ You

Comments

2008-09-21 Thread Bobby Roberts
the Django docs state that "Django's comments are all "attached" to some parent object"... I'm building a very simple django powered website with auth, flatpages, and comments currently installed. I want to use the comments so people can post testimonials which can then be displayed on the site.

OS path in python

2008-09-22 Thread Bobby Roberts
i've got a setup like most people where i have directory structure such as: home/sites/xxx/whatever where xxx is the domain name If I have a file sitting in the "whatever" directory, how can i find the domain name under which the file resides? Thanks for helping a noob. --~--~-~--~-

Re: OS path in python

2008-09-22 Thread Bobby Roberts
On Sep 22, 5:05 pm, Jarek Zgoda <[EMAIL PROTECTED]> wrote: > os.path.dirname() Thanks. The main problem is that i have to dynamically get the url i'm at so i can pass to that function ( Python returns that i'm missing 1 argument and I don't know how to dynamically pass that in.) --~--~---

Re: OS path in python

2008-09-22 Thread Bobby Roberts
On Sep 22, 6:11 pm, Erik Allik <[EMAIL PROTECTED]> wrote: > Shouldn't that be os.path.abspath(os.path.dirname(__file__)) instead   > just in case the .py file is executed with a relative path? > > And Bobby, I would instead use the Sites framework to compute the URL   > of the site, not rely on

Re: OS path in python

2008-09-22 Thread Bobby Roberts
> import os > os.environ['SERVER_NAME'] > > See how that goes. I get: KeyError: 'SERVER_NAME' So i'm assuming we aren't --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, s

Re: OS path in python

2008-09-23 Thread Bobby Roberts
I wasn't aware of that group. Thanks for posting the info. On Sep 23, 5:08 am, bruno desthuilliers <[EMAIL PROTECTED]> wrote: > On 23 sep, 02:01, Bobby Roberts <[EMAIL PROTECTED]> wrote: > > > On Sep 22, 6:11 pm, Erik Allik <[EMAIL PROTECTED]> wrote: > &

installing tiny mce for flatpages

2008-10-04 Thread Bobby Roberts
hi group. I need some help getting tinymce installed for flatpages in admin. I'm serving static content from an application called /static/ with tinymce located in /static/js/tiny_mce/. I have read the docs on creating an admin.py file and have done that as well but it's not showing the richtex

Re: installing tiny mce for flatpages

2008-10-05 Thread Bobby Roberts
> Did you see this: > > http://code.djangoproject.com/wiki/AddWYSIWYGEditor yeah i saw that and tried to follow it. Here's what i did: 1. d/l tinymce 2. uploaded to /static/admin/js/tiny_mce (i have static setup as an app to serve static files) 3. I created a textarea.js file as instructed

Re: installing tiny mce for flatpages

2008-10-05 Thread Bobby Roberts
> So you did this > part?http://code.djangoproject.com/wiki/AddWYSIWYGEditor#UsingTinyMCEwithf... > > Do you have MEDIA_URL and MEDIA_ROOT setup correctly in settings.py? > Are you using the development server? Do you have that setup to server > static content? yeah see my previous post. This i

perplexing form issue

2008-10-05 Thread Bobby Roberts
Hi group. I have form on the right side of my website. It's a simple site consisting of a single template and utlizes flat pages. Now i can create content just fine and that is all working. The issue is that the form is not showing up when I view the site. I'm assuming that it is because some

html inserted into csv file

2008-10-07 Thread Bobby Roberts
HI group. I'm using the python csv writer to drop a csv file available for download/opening when a button is clicked on my site. The code is shown here myselchecks=selchecks sql="select * from inquiries where inquiry_id = (%s)" %myselchecks ctx.request.write_header('Content-Ty

random quote help

2008-10-07 Thread Bobby Roberts
Hi. I have a project with one template only. I am trying to get a random quote from the database pushed up to the template so that a new quote is shown with each new page url or each page refresh. Can someone point out in the docs where this is covered or help me understand the urls.py structur

Re: random quote help

2008-10-07 Thread Bobby Roberts
> Is your problem the mechanics of *making* the random choice, or are you > uncertain how to get it into your output? Hi Steve - Yeah i know the randomization needs to be in the view and then pushed back to the template. How would I call the view on each page in the website? thanks in advance

using flat pages and sites

2008-10-16 Thread Bobby Roberts
hi. I am needing advice as a django noob. I am hosting at webfaction and want to use django to power about 11 sites. I have my django app installed with a current project in its own directory with its own settings etc. My question is what is the best way to proceed from this point? Do I just

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

multiple sites help needed

2008-10-18 Thread Bobby Roberts
hi all. A friend of mine is hosting a number of websites over at webfaction. I've got them setup as follows. /staticserves static content /www django install serving 5 sites /www2 django install serving 5 sites /www3 django install serving 3 sites all of the sites seem to be pointing

Sites issue

2009-01-17 Thread Bobby Roberts
Hi Group... below you will see a code snippet which records a testimonial submitted off of a form into the database. Here's my setup... I'm hosting at webfaction with 3 instances of django running with 3 sites, 4 sites and 4 sites (only way I can avoid running over my RAM allotment). The sites

MultipleChoiceField issue

2009-02-04 Thread Bobby Roberts
Hi all. I'm using python2.5 / django .96x (yes i know - we're upgrading soon). I have an issue with a multiplechoice field which I can't figure out. Here are snippets from the form: # disaster choices previously defined Disaster=forms.MultipleChoiceField (required=True, choices=Disast

Re: MultipleChoiceField issue

2009-02-04 Thread Bobby Roberts
> I'd guess you need to be calling getlist rather than get to pull all the > various values from the POST data.  (Which is a detail you wouldn't need to > worry about if you were using the standard form clean() framework...not sure > why you are seemingly winging it on cleaning form data instead o

Re: MultipleChoiceField issue

2009-02-05 Thread Bobby Roberts
hi all. I'm NEW to the world of django and the Doc doesn't make any sense to me on this issue. Can someone give me an example of how to actually get all of the values out of a CheckboxSelectMultiple widget? I'm only able to get the last box checked. --~--~-~--~~~---~

Re: MultipleChoiceField issue

2009-02-05 Thread Bobby Roberts
nevermind i figured out how to use the getlist function... Thanks for your help. --~--~-~--~~~---~--~~ 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.co

pre-populating multiplechoicefields with session data

2009-02-08 Thread Bobby Roberts
Hi group. Please look at this view: # this form runs the search mechanism def DoSearchForm (request): if request.method =='POST': form=SearchForm (request.POST) if form.is_valid(): try: myuid=request.user.id * 1 except:

Re: pre-populating multiplechoicefields with session data

2009-02-08 Thread Bobby Roberts
anyone have any idea on this? --~--~-~--~~~---~--~~ 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 dja

checkboxInput values

2009-02-09 Thread Bobby Roberts
If i use the multiple Checkbox Input, It results in list of the items which were selected. My question is can you do the same thing for a single checkbox? As an old ASP guy I'd do this: I'm trying to do this in django by the following: #...snip forms.py el1_Choices = ( ('EN', 'ENGLIS

Re: checkboxInput values

2009-02-09 Thread Bobby Roberts
> What is the proper way to assign a value to a single checkbox?  Am I > just stuck with boolean and true/false?  That seems like a lot of > extra work on the back end. nevermind i just figured out to use a value attribute --~--~-~--~~~---~--~~ You received this m

trouble with template tag

2009-02-10 Thread Bobby Roberts
Hi. I have the following template tag: @register.filter(name='elementtotext') @stringfilter def elementtotext(string): itext='Unknown' if string=='DR': itext='Door' if string=='FL': itext='Flooring' if string=='FO': itext='Foundation' if string=='FR':

executing raw sql results in traceback

2009-02-10 Thread Bobby Roberts
hi gang. For various reasons i've decided to use a raw sql statement in my view. Following the example located at http://docs.djangoproject.com/en/dev/topics/db/sql/, I have a view which looks like this: def searchform(request): from django.db import connection ... # a massive sql statem

Re: executing raw sql results in traceback

2009-02-11 Thread Bobby Roberts
there shouldn't be really. The client has a search form and due to the way they want the search done there are about 40 option checkboxes for filtering in about 5 categories. It would have been easier if a filter with IN could have been used but the way the search logic is setup that is not an o

Re: executing raw sql results in traceback

2009-02-11 Thread Bobby Roberts
On Feb 11, 8:01 am, Bobby Roberts wrote: > there shouldn't be really.  The client has a search form and due to > the way they want the search done there are about 40 option checkboxes > for filtering in about 5 categories.  It would have been easier if a > filter with IN could h

Re: executing raw sql results in traceback

2009-02-12 Thread Bobby Roberts
On Feb 11, 8:38 pm, Bobby Roberts wrote: > On Feb 11, 8:01 am,BobbyRoberts wrote: > > > there shouldn't be really.  The client has a search form and due to > > the way they want the search done there are about 40 option checkboxes > > for filtering in about 5 ca

Re: executing raw sql results in traceback

2009-02-12 Thread Bobby Roberts
> but I'm not entirely sure of that since you still haven't provided the > actual traceback which would show what code, exactly, is running into > trouble.  Without the traceback I have to fall back on my crystal ball, and > it's pretty cloudy at the moment. > > Karen My apologies... I didn't se

Re: executing raw sql results in traceback

2009-02-12 Thread Bobby Roberts
On Feb 12, 3:29 pm, Karen Tracey wrote: > On Thu, Feb 12, 2009 at 10:26 AM, Bobby Roberts wrote: > > > My apologies... I didn't see Alex's post.  Google some times collapses > > threads on me.  Replacing % with %% seemed to work.  It queries the > > databa

django 0.97 and image thumbnails

2009-02-18 Thread Bobby Roberts
hi all. I've got a model with the following line: Pic1 = models.ImageField(upload_to='/auctionimages',blank=True) is it possible to easily create a thumbnail in django 0.97 on python2.5. If not, can someone show me how? --~--~-~--~~~---~--~~ You received th

admin foreignkey selection box question

2009-02-19 Thread Bobby Roberts
Hi everyone. I have two models - one for "auctions" and one for "auction FAQs". AuctionFAQs has a foreignkey field tied to the ID from auctions. The result of the selection box in my admin AuctionFAQs model is as follows: - Auction object Auction object It's pulling in

Re: admin foreignkey selection box question

2009-02-19 Thread Bobby Roberts
> Set a __unicode__ method on your Auction model. > -- > DR. Hi Daniel... I'm new to the python world... can you tell me what that even is? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To po

Re: admin foreignkey selection box question

2009-02-19 Thread Bobby Roberts
On Feb 19, 1:08 pm, Karen Tracey wrote: > On Thu, Feb 19, 2009 at 12:53 PM, Bobby Roberts wrote: > > > > Set a __unicode__ method on your Auction model. > > > -- > > > DR. > > > Hi Daniel... I'm new to the python world... can you tell me what

Announcing Django Noob Group

2009-02-19 Thread Bobby Roberts
... simpleton questions welcome, mentors encouraged to help... http://groups.google.com/group/djangonoobs --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to dja

calling a view from within a view

2009-02-26 Thread Bobby Roberts
Is it possible to execute a view from within a view? I've got a situation in my current view where if a condition is met, I need to branch control to a new view and send it new parameters. I have the following but it doesn't work: Showdetails(request,slug=currentslug,selfbidder=1) I have read

Re: calling a view from within a view

2009-02-26 Thread Bobby Roberts
> You just call it, views are normal python functions, that being said it is > often better to redirect where possible(or sensible). > > Alex hey alex - Thanks for your quick reply. Is my syntax above correct to execute it? it doesn't seem to be working at all. I know the code is executing

django query question

2009-02-27 Thread Bobby Roberts
hi all. I have a situation where I have two tables, auctions and bids. I need to do a subquery as such: select distinct id from auctions_auction where Active=1 and id IN (select distinct AuctionId_id from auctions_bid where BidderId=6) how would I do this in django? --~--~-~--~~--

session vars or User in templatetags

2009-03-03 Thread Bobby Roberts
I need to be able toaccess request.user.id in a template tag. Here is what i'm importing: from django import template from django.contrib.auth.models import User from django.template.defaultfilters import stringfilter import time,datetime from auctions.models import Bid,Auction,AuctionFAQ,Bid

Re: session vars or User in templatetags

2009-03-03 Thread Bobby Roberts
> You need to pass request.user.id to the templatetag, nothing automatically > has access to the current user or the current request. hi alex - on my template i have: {% au.id|getbidstatus %} if i try {% au.id|getbidstatus(request.user.id) %}, I get this: Could not parse the remainder: '(req

Re: session vars or User in templatetags

2009-03-03 Thread Bobby Roberts
> on my template i have: > > {% au.id|getbidstatus %} > > if i try {% au.id|getbidstatus(request.user.id) %},  I get this: > > Could not parse the remainder: '(request.user.id)' from 'au.id| > getbidstatus(request.user.id)' ok ... I'M LOOKING AT THE DOCS and i'm closer but it's only doing the l

clean data

2009-03-23 Thread Bobby Roberts
Hi all. I'm needing to learn how to tap into the clean data for forms. I'm looking at http://docs.djangoproject.com/en/dev/ref/forms/validation/ trying to figure things out. By my understanding, raw data needs to be cleaned before insertion into the database. I have a few questions: 1. wh

Re: clean data

2009-03-23 Thread Bobby Roberts
> Cleaning data is not in place as a security measure, but rather to > help you validate the data. That means that you can check the data > and find out if it fill your requirements. If you have a text field > and > want users to type in a serial number, you probably need some > custom validation

Admin Model Search issue.

2009-03-24 Thread Bobby Roberts
Hi all. We're using a dev version somewhere post .96 and pre 1.0. I have an admin model as setup here: class Admin: list_display = ('FirstName','LastName','Organization','BZipCode','Phone','Active','CreatedDate',) list_filter = ['CreatedDate'] fields = (

Need help with a modelChoiceField

2009-08-07 Thread Bobby Roberts
ok here's my form: class ParseFileChoiceField (forms.ModelChoiceField): def label_from_instance (self,obj): return obj.ProcessFile class FrmParser (forms.Form): parsefile = ParseFileChoiceField(queryset=Upload.objects.filter (numrecs__exact=0),empty_label='Choose',required=True,w

Re: Need help with a modelChoiceField

2009-08-07 Thread Bobby Roberts
hi. does anyone have any ideas why this is not working... we are using django 0.96 on this particular server. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: Need help with a modelChoiceField

2009-08-07 Thread Bobby Roberts
> label_from_instance was added after that version. For now the only > thing you can do is to define __unicode__ on the Upload model, and > that will provide the value that is displayed. > -- > DR. worked like a charm Daniel... thanks again! --~--~-~--~~~---~--~~ Y

help with excel exports

2009-08-10 Thread Bobby Roberts
Hi all - I'm pushing content to a template which i have built to properly organize the data for an excel spreadsheet. I'm generating the response in my view as such: response = render_to_response("spreadsheet.html", { 'tms': tms, }) response['Content-Type'] =

paginator for 0.96?

2009-08-10 Thread Bobby Roberts
is there any other examples of how to use the paginator in 0.96 other than this: http://www.djangoproject.com/documentation/0.96/models/pagination/#sample-usage I'm looking more specifically for template side use so I can see how to work it. Thanks in advance, --~--~-~--~~---

quick django gig $300

2009-08-11 Thread Bobby Roberts
contact me privately for more information. A friend needs help wrapping up a project. I'll provide his email address to interested parties. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To po

Re: paginator for 0.96?

2009-08-11 Thread Bobby Roberts
anyone have ideas on this? --~--~-~--~~~---~--~~ 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

Re: template tag question

2009-08-31 Thread Bobby Roberts
On Aug 31, 1:38 pm, Julián C. Pérez wrote: > Hi > I use Django 1.0 and I define a template function like... > --- > from django import template > register = template.Library() > def doSomething(param1, param2): >    # Do something like... >    return str(param1)+''+str(param2) > register.simple_t

template tag question

2009-08-31 Thread Bobby Roberts
hi group. I"ve got an issue i'm needing help with. I have two variables, a and b in my template and I need to pass those to a single template tag so I can process them and return a result to the template. Is there a way to pass more than one variable to a template tag... if so, how? thanks in

how do you use session variables in template tags?

2009-09-03 Thread Bobby Roberts
I cannot for the life of me get a session variable to work in a template tag. Here's what I have ... from django.contrib.sessions.models import Session register = template.Library() @register.filter(name='isinsavedlist') # this gets the latest new item from the new item flex mod def isinsavedl

Re: Admin Model Search issue.

2009-03-25 Thread Bobby Roberts
> Do you mind sharing the class definition for this model? here it is: #this keeps track of active bidders and their profile settings class Bidder (models.Model): AccountNum = models.ForeignKey(User, unique=True, blank=False)# User.Id (per auth user table Title = mo

user authentication question

2009-05-11 Thread Bobby Roberts
hi group - i've read the docs but can't find an answer to a particular question. In theory it's quite simple but I need help. Our company has a central database system from which we authenticate. The idea is to let employees have a central login across websites. In other words, if they login as

Re: user authentication question

2009-05-11 Thread Bobby Roberts
*hashed On May 11, 5:16 pm, Bobby Roberts wrote: > hi group - > > i've read the docs but can't find an answer to a particular question. > In theory it's quite simple but I need help.  Our company has a > central database system from which we authenticate. The ide

djangotiny and filebrowser question

2009-05-15 Thread Bobby Roberts
I've got an application i'm writing where I need to use django-tinymce and filebrowser on the public side (ie not admin) of the website. Can someone provide me with a rundown on how to make those non-admin dependent --~--~-~--~~~---~--~~ You received this message be

Seeking Example of MultipleChoiceField Example with dynamic Choices

2009-05-17 Thread Bobby Roberts
Hi. I'm needing to learn how to dynamically pull data out of the database and pass it as a CHOICES argument in my form. I want to pull a recordset of options, dump it into the choices and pass it to the form etc. Can someone out there lend me a hand? I'd like the options on the form to be chec

Re: Seeking Example of MultipleChoiceField Example with dynamic Choices

2009-05-17 Thread Bobby Roberts
> p=Country.objects.all()   -> capturing all the records from > Country table > def country_filler(self):    -> function  to generate a country > list which we are going to fetch from the records >     incr = 0 >     for i in p: >        self[incr] = i.country >        incr = incr+1 >    

Re: Seeking Example of MultipleChoiceField Example with dynamic Choices

2009-05-17 Thread Bobby Roberts
> Try this below code. I guess this will solve your purpose > >  # pull a recordset of the users >  userdata = auth_user.objects.all() > >  def user_filler(self): >      for i in userdata: >          self[i.id] = '%s, %s', (i.firstname, i.lastname) >      return self.items() > from django import

Re: Seeking Example of MultipleChoiceField Example with dynamic Choices

2009-05-17 Thread Bobby Roberts
> oops, please modify the line from "self[i.id]='%s %s', > (i.first_name,i.last_name)"  to "self[i.id]='%s %s' % > (i.first_name,i.last_name) " this results in the same issue: from django import forms from django.contrib.auth.models import User # pull a recordset of the users userdata = User.o

Re: Seeking Example of MultipleChoiceField Example with dynamic Choices

2009-05-17 Thread Bobby Roberts
> ...     users = forms.ModelMultipleChoiceField( > ...         queryset=User.objects, > ...         widget=forms.CheckboxSelectMultiple, > ...         required=True) > ...>>> User(username='sdc').save() > >>> User(username='bobby').save() dude you rock... i totally missed this. Does exactly w

  1   2   3   4   >