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.
>
>
> 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
> 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
> 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
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
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
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
> 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
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?
--~--~-~--~-
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.
--~--~-~-
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'], '
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
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
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):
#
> 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
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
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
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.
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
> 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
> 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
--~--~-~--~~-
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
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
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
--~--~-~--~~~---~--
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
> 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
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
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
--~--~-~--~~~--
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
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
> 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
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.
--~--~-~--~~~---~--
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
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
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
> 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
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
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
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
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
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
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
>
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%
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
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
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
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
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
&
'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,
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
considering this snippet:
valPrintlocation=int(request.POST.get('printlocation'))
if valPrintlocation==-1:
needsprinting=0
else:
needsprinting=1
Item = ItemTr
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
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
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
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.
>
>
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
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
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
> "
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
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
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
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
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
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
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
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_
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
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
/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
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
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
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 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
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
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 --
>
>
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
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
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...
>
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
;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
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
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
d_by_name',)
search_fields = ['Barcode','Location','Sku','LastTouchedBy']
readonly_fields =
['Barcode','Location','Sku','Quantity','InventoryFunction','LastTouchedBy',
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
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
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',
{'
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
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
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
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)
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
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):
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
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'
&
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
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
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
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
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
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?
201 - 300 of 320 matches
Mail list logo