I have a TextField() field that stores user entered text. However the
formatting is a bit weird, eg. new lines are lost when displaying that
field.
What is the best way to retain that formatting and also enable users
to format their inputs with either HTML tags or some rich text editors?
--
You
I probably should of tried it first. Your url setup works fine for me.
Kieran
On Dec 21, 5:10 pm, Kieran Brownlees wrote:
> My guess would be the root url never ends without a '/' - ie to match
> the root url you need a '/' somewhere.
>
> Try making the home_view regex r'^/$'
>
> Kieran
>
> On D
My guess would be the root url never ends without a '/' - ie to match
the root url you need a '/' somewhere.
Try making the home_view regex r'^/$'
Kieran
On Dec 21, 5:05 pm, Kegan Gan wrote:
> Anyone can shed some light to the matter?
>
> * Bring this post to the front.
>
> On Dec 18, 1:21 am,
Anyone can shed some light to the matter?
* Bring this post to the front.
On Dec 18, 1:21 am, Kegan Gan wrote:
> In myrooturls.py I have the following:
>
> urlpatterns = patterns('',
> (r'^', include('story.urls')),
> )
>
> In my story app, I have the following urls.py:
>
> urlpatterns = pat
Hello All,
In http://code.djangoproject.com/browser/django/trunk/django/forms/models.py
line 53 it states:
53 # OneToOneField doesn't allow assignment of None. Guard
against that
54 # instead of allowing it and throwing an error.
55 if isinstance(f, models.O
hi,
the documentation for use_for_related_fields states that it shouldn't
be used for filtering results:
http://docs.djangoproject.com/en/dev/topics/db/managers/#do-not-filter-away-any-results-in-this-type-of-manager-subclass
i just wanted to know if this advice should always be followed (or
when
If the about page is static, you probably don't need any models for
it. A simple template should do, or you could use flat pages if you
want your client to be able to edit it easily on their own.
http://docs.djangoproject.com/en/dev/ref/contrib/flatpages/
The contacts page probably just needs a Co
Dear Daniel,
Thanks for your quick response. As you suggested i applied the code to
the forms.py http://dpaste.com/135885/ Though it fails on line 25
self.fields["url"].queryset = Image.objects.values_list('image') with
a KeyError. Does this suggest a failure in line 20 because to my
knowledge the
Sorry I couldn't finish it all... Here's the complete post:
http://pastebin.com/f36abac82
--
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...@googlegroups.com.
To unsubscribe from this group, send em
Problem plot:
I get no data (blog entries) when querying the monthly and daily
archive, making use of the date based generic views from Django 1.1.
Can you see the problem?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group,
>
> look this link http://sseetharaman.wordpress.com/2009/10/21/django-pyamf/
>
> --
>
> 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...@googlegroups.com.
> To unsubscribe from this group, send ema
Thank you :) That was the only thing I didn't try :)
It works flawlessly :)
On Dec 20, 8:39 pm, rebus_ wrote:
> {% for a in p.gallery.all %}
> <--- TRY THIS
> {% endfor %}
>
> http://docs.djangoproject.com/en/dev/ref/files/file/#django.core.file...
--
You received this message because y
Hello,
I'd like to have translated week days in a bilingual (printed) form.
Since templates support only one language, I want to do that in Python
for now. I've looked at django.templates.defaultfilters.date and tried
the following in my views.py:
from django.utils.dateformat import format
Hello,
Those problems were caused because django-jython 1.0.X is meant to be
used with Django 1.0.
We released django-jython 1.1.0 a few days ago[1], and the major news
is that it works with Django 1.1.1. Feel free to give it a try and
help us with some feedback!
[1] http://blog.leosoto.com/2009
{% for a in p.gallery.all %}
<--- TRY THIS
{% endfor %}
http://docs.djangoproject.com/en/dev/ref/files/file/#django.core.files.File.url
--
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...@go
MODEL:
class PropertyGallery(models.Model):
link = models.ImageField(upload_to="gallery/props/")
class Property(models.Model):
name = models.CharField(max_length=200)
gallery=models.ManyToManyField(PropertyGallery)
---
Thanks for reply.
The main trouble for me is nearly how to do that "right" with the MVT
layer. I'm not really sure how to write models for such a small yet
compound structure.
How do I make, say, the first and second pages (about and contacs)
with some different fields? I will reproduce the metho
Well, Form.is_valid calculates the form and returns boolean, thats for sure.
Specifically, ">> from django import forms
>>>
>>> class F(forms.Form):
... name = forms.CharField()
...
>>> f = F()
>>> f.is_valid
>
>>> f.is_valid()
False
>>> f = F({'name': 'Lukasz'})
>>> f.is_valid()
True
You ge
On Sun, Dec 20, 2009 at 8:17 AM, BobAalsma wrote:
> I'm following the The Django Book 2.0, trying to learn Django.
> I'm on Apple OS X10.5.8, Python 2.5.1.
> I have looked at FAQ, mailing lists, etc. but did not find any
> situation looking like this.
>
> Question:
> although all other parts seem
I'm following the The Django Book 2.0, trying to learn Django.
I'm on Apple OS X10.5.8, Python 2.5.1.
I have looked at FAQ, mailing lists, etc. but did not find any
situation looking like this.
Question:
although all other parts seem to work as described in the book,
the .is_valid returns an unexp
On Dec 20, 4:26 am, GoSantoni wrote:
> Found this (old)
> posthttp://oebfare.com/blog/2008/feb/23/changing-modelchoicefield-queryset/
>
> So i tried
>
> class Post(models.Model):
> blog = models.ForeignKey(blog)
> .
> url = models.ModelChoiceField
> (queryset=Image.obj
On Sun, Dec 20, 2009 at 12:22 PM, Todd Blanchard wrote:
> I think what i actually want is a form set, but I don't find that all that
> well done either.
I would like to point out that so far, you haven't actually told us
what your problem *is*. You've asked how Django does something that
Rails ca
Just one word: wow!
Yes, definitely I'm gonna dig into it :)
On Dec 20, 2:34 am, Ethan Jucovy wrote:
> Lately I have really liked using custom template tags for these sorts of
> queries.
>
> Once you get the hang of writing them, it's very quick to build a little
> library of queries in custom t
23 matches
Mail list logo