t how to use WAF to deploy my Django project and I'm all
> set :-{}
>
>
>
> On Fri, 2008-02-08 at 11:51 -0800, Brandon Taylor wrote:
> > FINALLY, it works.
>
> > I guess the entire problem was that I had specified the website
> > directory itself instead of t
Hi,
That doesn't seem to want to work for me. Since I've been able to get
mod_python to run my pages, I'm halfway there. Now I just can't get
images to show up in my pages.
My website directory structure is:
/website1
/public
/images
/__init__.py, urls.py, views.py, etc
If I'm spe
, 1:08 pm, Adam Stein <[EMAIL PROTECTED]> wrote:
> Just started with Django myself. Went thru 3 different tutorials.
> Hopefully, what I'm mentioning below hasn't already been covered.
>
>
>
> On Fri, 2008-02-08 at 10:34 -0800, Brandon Taylor wrote:
> > So,
Hi everyone,
I'm just about to give up on Django. I can't even get it to load a
simple jpeg using the built-in server.
Here is my directory structure:
'/Users/bt/django_projects' is where all of my Django projects exist
/btaylor_design
settings.py, etc
/public
/images
/styl
uit the server with CONTROL-C.
[09/Feb/2008 11:58:42] "GET / HTTP/1.1" 200 39
[09/Feb/2008 11:58:42] "GET /site_media/my_image.jpg HTTP/1.1" 200 39
Ideas?
Thank you,
Brandon
On Feb 9, 10:59 am, Michael Hipp <[EMAIL PROTECTED]> wrote:
> Brandon Taylor wrote:
> > Hi ev
Yes, here is my settings file:
- - -
import os.path
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
# ('Your Name', '[EMAIL PROTECTED]'),
)
MANAGERS = ADMINS
DATABASE_ENGINE = '' # 'postgresql_psycopg2', 'postgresql',
'mysql', 'sqlite3' or 'ado_mssql'.
DATABASE_NAME = ''
YOU, MY FRIEND, ARE THE MAN.
I can't thank you enough. A tear almost ran down my cheek.
Kindest regards,
Brandon
On Feb 9, 1:29 pm, "Marty Alchin" <[EMAIL PROTECTED]> wrote:
> On 2/9/08, Brandon Taylor <[EMAIL PROTECTED]> wrote:
>
> > Any way, here is
Man I hear you. I've been doing web for 10 years, in a variety of
languages. I have Django installed VERBATIM according to the
documentation.
I'm using Mac OS X 10.4.11. I have Python 2.5.1 and Django 0.97
installed.
I can get Django to run, but I can't get it to server images using the
built-in
Hello Ian,
I have set permissions for all groups and users to read/write for the
entire project folder, including all enclosed items.
Thanks,
Brandon
On Feb 9, 12:48 pm, "Ian Lawrence" <[EMAIL PROTECTED]> wrote:
> Ola
> what are the permissions on the image file?
> regards
> ian
>
> --
> always
Python, and it appears to be working
normally.
But, still, no images :(
On Feb 9, 1:00 pm, Brandon Taylor <[EMAIL PROTECTED]> wrote:
> Hello Ian,
>
> I have set permissions for all groups and users to read/write for the
> entire project folder, including all enclosed items.
&
Hi everyone, I'm brand-new to Django, so please bear with me.
I have created an app called 'portfolio' within my project, and added it to
my installed apps in 'settings.py'
In my models.py, here are my class definitions:
from django.db import models
class WorkCategory(models.Model):
t
Hello,
Yes, I'm using MySQL 5 and Django .097 pre. Actually, I just went into
the introspection.py file and changed the first line to:
from django.db.backends.mysql.base import DatabaseOperations
...and we're good to go. I'm not sure why it would be that way in the
repository, but it seems to b
than Rails, which, till now, I didn't think could happen.
So, if anyone could give me some pointers on extending the admin, I
would be very grateful!
Kind regards,
Brandon Taylor
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the
Hello everyone,
Still fairly new to Django, but I'm loving it!
I have a base html template that I would like to display the current
year in. Where should I put the action that retrieves the current year
if I would like the value to appear on every page?
Thank you,
Brandon
--~--~-~--~---
Thanks!
On Mar 25, 10:24 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> If it is going to be in every page I would just use the now
> tag(http://www.djangoproject.com/documentation/templates/#now) in
> the base.html
>
> On Mar 25, 9:56 pm, Brandon T
Hello everyone,
I'm about to embark on a Django/Satchmo project and was interested to
hear your experiences with deploying this combination into a shared
environment.
Thanks,
Brandon
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the
Hi everyone,
Still wet behind the ears with Django, so please bear with me...
In my model, I have categories and items. Each item belongs to a
category. When I run the admin app, I can see my categories, and I can
see my products. I have visually verified that each item has a foreign
key for the
Sorry, that's my fault. I was trying to simplify the naming a bit for
the post. 'work_category' should just be 'category'
On Mar 28, 11:44 pm, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote:
> On 29-Mar-08, at 9:43 AM, Brandon Taylor wrote:
>
>
>
> >
'desc')
class Meta:
verbose_name_plural = 'Work Samples'
I thought I could probably loop through the work samples by saying:
{% for work_sample in work_category.work_samples %}{% endfor %}
But when I return the length of child records:
{{ work_categor
of a
'work_category' through the nested for loop, given my model structure?
On Mar 29, 12:18 am, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote:
> On 29-Mar-08, at 10:30 AM, Brandon Taylor wrote:
>
>
>
> > Sure. This app is for my portfolio. Here's my mod
my thinking way off for the way the
template system is designed? Thanks for your help, I really appreciate
your time.
On Mar 29, 12:43 am, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote:
> On 29-Mar-08, at 10:52 AM, Brandon Taylor wrote:
>
> > So, to simplify my question, how can
I already have my site built in Rails, and this is just a re-code in
Django. I've had really good luck with it until now :) You can see the
desired output (although the markup is different) at
http://www.btaylordesign.com/portfolio
On Mar 29, 12:47 am, Brandon Taylor <[EMAIL PROTECTED
Thank you SO much for helping Kenneth. I just had to change
'workcategory_set' to 'worksample_set' and it's all good. I never
would have found this in the documentation without knowing the '_set'
keyword, but for those of you who are interested, it's in the
documentation here: http://www.djangopro
Hi everyone,
I'm on shared hosting and can't modify any Apache settings. So, I'm
assuming I need to specify which settings file to use in .htaccess.
I have two projects on my server. The first one is working correctly,
the second is not. The problem with the second is that it seems to be
loading
Hi everyone,
I'm trying to build a simple search.
Here are the models in question:
class WorkCategory(models.Model):
title = models.CharField(max_length = 30)
position = models.PositiveSmallIntegerField()
def __unicode__(self):
return self.title
?
TIA,
Brandon
On Apr 9, 10:33 am, Rajesh Dhawan <[EMAIL PROTECTED]> wrote:
> On Apr 9, 11:20 am, Brandon Taylor <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hi everyone,
>
> > I'm trying to build a simple search.
>
> > Here are the models in
_icontains='whatever')
)
results = WorkSample.objects.select_related().filter(qset).distinct()
from the shell
On Apr 9, 11:17 am, Rajesh Dhawan <[EMAIL PROTECTED]> wrote:
> On Apr 9, 11:55 am, Brandon Taylor <[EMAIL PROTECTED]> wrote:
>
> > Hi Rajesh,
>
"print" it will return 0
results. If I use "Print" it will return all of the WorkSamples with
the category of "Print"
Thoughts?
Brandon
On Apr 9, 11:51 am, Rajesh Dhawan <[EMAIL PROTECTED]> wrote:
> On Apr 9, 12:44 pm, Brandon Taylor <[EMAIL PROTEC
I'm using MySQL 5, and it's using LIKE instead of ILIKE. I'll try
grabbing the latest from trunk and see how she goes, otherwise I might
switch to Postgres and file a ticket if the latest trunk doesn't
address this.
Thank you SO much for your help!
Brandon
On Apr 9, 1:10 pm, Rajesh Dhawan <[EMAI
27;t made any changes to the
database. I actually haven't even touched it directly, only through
the Python code in Django.
Thoughts?
Brandon
On Apr 9, 2:20 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote:
> On Wed, Apr 9, 2008 at 2:16 PM, Brandon Taylor <[EMAIL PROTECTED]
d NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8
COLLATE=utf8_bin;
I'm assuming the "COLLATE=utf8_bin" is what's causing the problem?
Thanks,
Brandon
On Apr 9, 3:14 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote:
>
my search
again. Thank you very much for helping! I really appreciate your time.
Brandon
On Apr 9, 3:54 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote:
> On Wed, Apr 9, 2008 at 4:35 PM, Brandon Taylor <[EMAIL PROTECTED]>
> wrote:
>
>
>
>
>
> > Here&
Hi Everyone,
Is there a way to define a catch-all route to send people to a 404
page? Obviously I need to define a route that matches anything not
previously defined, but am struggling with the RegEx to do so.
Help appreciated!
Brandon
--~--~-~--~~~---~--~~
You re
ropriate template.
>
> http://www.djangoproject.com/documentation/url_dispatch/#handler404
>
> On Fri, Apr 11, 2008 at 1:07 PM, Brandon Taylor <[EMAIL PROTECTED]> wrote:
>
> > Hi Everyone,
>
> > Is there a way to define a catch-all route to send people to a 404
Hello everyone,
I'm pretty new to Django, so please bear with me.
When I'm defining a model, and I want to return a value to use in the
admin for the information to be displayed as such:
from django.db import models
class Link(models.Model):
name = models.CharField()
url = models.CharF
Thanks! I was trying to use a + concatenator and it just wasn't happy.
Brandon
On Apr 14, 1:00 am, 1234 <[EMAIL PROTECTED]> wrote:
> add "self"
>
> 2008/4/14, Malcolm Tredinnick <[EMAIL PROTECTED]>:
>
>
>
> > On Sun, 2008-04-13 at 22:0
Hi everyone,
I'm sure there's a better way to do this in my settings.py file:
TEMPLATE_DIRS = (
os.path.join(os.path.dirname(__file__), 'pages',
'templates').replace('\\', '/'),
os.path.join(os.path.dirname(__file__), 'articles',
'templates').replace('\\', '/'),
os.path.join(os.path.
Thanks Jay!
On Apr 15, 4:56 pm, "Jay Parlar" <[EMAIL PROTECTED]> wrote:
> On 4/15/08, Brandon Taylor <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > Hi everyone,
>
> > I'm sure there's a better way to do this in my settings.py fi
Hello everyone,
Here are my models:
class Seminar(models.Model):
title = models.CharField(max_length=255)
display = models.BooleanField()
def __unicode__(self):
return self.title
class Admin:
ordering = ['title']
search_fields = ('title',)
class Met
Hello everyone,
Here is my urls.py:
from django.conf.urls.defaults import *
from django.views.generic import list_detail
from rdk.staff.models import *
groups = {
'queryset' :
Group.objects.all().select_related().order_by('name'),
'template_name' : 'staff.html',
}
employee
Hi Malcolm,
Everything's working. I'm still getting used to setting up routes in
Django, but overall I'm extremely impressed with this framework!
Thanks for your help,
Brandon
On Apr 18, 10:18 am, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Fri, 2008-04-18 at 08:
Hi everyone,
Coming from Rails, I've been naming my templates according to their
corresponding URLs. But, since Django's routing is RegEx based, I'm
sure there's a better way to do this:
urlpatterns = patterns('',
(r'^$', direct_to_template, {'template':'home.html'}),
(r'^contact/$', dir
:25 am, "Marty Alchin" <[EMAIL PROTECTED]> wrote:
> On Fri, Apr 18, 2008 at 12:17 PM, Brandon Taylor
>
> <[EMAIL PROTECTED]> wrote:
> > (r'?P[-\w]+/$', direct_to_template, {'template' : '%
> > (template)s.html'}),
>
> >
advise,
Brandon
On Apr 18, 1:34 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> Direct_to_template does not substitute the template var in to the
> template param, you will need to write a simple wrapper to do
> something like this.
>
> On Apr 18, 12:35 pm, Brandon
you
> need(specifically doing that simple substitution), and then have it
> return django.views.generic.simple.direct_to_template, remember views
> are just functions, if you need an example let me know and I will
> write one up.
>
> On Apr 18, 3:10 pm, Brandon Taylor <[EMAIL PROTE
Sorry, forgot to say that I have imported the view into urls.py
from rdk.pages.views import return_template
On Apr 18, 2:39 pm, Brandon Taylor <[EMAIL PROTECTED]> wrote:
> I understand the concept of that, but I'm having an issue with
> importing the view function into my urls.
> view's name, not actually calling it, and your wrapper function needs
> to take request, and pass it along to dire3ct_to_template
>
> On Apr 18, 3:51 pm, Brandon Taylor <[EMAIL PROTECTED]> wrote:
>
> > Sorry, forgot to say that I have imported the view into urls
In this case, I think I'll be fine, as the templates that would match
any of these patterns just contain public, static content, nothing
dynamic. However, I will definitely keep the code snippet for future
use!
Thank you to all who have replied, I really appreciate your help and
guidance as I get
Hi everyone,
I've noticed that when uploading images when running an app from
Windows, file paths are stored using backslashes:
images\my_image.jpg
when running on Mac, they are forward slashes:
images/my_image.jpg
I've seen where there is a hook into the save method on a model. I'm
assuming
Hi everyone,
In my urls.py, I'm matching: a slug from a foreign key / the year /
month / day / pk of the record as such:
from django.conf.urls.defaults import *
from rdk.training.views import *
urlpatterns = patterns('',
(r'^$', list_seminars),
(r'[
inar_occurrence),
)
fixed the problem. I simply added a caret to the beginning of the
second pattern. Hope this helps someone else.
Brandon
On Apr 19, 8:24 am, Brandon Taylor <[EMAIL PROTECTED]> wrote:
> Hi everyone,
>
> In my urls.py, I'm matching: a slug from a foreign key / t
Hi everyone,
I've got TinyMCE integrated into my admin, and is working great, but
when I output the HTML for the record into my template, the HTML tags
are being rendered as plain text, as in, all of the tags are visible.
What can I do to allow HTML stored in my database to render properly
in th
http://www.djangoproject.com/documentation/templates/#automatic-html-...
>
> > Hope that helps!
> > -Eric Florenzano
>
> > On Apr 24, 11:57 pm, Brandon Taylor <[EMAIL PROTECTED]> wrote:
>
> > > Hi everyone,
>
> > > I've got TinyMCE integrated
Hello everyone,
I'm doing a redirect after a form to a "thank you" page, which I would
like to personalize with some of the data from the form. I've tried
setting a session as such:
### views.py code
if form.is_valid():
first_name = form.cleaned_data['first_name']
request.session['first
ts after you add the
> variable to the session and right before you push the variable into
> the template, to see if it's making it through the redirect.
>
> If it is, then the issue is with your template, if it's not then the
> issue is with the session.
>
> Doug V
Hello everyone,
I must be missing the forest for the trees, because I simply can't see
what I'm doing wrong here!
#in views.py
def find_seminar_occurrence(request, slug, id):
occurrence = get_object_or_404(Occurrence, pk=id)
other_occurrences =
Occurrence.objects.filter(seminar=occurrenc
back out to the template, if it's not the way outlined in the
documentation...?
TIA,
Brandon
On Apr 30, 3:30 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote:
> On Wed, Apr 30, 2008 at 3:40 PM, Brandon Taylor <[EMAIL PROTECTED]>
> wrote:
>
>
>
>
>
>
I got it figured out. It wasn't anything to do with my session code at
all. It was my own fault, not matching the "thanks" view correctly.
I'm still getting used to matching routes with RegExes, but now I know
what to do next time.
Thanks,
Brandon
On Apr 30, 7:48 pm, Br
Hello everyone,
I'm setting up a dev environment on a co-worker's Mac running 10.5.2
I have Django cehcked out from trunk, and symlinked into Python 2.5.2.
I can successfully import Django from within a Python terminal
session.
I have django-admin.py symlinked from the trunk checkout to /usr/lo
. then symlink : sudo ln -sf /Library/Python/2.5/site-packages/django/
> > bin/django-admin.py /usr/local/bin/django-admin.py
>
> > it works. /usr/local/bin is already in your path.
>
> > Francis
>
> > On May 7, 6:46 pm, Brandon Taylor <[EMAIL PROTECTED]> wrote:
>
Hi everyone,
I want to add an integer field to a table callled "position" to do
ordering by. I would like the field to auto-increment based on the
count of objects.
I've tried overriding the save() method of the model, but this doesn't
seem to work with the admin.
Here's some simple test code f
Hi everyone,
I'm attempting to do some image validation. Here is my model:
from django.db import models
GROUP_CHOICES = (
('Home Page', 'Home Page'),
('Tenets Sidebar', 'Tenets Sidebar'),
)
class Image(models.Model):
group = models.CharField(max_length=20, cho
Specifically, I'd like to use this validation in the admin. Is the
best way to do this by overriding the save() method?
On May 12, 3:32 pm, Brandon Taylor <[EMAIL PROTECTED]> wrote:
> Hi everyone,
>
> I'm attempting to do some image validation. Here is my model:
>
&g
Hello everyone,
Does anyone have a good strategy for validating image and file
uploads? Like checking that images are the correct file type,
dimensions are within bounds, etc.
I see where we can override the save method on a model, but how would
we go about accessing properties of an uploaded fi
Hello everyone,
What's the process for incorporating the newforms admin? I'm currently
running trunk (0.97).
TIA,
Brandon
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group,
Hi everyone,
I've been using Django for awhile, but haven't had to customize the
admin, until now, and...I'm stuck.
Since newforms-admin is supposed to be more extensible, I'm running
the latest of that, and have defined a simple model:
from django.db import models
from django.contrib import ad
I saw this example in the documentation:
http://www.djangoproject.com/documentation/forms/#validators
But where does this code live? Does this go into my models.py as a
subclass of my Model, or is it a separate file?
Advice appreciated,
Brandon
On May 14, 6:28 pm, Brandon Taylor <[EM
May 15, 8:05 am, Pigletto <[EMAIL PROTECTED]> wrote:
> On 15 Maj, 03:43, Brandon Taylor <[EMAIL PROTECTED]> wrote:> I saw this
> example in the
> documentation:http://www.djangoproject.com/documentation/forms/#validators
>
> > But where does this code live? Doe
Anyone else receiving this error:
Invalid block tag: 'include_admin_script'
when loading the change form in newforms-admin?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group
Finally - someone pointing me to more than just the documentation.
Thank you!
I'll give that a shot and see where it takes me - along with
memorizing the documentation. I really appreciate you taking the time
to respond to my question. Django is just awesome. I fell in love with
Rails having done
Hi everyone,
I can't get the newforms admin to upload images. I have PIL and JPEG
support installed. My selftest on PIL reports that JPEG is supported,
along with PNG, but when I try to upload, I get:
Upload a valid image. The file you uploaded was either not an image or
a corrupted.
I can conf
mageField isn't as easy to get
> working as it should be :-/
>
> I think my problem may be OS X related and having to do with OS X's
> Apache and mod_python being 64 bit while my PIL is something else, but
> I need to verify that PIL is, in fact, 32 bit still.
>
> On Ma
Hi everyone,
I have a ManyToMany field on a model, and when I want to get the
related items and display them in a template in a for loop, the loop
executes the correct number of times, but in my output blocks there
are no values.
If I print the object, I get an array of values, same as any other
% endif %}
Thoughts?
On May 18, 5:56 pm, Brandon Taylor <[EMAIL PROTECTED]> wrote:
> Hi everyone,
>
> I have a ManyToMany field on a model, and when I want to get the
> related items and display them in a template in a for loop, the loop
> executes the correct number of t
Hi Austin,
I followed this tutorial to install JPEG support into PIL:
http://paul.annesley.cc/articles/2007/11/19/django-and-python-imaging-library-pil-on-leopard
Hope this helps,
Brandon
On May 18, 6:22 pm, Austin Govella <[EMAIL PROTECTED]> wrote:
> I used MacPorts to install jpeg (libjpeg),
own
sanity :)
Cheers,
Brandon
On May 18, 6:57 pm, Brandon Taylor <[EMAIL PROTECTED]> wrote:
> Here is my code:
>
> #in models.py
> class Instructor(models.Model):
> prefix = models.CharField(max_length=50, blank=True, null=True)
> first_name = models
Hi everyone,
I'm having a problem with an url pattern. When I try to do a custom
view using the newforms admin, such as:
(r'^admin/surveys/survey/answers/(?P[-\w]+)/$',
'app.surveys.views.answers_list'),
If I remove:
(r'^admin/(.*)', admin.site.root), #the default routing for newforms-
admin
OMG. I can't believe I missed the trailing slash when I set up the
get_absolute_url for the results page. I need sleep.
Thanks Karen,
Brandon
On May 22, 4:19 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote:
> On Thu, May 22, 2008 at 3:21 PM, Brandon Taylor <[EMAIL PROTEC
Hello everyone,
I have two Models: Member, Job
Member has two types: Staff, Board
Job needs to have a ManyToMany field for Member, so I can send emails
to those associated records.
So, what I'm trying to accomplish is to filter the list of Members
that are shown in the ManyToMany to include o
Hi Rajesh,
Thanks for pointing that out in the documentation, I wasn't aware of
that filter. However, I can't seem to get it to work.
I've tried specifying the values as:
staff_members_to_notify = models.ManyToManyField(Member,
limit_choices_to = {'member_type' : 'staff'})
and several other va
Hi,
Here is "Member"
MEMBER_TYPE_CHOICES = (
('staff','Staff'),
('board','Board'),
)
class Member(models.Model):
member_type = models.CharField(max_length=30,
choices=MEMBER_TYPE_CHOICES)
first_name = models.CharField(max_length=30)
midd
I switched out the code in the path into my newforms-admin install,
but it still doesn't want to work. Ugh! I'm going to try switching to
trunk on a different computer to see if it will work in trunk.
Any further thoughts before I move on a create a completely separate
model for Staff Members and
patch? Please excuse my ignorance if
that's a really stupid question, I have a knack for missing the
obvious :)
Thanks,
Brandon
On May 30, 3:00 pm, Rajesh Dhawan <[EMAIL PROTECTED]> wrote:
> On May 30, 3:54 pm, Brandon Taylor <[EMAIL PROTECTED]> wrote:
>
> > I switched
Ok, sorry, I'm a dork, I forgot how to run patches. I successfully
merged the first patch into my newforms-admin install, but it still
doesn't work.
On May 30, 3:16 pm, Brandon Taylor <[EMAIL PROTECTED]> wrote:
> I manually copied and pasted the code from the patch into
&
and contribute back if I can.
Thanks again for the help!
Kind regards,
Brandon
On May 30, 3:47 pm, Rajesh Dhawan <[EMAIL PROTECTED]> wrote:
> On May 30, 4:28 pm, Brandon Taylor <[EMAIL PROTECTED]> wrote:
>
> > Ok, sorry, I'm a dork, I forgot how to run patches.
Hi everyone,
I have a feedback form which needs to be functional across 3 different
actions within the same view...
My actions are:
references_list
reference_detail
thanks
Here's my current form processing code:
if request.method == 'POST':
form = SuggestionForm(request.POS
.py
>
> def processemail(email, reference_name):
> subject = 'Your suggestion has been received.'
> message = "Thank you for suggesting %s to us. We'll review
> your suggestion and get back to you as quickly as possible." %
> (reference
pm, "Richard Dahl" <[EMAIL PROTECTED]> wrote:
> OK I *think* I see what is wrong:
> You are returning the redirect from within the 'process_form' function, but
> not assigning it to anything or further processing it. SO, the process form
> returns a redirect, which is pr
ion, or the views (and sometimes within the
> models). I have a tendency to write pretty complex views (and model
> functions) for processing asynchronous stuff to limit the complexity of my
> javascript, but that is primarily because I am far more comfortable with
> python than JS
Hello everyone,
I have a navigation list powered by a model in my base site template.
So, I need to create a queryset object that will be available to every
view.
What's the best way to go about this? Obviously I don't want to have
to pass the queryset into the context of every action, in every
Hi Bobby,
Typically what I do is set the value from the session into a variable
that I pass into the context.
#in views.py
def my_action(request)
account_num = request.session['AccountNum']
return render_to_response('the_template.html', {'account_num' :
account_num})
#in the_template.ht
!
Kind regards,
Brandon
On Jun 27, 6:14 pm, "James Bennett" <[EMAIL PROTECTED]> wrote:
> On Fri, Jun 27, 2008 at 4:27 PM, Brandon Taylor <[EMAIL PROTECTED]> wrote:
> > What's the best way to go about this? Obviously I don't want to have
> > to pas
Hi everyone,
I have Events and Occurrences of an Event. Occurrence contains a
foreign_key for the Event.
In my template, I need to display the Event and Occurrences as such:
Event Title One
June 1, 2008 [times]
July 23, 2008 [times]
Event Title Two
August 25, 2008 [times]
Septem
ch works, but is this the best way this can be handled? I'm still
relatively new to Django, and I can't help but think this can be
handled at the Database API level in some way that I'm overlooking.
Thoughts? Advice greatly appreciated.
On Jul 1, 11:51 am, Brandon Taylor <[EMAIL P
rrence_set.all). ALL means EVERY
> > occurence associated with that event object. You haven't done
> > anything to filter out occurrences based on date in that step.
>
> > -Brian
>
> > On Jul 1, 9:51 am, Brandon Taylor <[EMAIL PROTECTED]> wrote:
&
Hi everyone,
According to: http://www.djangoproject.com/documentation/url_dispatch/
I'm supposed to be able to use {% url url-name parameter(s) %}, to de-
couple models form URLs.
Here's a snippet from my template:
{% for group in groups %}
{{ group.name }}
{% endfor %}
#in urls.py
urlpatt
OMG. I definitely need more sleep!
Many thanks,
Brandon
On Jul 9, 3:20 pm, "Norman Harman" <[EMAIL PROTECTED]> wrote:
> Brandon Taylor wrote:
> > url(r'^(?P[w-]+)/$', 'my_site.groups.views.show_group',
>
> That regex matches one or more w
Hi everyone,
I'm working on a custom form widget to input length values in feet,
inches and a fraction of an inch. So far, everything is working as
expected, except for validation.
It takes a value input as:
1' 10 1/2" and converts it into inches: 22.5, for storage in a
database.
My widget combi
201 - 298 of 298 matches
Mail list logo