On May 29, 2009, at 5:40 AM, Kevin Fullerton wrote:
>
>
> On Thu, May 28, 2009 14:31, Eric Abrahamsen wrote:
>>
>> The default comment form does not include a next parameter, so if you
>> don't override the builtin comment templates you won't get any next
>> parameters in the forms. The most su
I think not using a form in itself is not a problem, it's more a way
of organising your code which would let you add all the user
interaction in forms. And actually, you could still do it even without
a POST method. You have request.GET or request.REQUEST to store the
passed variables.
To get the
On Sat, May 30, 2009 at 11:21 PM, Joshua Partogi wrote:
> Dear all,
>
> I'd like to create fixture that has relationship to other object. Let's say
> I have a Member object that has foreign key to Country.
>
> class Member(User):
>country = models.ForeignKey(Country)
>
> I created the fixtures
Thanks Gabriel. I think it would be good if the tutorial included a
three-level hierarchy sowing how to handle the url.py and views.py for
the third layer. Anyway, I now understandone step more.
Thanks and regards
On May 31, 11:46 am, Gabriel wrote:
> adelaide_mike escribió:
>
> > urlpatterns
Dear all,
I'd like to create fixture that has relationship to other object. Let's say
I have a Member object that has foreign key to Country.
class Member(User):
country = models.ForeignKey(Country)
I created the fixtures member.json and define it as such:
[
{
"model": "member.Member",
adelaide_mike escribió:
> urlpatterns = patterns('whasite.wha.views',
>
> (r'^address/{{street.id}}/(?P\d+)/$', 'select_event'),
> (r'^address/(?P\d+)/$', 'select_property'),
> (r'^address/$', 'select_street'),
> (r'^$', 'address'),
> )
(r'^address/(?P\d+)/(?P\d+)/$', 's
I have model classes Suburb, Street ,Property and Event.
Each has a name , a foreign key to the model above, and the id
provided by default. In the admin everything is fine.
The template address.html has a search field and returns a startswith
query that generates streets.
Clicking a line in t
Write a method is_modified in your Post model.
You can use datetime.timedelta to compare dates.
def is_modified(self):
second = datetime.timedelta(seconds=1)
delta = self.last_modified - self.created
return delta >= second
Then use it in your template :
{% if post.is_modified %}
{{ ...
Hi,
Let's say I have the following post model:
class Post(models.Model):
text = models.TextField()
created = models.DateTimeField(auto_now=False, auto_now_add=True)
last_modified = models.DateTimeField(auto_now=True,
auto_now_add=False)
I want to display the last_modifi
The source code for the form generator is now on github at:
http://github.com/wimfeijen/trumpet_form_generator
- Wim
On May 30, 7:29 pm, Wim Feijen wrote:
> Hello,
>
> Several clients asked me whether they could have a form on their
> website, which displays like this:
>
> Description of field
Should have check those docs, sorry. Next time I'll make sure I've
checked it all. Thanks for you help.
W dniu 30 maja 2009 15:43 użytkownik Ramiro Morales napisał:
>
> 2009/5/30 Filip Gruszczyński :
>>
>> I am building a library for Django that provides some abstract views
>> (I am using classe
Hello,
Several clients asked me whether they could have a form on their
website, which displays like this:
Description of field 1
Title: (input field)
help_text
Description of field 2
Title2: (input field2)
help_text2
etc.
I was wondering whether this is a common case and I like to poll you:
Thanks Kenneth. I'll check out the link and use better subject lines
in the future...unless you want to send a donation!
On May 30, 1:38 am, Kenneth Gonsalves wrote:
> On Saturday 30 May 2009 12:47:27 Andy wrote:
>
> > I would like to set the order_number in my model to be equal to the
> > auto
Hello!
This is impossible to redirect a user to external site with post.
urllib and urllib2 can only help to fetch data, but not to redirect a
user.
So if you do not use ssl, you have to use hidden fields where you
should specify id and pin.
You can make payments much secure using hash algorithm
I have three drop down select boxes, which I have to expand for web
visibility reasons with the size='' option. If I select one from each
box I receive no errors, but if I leave one or more boxes without a
selection I receive an error.
{% for pathology in pathology_list %}
{{ pathology
Hello Derek,
The grantstartdt field has a date format, the Year field (drop down)
is a list of years in format, but the field is character. I need
to parse the from the date field to match the of the Year
value. When I changed the code as you suggested I received this
error:
da
2009/5/30 Filip Gruszczyński :
>
> I am building a library for Django that provides some abstract views
> (I am using classes instead of functions), that can be used subclassed
> and used in any app. I would like to be able to test those views, so I
> subclass them during testing and would like to
julianb wrote:
> On Aug 22, 4:32 pm, acreek wrote:
>> I just have not figured out the correct way to pass along the coupons
>> that are a part of the Flyer model. Can anyone give me a hint on how
>> to go about this properly?
>
> Here's how I'd do it:
> http://dpaste.com/hold/73229/
>
> Now you
ydjango wrote:
> I have two django based websites and I want show pages from one
> website in another. Is Iframe the best way to do it or is there some
> other better. I read somewhere that Iframes should be avoided but
> never got any good reasons why?
You should rely on syndicated high-level da
Kevin Fullerton wrote:
> I'm working with django.contrib.comments at the moment, and so far most
> things are working as expected.
>
> I'm building the submission form using {% get_comment_form for object as
> form %} and have added the following as part of the form
>
>
>
> As I understand it, th
I am building a library for Django that provides some abstract views
(I am using classes instead of functions), that can be used subclassed
and used in any app. I would like to be able to test those views, so I
subclass them during testing and would like to be able to attach them
to some url, so t
On Saturday 30 May 2009 17:23:01 Kenneth Gonsalves wrote:
> this problem may not be django related at all, but maybe someone here could
> tell me how to debug it.
>
> I have a VPS on Gandi with several .90 django sites and some running on
> latest trunk. I had set up virtualenv to run the sites on
hi,
this problem may not be django related at all, but maybe someone here could
tell me how to debug it.
I have a VPS on Gandi with several .90 django sites and some running on latest
trunk. I had set up virtualenv to run the sites on trunk. The sites on trunk
run perfectly. The .90 sites als
On Saturday 30 May 2009 12:47:27 Andy wrote:
> I would like to set the order_number in my model to be equal to the
> automatically assigned ID plus 10,000. Can anybody tell me how to
> achieve this?
check out commit=False in this document:
http://docs.djangoproject.com/en/dev/topics/forms/modelf
Hello,
I am new to Django and Python but am determined to learn. I am
creating a page that asks for some user input. My model looks like
this:
from django.db import models
from django.forms import ModelForm
floor_plan_choices = (
('A', 'Square'),
('B', 'Rectangular'),
25 matches
Mail list logo