Re: how to get form fields to show

2008-06-26 Thread Bobby Roberts
i call the view? BR On Jun 26, 10:52 am, Matthias Kestenholz <[EMAIL PROTECTED]> wrote: > Hi, > > > > On Thu, 2008-06-26 at 07:30 -0700, Bobby Roberts wrote: > > hey - > > > got a quick question.  I think i'm missing part of the puzzle here. > >

Re: how to get form fields to show

2008-06-26 Thread Bobby Roberts
> Do you have an URLconf entry for your DoPaymentDetailForm view? Are you > sure, the view gets called? > Maybe you have an error in your Django Template? How do you access the > fields? (Something like {{ form.your_field }} should work.) > > Matthias My urls.py file only has the call for the t

Re: how to get form fields to show

2008-06-26 Thread Bobby Roberts
> But you should really start with the tutorial[1] or the Django Book[2]. > The documentation for Django is really outstanding, you'll progress much > faster if you do some more reading. > > [1]:http://www.djangoproject.com/documentation/ > [2]:http://www.djangobook.com/ - Yeah i've got thes

Re: how to get form fields to show

2008-06-26 Thread Bobby Roberts
> Hey no problem -- great you are learning new skills after that much > time. I did not mean to sound abrasive. I don't think you sounded abrasive @ all... I appreciate the hand up on this stuff. Definitely different (and a hell of a lot better) than programming with MS. here's what i've added

Re: how to get form fields to show

2008-06-26 Thread Bobby Roberts
Ok i've got the form fields showing fine. My form action is "." per the examples in the documentation. The form is submitting and tracing through the view but i get a "view didn't return an HttpResponse.object. here's my view: from forms import * from django.shortcuts import get_object_or

Re: how to get form fields to show

2008-06-26 Thread Bobby Roberts
disregard this last post... i figured it out thanks --~--~-~--~~~---~--~~ 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 g

intial form field values using session variables

2008-06-27 Thread Bobby Roberts
i'm trying to use session variables as initial values for certain form fields as such: AccountNum = forms.CharField (initial=request.session["AccountNum"],max_length=20, required=True, label = "Account #") i'm getting this: NameError: name 'request' is not defined how do i use a session v

Re: intial form field values using session variables

2008-06-27 Thread Bobby Roberts
> You can pass in an "initial" argument when you instantiate your Form, > as explained > here:http://www.djangoproject.com/documentation/newforms/#dynamic-initial-... > > Arien cool! I overlooked that. I've got it working great. I'm trying to print those session variables to the screen in ste

sessions in template (outside of views)

2008-06-27 Thread Bobby Roberts
i'm trying to view session variables on the screen in a template. I know the session variable has a value because i've tested it in my view. I'm trying this in my template but not getting any results: Account #: {{ request.session.AccountNum }} What could I be doing wrong? --~--~-~--~-

Re: sessions in template (outside of views)

2008-06-29 Thread Bobby Roberts
So I have to explicitly pass the session variables to the template to use them? That kind of defeats the purpose of session variables doesn't it? If they are in session we should be able to access them easier than passing them from view to template throughout our application. --~--~-~-

Re: sessions in template (outside of views)

2008-06-30 Thread Bobby Roberts
e("step2.html", 'form': form}, context_instance=RequestContext(request)) now my question here is how do i pass those session variables back to the template. I've tried building a data dictionary like this: {'Street2': request.session['Street2'], '

possible urls issue

2008-06-30 Thread Bobby Roberts
i have a situation here. I'm trying to NOT use .html extensions in this project. In other words i'd really like to just have my urls be directories. The project consists of a series of forms and i'd like them to proceed as follows: mysite.com/step1/ mysite.com/step2/ mysite.com/step3/ Part

Re: possible urls issue

2008-06-30 Thread Bobby Roberts
ok assuming i use a HttpResponseRedirect, how would I pull the session variables into the template? BR --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to dja

Re: possible urls issue

2008-06-30 Thread Bobby Roberts
ok first of all, thanks for your patience and your help. I'm making solid progress. So that I can learn how to program in Django as efficiently as possible... is there a better way to pass session data back to a template? Here's what i'm currently doing... def DoPayInfoForm (request): #

Re: sessions in template (outside of views)

2008-06-30 Thread Bobby Roberts
> If you have activated the request context processor, the request is > *automatically* passed to the template.  (That was the point of all > this, right?) > > So to display the value of request.session['City'], for example, you'd > use this in your template: > >   {{ request.session.City }} > > A

Re: sessions in template (outside of views)

2008-06-30 Thread Bobby Roberts
i love you haha many thanks to all the Django programmers who have given us such an awesome platform. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to dja

CheckboxInput unchecked at formload

2008-07-01 Thread Bobby Roberts
Is there a way to make a CheckboxInput unchecked at formload... I can only seem to get it to load in a checked state. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send e

template via email

2008-07-01 Thread Bobby Roberts
hola - I'm just about through with my first Django project. This has been a wonderful experience and I thank you for helping me learn so quickly. the last part of my application should send and email and I'm wondering if it's possible to somehow use a template as the html in my email receipt.

deleting a session

2008-07-02 Thread Bobby Roberts
i can't find a way to delete session data (other than user removing their cookie perhaps?) in the django docs. Is there an easy way to do this like in ASP? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django user

Re: deleting a session

2008-07-02 Thread Bobby Roberts
> On Jul 2, 2:50 pm, "Juanjo Conti" <[EMAIL PROTECTED]> wrote: > You mean in the views? > > del request.session['somedata'] Well If i have 15 session variables I don't want to have to do it for each variable. Is there something like del request.session.sessionid or something that will kill all s

Re: deleting a session

2008-07-02 Thread Bobby Roberts
> for key in request.session: >     del request.session[key] I get the following error: Exception Type: KeyError Exception Value:0 Exception Location: /usr/lib/python2.5/site-packages/django/contrib/ sessions/backends/base.py in __getitem__, line 31 --~--~-~--~~-

HTML Email

2008-07-02 Thread Bobby Roberts
is there a way in Django to send an actual HTML email? I can only get it to send as an attachment to a text email which is really pointless in my opinion. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users

non editable admin model

2008-07-03 Thread Bobby Roberts
Got a weird question. I have a need to make it so that we can search/ view a certain model in the admin section but not add or edit. is this possible? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" g

Re: non editable admin model

2008-07-05 Thread Bobby Roberts
anyone know if this can be done without modifying the actual django installation on the server. Surely it can be done through passing settings to the admin in the model or a settings in the settings file but I can't find any documentation on it. BR --~--~-~--~~~---~--

Django and XML

2008-07-05 Thread Bobby Roberts
Can Django interact with XML or would it be a view i write that does it? I'm putting in the last place of a payment gateway and need to know which direction to take. Thanks in advance BR --~--~-~--~~~---~--~~ You received this message because you are subscribed t

Re: Django based CMS

2008-07-05 Thread Bobby Roberts
> Is there any open source django based cms you would recommend?  Th > eonlyone I've seen so far is PyLucid. What else is there? I'm a noob but won't installing flat pages handle that for you? --~--~-~--~~~---~--~~ You received this message because you are subscri

escaping

2008-07-05 Thread Bobby Roberts
I'm trying to escape something printed back to a template as follows {{request.session['AccountNum'] | escape }} and i'm getting this error: Could not parse the remainder: ' | escape' from 'request.session.AccountNum | escape' >From what I can tell i'm using the right syntax... am I missing

Re: escaping

2008-07-05 Thread Bobby Roberts
On Jul 5, 4:15 pm, "Horst Gutmann" <[EMAIL PROTECTED]> wrote: > Already tried it without the extra spaces? > > {{ request.session.AccountNum|escape }} > > MfG, Horst man i really thought that had spaces in it in the docs... thanks for the clarification --~--~-~--~~~--

handling currency values

2008-07-05 Thread Bobby Roberts
what is the best way to handle currency values and then display in the correct currency for the current location. In the past, in other programming languages, I usually set the field type to decimal, 4 places and then when I printed the value on the screen, I just used the included formatcurrency

integer form fields

2008-07-08 Thread Bobby Roberts
I need to limit an integerfield form type to 6 digits. I've tried max_length and max_digits but those don't work. Is there anything that does that or will I need to do a custom validation? --~--~-~--~~~---~--~~ You received this message because you are subscribed

Re: integer form fields

2008-07-09 Thread Bobby Roberts
> How about max_value=99? > > Regards, > Jonathan. Thanks Jonathan... couldn't find that anywhere! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to djang

how to post XML with python / Django

2008-07-09 Thread Bobby Roberts
We are using a payment gateway for usaepay.com to process credit cards. Does anyone have experience with this? I'm trying to find a good resource for posting XML to another site but i'm coming up short with how to do this in django and python. --~--~-~--~~~---~--

weird mssql issue

2008-07-09 Thread Bobby Roberts
hey gang - got a really weird issue trying to connect to any mssql databases from home. I have Charter cable Internet, mssql 2000 running Kaspersky firewall.For some reason I can no longer connect to a mssql databases even when I have my firewall down. The issue was sudden and without warni

sessionid

2008-07-10 Thread Bobby Roberts
i'm trying to get the sessionid and print it to the screen as follows: {{ request.session.sessionid }} but nothing is getting returned. i've also tried .id with no results. can someone let me know how to do this? --~--~-~--~~~---~--~~ You received this message b

Re: sessionid

2008-07-10 Thread Bobby Roberts
disregard... figured it out. --~--~-~--~~~---~--~~ 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 [EMAI

Re: sessionid

2008-07-10 Thread Bobby Roberts
> Hey Bobby!  Just a note - it's generally a good idea to post the > solution to your problem when you get it, so that when people search the > archives who might have the same question as you, they can find it more > easily.  Glad you got it though! > oops... pardon the noobism! {{ request.sess

Anyone used USAEpay to process credit cards in django?

2008-07-10 Thread Bobby Roberts
I really need help here. Has anyone used this company's soap api in django to process credit cards? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us

urllib https post and parsing question

2008-07-11 Thread Bobby Roberts
Hi group. I'm using urllib to send information to my payment processor via https as follows: [snip] import urllib [snip] DataPacket = urllib.urlopen(PostUrl , DatatoSend) PayResponse = DataPacket.read() PayResponse.close() PostUrl is the url i'm posting to, Datatosend is the data i'm sending

Re: urllib https post and parsing question

2008-07-12 Thread Bobby Roberts
ok it turns out they are just passing the variables back to me in a url so i have to figure out how to parse that with django nice and neatly. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To

USAepay cc payment processor

2008-07-12 Thread Bobby Roberts
Hi group. I'm now successfully dinging credit cards using https posting over to USAepay.com. It's working great. I've got a question though that i'm not sure how to handle and general guidance is greatly appreciated. I pass two parameters to them called UMredirAccept and UMredirDecline for url

URLs question

2008-07-14 Thread Bobby Roberts
greetings. I'm using the urllib to post data to another site. In the data, I have to pass back a url for an "accept" page and url for a "decline" page. Now my very limited understanding of https posting is to allow you to send data to a website and get a response without leaving the url you are

Re: URLs question

2008-07-14 Thread Bobby Roberts
ok disregard this post. I dropped sending the accept/decline urls and i'm getting a direct post back to my url now. On Jul 14, 12:52 pm, Bobby Roberts <[EMAIL PROTECTED]> wrote: > greetings. > > I'm using the urllib to post data to another site.  In the data, I >

how to parse results from a URL post

2008-07-14 Thread Bobby Roberts
I'm getting a response back from my ongoing saga with https posting: The response is as follows: UMversion=2.9&UMstatus=Declined&UMauthCode=&UMrefNum=70994924&UMavsResult=No %20AVS%20response%20%28Typically%20no%20AVS%20data%20sent%20or%20swiped %20transaction%29&UMavsResultCode=&UMcvv2Result=No%

send_mail reply to (how to?)

2013-01-13 Thread Bobby Roberts
i'm trying to set the reply-to as shown here but it's erroring out: textmessage = render_to_string('communications/email/text/contact.html', mydict) from_email=request.POST.get('Email','') to_email=['w

print shop framework

2013-01-15 Thread Bobby Roberts
hi all... a possible client of mine is looking for an online custom print shop like 4over4.com. Are there any open source frameworks like this out there? I'd prefer a django app but will consider other languages. -- You received this message because you are subscribed to the Google Groups "D

help with query set

2013-07-14 Thread Bobby Roberts
hi. I need help with this simple setup. i need to get a list of announcements where active =1 and the discontinueDate is either null OR less than NOW. There are two issues: 1) the filter doesn't work 2) numannouncements always equals 1 even when nothing is returned any ideas? * model

quick question: RE model relations

2013-09-02 Thread Bobby Roberts
I'm creating an event module and want people to be able to associate a picture gallery with the event: from django.utils.translation import get_language, ugettext, ugettext_lazy as _ from django.contrib import admin from django.db import models from django.contrib.auth.models import User from

Re: quick question: RE model relations

2013-09-02 Thread Bobby Roberts
thanks for the info... yes the name is funny for the model isn't it? I try to write confusing code. Always test in production On Monday, September 2, 2013 12:24:41 PM UTC-4, Bobby Roberts wrote: > > I'm creating an event module and want people to be able to associate a &

Re: quick question: RE model relations

2013-09-02 Thread Bobby Roberts
'galleryview' is a funny name for a django > module, considering how we use the name 'view' for something else entirely. > > > Cheers, > AT > > [0] https://docs.djangoproject.com/en/dev/ref/models/fields/#foreignkey > > > On Mon, Sep 2, 2013 at 1:24 PM,

code 128 or code 39 barcode generation

2011-04-18 Thread Bobby Roberts
anyone know if there is a django module to generate code 128 or 39 barcodes for printing out on a webpage? -- 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 th

weird "must be an intance" error

2011-04-18 Thread Bobby Roberts
considering this snippet: valPrintlocation=int(request.POST.get('printlocation')) if valPrintlocation==-1: needsprinting=0 else: needsprinting=1 Item = ItemTr

Re: weird "must be an intance" error

2011-04-18 Thread Bobby Roberts
oops... forgot to clarify that Item.tid is a FK to printLocation -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsu

Re: weird "must be an intance" error

2011-04-18 Thread Bobby Roberts
haha Thanks for that... i never would have figured it out On Apr 18, 4:59 pm, akaariai wrote: > On Apr 18, 11:38 pm, Bobby Roberts wrote: > > > oops... forgot to clarify that Item.tid is a FK to printLocation > > Then you would want to assign to tid_id. For foreign keys

readonly field ordering issue

2011-04-20 Thread Bobby Roberts
hi all... i have certain fields in my model such as this: field1 field2 field3 field4 field5 field6 field7 field8 field9 field10 I have the even fields set to readonly fields. The issue i'm having is that when I go into edit this record in admin, i see the odd numbered fields at the top (which y

Re: readonly field ordering issue

2011-04-20 Thread Bobby Roberts
thanks! That is exactly what i used. would be great if the docs actually said that would solve the issue. On Apr 20, 10:52 am, Shawn Milochik wrote: > I think you can just specify a 'fields' attribute in your admin model > to fix this. It should retain the order in which they're entered. > >

weird error with MS Excel 2010 exports

2011-05-19 Thread Bobby Roberts
hi. Regardless of how we try to export from a view into an excel file, we get a weird msgbox reading: "The file you are trying to open, 'filenamehere.xls', is in a different format than specified by the file extension. Verify that the file is not corrupted and is from a trusted source before ope

Caught RuntimeError while rendering: invalid label:

2011-05-26 Thread Bobby Roberts
i'm getting this error: Caught RuntimeError while rendering: invalid label: "whatever" where whatever is the name of an app in INSTALLED_APPS. what does "invalid label" mean? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this g

Re: Caught RuntimeError while rendering: invalid label:

2011-05-26 Thread Bobby Roberts
anyone have any idea what invalid label means? On May 26, 12:24 pm, Bobby Roberts wrote: > i'm getting this error: > > Caught RuntimeError while rendering: invalid label:  "whatever" > > where whatever is the name of an app in INSTALLED_APPS.  what does > "

invalid label

2011-05-27 Thread Bobby Roberts
ok got a strange situation here. I'm using Satchmo for a shopping cart and have an independent module i wrote which is called from the main nav. This module works fine on every page of the site except for the product detail page in Satchmo. When i view the page in satchmo i get this error: Dja

"invalid label' as it pertains to application name

2011-05-31 Thread Bobby Roberts
I am getting a pretty non-descript error reading "Caught RuntimeError while rendering: invalid label: cigar-wizard" when i go to a certain url on my website. This isn't a form label... it's referring to an application name. Any ideas what that means? -- You received this message because you are

DEBUG=False issue

2011-06-02 Thread Bobby Roberts
hey - i've got a weird issue with a django app. The app runs great on both the front end and in the /admin section when DEBUG=True in my settings.py file. However, whenever I set DEBUG=False in the settings file so that i get tracebacks by email, the entire /admin section 404s. Any idea what co

debug=false issue

2011-06-02 Thread Bobby Roberts
hey - i've got a weird issue with a django app. The app runs great on both the front end and in the /admin section when DEBUG=True in my settings.py file. However, whenever I set DEBUG=False in the settings file so that i get tracebacks by email, the entire /admin section 404s. Any idea what co

accessing views outside a module

2011-06-04 Thread Bobby Roberts
let's say i've got two apps in my project... app a and app b how do i access views in app a from app b views? -- 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

Excel dumps to Office 10

2011-06-06 Thread Bobby Roberts
hey - we are dumping results to excel as such: response = render_to_response('templatename_excel.html', {'trs':trs,}) filename='myfilename.xls' response['Content-Disposition'] = 'attachment; filename=' + filename response['Content-Type'] = 'applica

Re: VERY cheap django hosting?

2011-06-08 Thread Bobby Roberts
i've been using webfaction.com for a while for $9/mo with one click django installs. You can also checkout www.slicehost.com if you want your own vps and more control. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send

send_mail issue

2011-06-08 Thread Bobby Roberts
hi all... i'm trying to send an email attachment and am getting the following traceback: global name 'EmailMessage' is not defined Here's the code: [...] from django.core.mail import send_mail list2send = mymodel.objects.filter(idNumber = 3) filecontent = render_to_string('template_

Re: send_mail issue

2011-06-08 Thread Bobby Roberts
that should be message = EmailMessage(subject, emailmsg,'fromem...@domainname.com',to_email,attachments=(filename,filecontent,'application/ vnd.ms-excel')) -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to dja

Re: send_mail issue

2011-06-08 Thread Bobby Roberts
l import EmailMessage > > On Wed, Jun 8, 2011 at 7:35 PM, Bobby Roberts wrote: > > hi all... i'm trying to send an email attachment and am getting the > > following traceback: > > > global name 'EmailMessage' is not defined > > > Here's the

Re: send_mail issue

2011-06-08 Thread Bobby Roberts
/vnd.ms-excel') before your > message.send > > On Wed, Jun 8, 2011 at 7:59 PM, Bobby Roberts wrote: > > hey david... that got past he original error but now i'm getting this: > > > _create_attachment() takes at most 4 arguments (37 given) > > > i think t

filter chaining question

2011-06-15 Thread Bobby Roberts
consider this: findit = inventory.objects.filter(Barcode = self.Barcode, Condition__name = "good") How could i make this filter say "good" or "acceptable" or IN ('good','acceptable') -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to

satchmo images

2011-06-16 Thread Bobby Roberts
anyone know where to adjust the upload size of the product images in satchmo? -- 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 djan

csrf token not working

2011-07-02 Thread Bobby Roberts
I'm looking at the docs at https://docs.djangoproject.com/en/dev/ref/contrib/csrf/ for CSRF implementation. I've got steps 1 and 2 done but the csrf token is not even showing in the form even though i have {%csrf_token %} within the form html any ideas what would cause it not to create a toke

Satchmo, the bloated manatee

2011-07-28 Thread Bobby Roberts
satchmo has become a bloated manatee of a codebase. Does anyone know why it run so slowly now? Or, do you have to feed it treats or something secretive to get it running properly? I've got two satchmo sites on a 256mb slice at slicehost and they are pretty much unusable at the moment. -- You r

Re: Satchmo, the bloated manatee

2011-07-29 Thread Bobby Roberts
opinions on software should never be taken personally and should never be silenced. I take heat over programming on a daily basis just as I have for the past 30 years. It's part of the business. Good programmers take it, grow from it and come back with a better product. There was no slight inte

Re: Satchmo, the bloated manatee

2011-07-29 Thread Bobby Roberts
Django is the next best thing to Emancipation. I like Satchmo for the most part. I'll keep my rants off list. . I promise. You can follow me on twitter @bloatedmanatee from now on. Thanks for setting me straight everyone! On Jul 29, 1:14 pm, Jacob Kaplan-Moss wrote: > Hi Bobby -- > >

Re: Satchmo, the bloated manatee

2011-07-29 Thread Bobby Roberts
Django is the best thing since the Civil Rights Movement. Satchmo is ok for the most part except for certain things which do not work unless you correct the errors in the programming. I'm sorry for ranting on the board. I will never rant again. @bloatedmanat

listpage question

2011-01-17 Thread Bobby Roberts
let's say i have two simple models model a id=IntegerField... description = CharField... model b id=IntegerField... modelavalue=IntegerField... (a value form modela.id) description=CharField... ok in the /admin listing page for model B, how can i return modela.description for modelb.model

Re: listpage question

2011-01-18 Thread Bobby Roberts
does modelb.modelavalue need a FK relationship with modela.id or does django do this automatically? On Jan 17, 11:15 pm, Vovk Donets wrote: > 2011/1/18 Bobby Roberts > > > > > let's say  i have two simple models > > > model a > > id=IntegerField... >

help with foreign keys in admin

2011-02-02 Thread Bobby Roberts
considering this model: class Inventory (models.Model): id = models.AutoField (primary_key=True) Barcode = models.BigIntegerField(blank=False) Location = models.CharField (max_length=25,blank=False, db_index=True) Sku = models.CharField (max_length=25,blank=False, d

Re: help with foreign keys in admin

2011-02-03 Thread Bobby Roberts
;m not seeing anything wrong with my readonly list a in my code. On Feb 3, 12:31 am, Karl Bowden wrote: > On 3 February 2011 16:14, Bobby Roberts wrote: > > > > > considering this model: > > > class Inventory (models.Model): > >        id = models.AutoFi

Re: help with foreign keys in admin

2011-02-03 Thread Bobby Roberts
nevermind... it was a case issue... you know if python knows there's an error with case it would just say "hey check the case here" On Feb 3, 12:31 am, Karl Bowden wrote: > On 3 February 2011 16:14, Bobby Roberts wrote: > > > > > considering this model: &g

foreign key issue

2011-02-03 Thread Bobby Roberts
I'm setting up a foreignkey field in my model as follows: InventoryFunction = models.ForeignKey('AppSettings.InventoryOption', verbose_name=_('InvFunction'), related_name='InvFunction',blank=False, null=False) result from syncdb: scanning.inventory: Accessor for field 'InventoryFunction

Re: foreign key issue

2011-02-03 Thread Bobby Roberts
d_by_name',) search_fields = ['Barcode','Location','Sku','LastTouchedBy'] readonly_fields = ['Barcode','Location','Sku','Quantity','InventoryFunction','LastTouchedBy',&#

Re: foreign key issue

2011-02-03 Thread Bobby Roberts
yeah i changed the related name to see if that would make any difference... the error baffles me. On Feb 3, 9:18 am, Tom Evans wrote: > On Thu, Feb 3, 2011 at 2:05 PM, Bobby Roberts wrote: > > here ya go: > > >... > > models.ForeignKey('AppSettings.Inven

user full name in template

2011-02-03 Thread Bobby Roberts
is there a template tag to show the user's full name on a template? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+u

Re: user full name in template

2011-02-03 Thread Bobby Roberts
here's what i'm trying from django.contrib.auth import authenticate, login, logout #import django user modules from django.contrib.auth.models import User def ShowMainMenu (request): fullname=User.first_name + ' ' + User.last_name return render_to_response('scanning/menu.html', {'

model names

2011-02-06 Thread Bobby Roberts
if i have a model name "Facility", django adds an "s" to it in /admin and it shows up as Facilitys. How can I make it show up as "Facilities" in /admin? -- 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: model names

2011-02-06 Thread Bobby Roberts
yeah i tried that already and it didn't work On Feb 6, 11:38 am, Joel Goldstick wrote: > On Sun, Feb 6, 2011 at 11:33 AM, Bobby Roberts wrote: > > if i have a model name "Facility", django adds an "s" to it in /admin > > and it shows up as

Re: model names

2011-02-06 Thread Bobby Roberts
ah... i only had that on he admin model On Feb 6, 12:07 pm, Ivo Brodien wrote: > On 06.02.2011, at 18:01, Bobby Roberts wrote: > > > yeah i tried that already and it didn't work > > did you also define the meta class for the Admin class? -- You received this

manytomany help

2011-02-07 Thread Bobby Roberts
I've got two models: class a (models.Model): id = models.AutoField (primary_key=True) name = models.CharField (max_length=50, blank=False, db_index=True) class aAdmin(admin.ModelAdmin): list_display = ('name',) search_fields = ['name'] admin.site.register(a,aAdmin)

foreign key help

2011-02-13 Thread Bobby Roberts
class Disposition (models.Model): id = models.AutoField (primary_key=True) name = models.CharField (max_length=50, blank=False, db_index=True) active = models.IntegerField(blank=False, choices=active_choices) order = models.IntegerField(blank=True, default=0) class D

Caught KeyError while rendering: u'objects_name'

2011-02-13 Thread Bobby Roberts
when i try to delete one of the TractorRecord objects in this model, i get this message: Caught KeyError while rendering: u'objects_name' any idea what that means? Django 1.2.3 (mod_wsgi 3.2/Python 2.6) # this holds possible dispositions for Tractoruees class Disposition (models.Model):

Re: Caught KeyError while rendering: u'objects_name'

2011-02-13 Thread Bobby Roberts
i'm also using the grappelli skin for admin On Feb 13, 5:52 pm, Bobby Roberts wrote: > when i try to delete one of the TractorRecord objects in this model, i > get this message: > > Caught KeyError while rendering: u'objects_name' > > any idea what that mean

Re: Caught KeyError while rendering: u'objects_name'

2011-02-13 Thread Bobby Roberts
t; (http://www.python.org/dev/peps/pep-0008/) > > On 13.02.2011, at 23:52, Bobby Roberts wrote: > > > when i try to delete one of the TractorRecord objects in this model, i > > get this message: > > > Caught KeyError while rendering: u'objects_name' &

trouble storing a manytomany field in a session variable

2011-02-14 Thread Bobby Roberts
I'm trying to figure out how to store a manytomany relationship in a session variable. is the only way really to do it to loop through and make a csv string and save that? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, s

Re: trouble storing a manytomany field in a session variable

2011-02-14 Thread Bobby Roberts
out taking all of those values and making a CSV string to save in the session variable? On Feb 14, 8:37 pm, Bobby Roberts wrote: > I'm trying to figure out how to store a manytomany relationship in a > session variable.  is the only way really to do it to loop through and > make a

Re: trouble storing a manytomany field in a session variable

2011-02-14 Thread Bobby Roberts
someone can choose 1 or many locations in their profile and i'm trying to think of an interesting way to put those values from the MTM table into a session var. On Feb 14, 9:03 pm, Bobby Roberts wrote: > just wanted to clarify... i've got the manytomany setup in a user > pro

Re: trouble storing a manytomany field in a session variable

2011-02-14 Thread Bobby Roberts
yeah i've got it where session ends on browser close so they will refresh when they come back and log back in. I'm just trying to find an efficient way to store the values so that I don't have to query on every page. On Feb 14, 9:19 pm, Shawn Milochik wrote: > Pickling will let you store objects

form select box how to (help needed)

2011-02-15 Thread Bobby Roberts
I've got several select boxes in a user profile that the we can manipulate in /admin. One of these select boxes is called "locations" and has locations to which you can assign a user. for explanation, let's say that that the select box is populated like such: 1,location1 2,location2 3,location3

Re: form select box how to (help needed)

2011-02-16 Thread Bobby Roberts
i have no idea what this means is there an example anywhere? On Feb 16, 12:43 am, Kenneth Gonsalves wrote: > On Tue, 2011-02-15 at 19:05 -0800, Bobby Roberts wrote: > > I can't load it through the "CHOICES" parameter in my forms field... > > how can I do this?

<    1   2   3   4   >