Hello,
I want to connect User to Userprofile. When I create new user, the
Userprofile can't automatically add new user.
Should I need to write create Userprofile on view?
Why the ForeignKey can't automatically add?
My model as below:
class Userprofile(models.Model):
user = models.ForeignK
Thank you all!
I don't see the line
"New in Django Development version."
On Dec 27, 10:44 pm, Tsung-Hsien wrote:
> Hi,
> I want to use {% elif %}
> my template:
> {% if bookmark.hours %}
>
Hi,
I want to use {% elif %}
my template:
{% if bookmark.hours %}
{{ bookmark.hours }} hours ago
{% elif bookmark.days %}
{{ bookmark.days }} days ago
{% elif book
Hi,
I refer the article,https://code.djangoproject.com/wiki/
AddWYSIWYGEditor, and create textareas.js to override default setting
of TinyMCE. the textarea shows new functions while creating the
textareas.js. However, when I submit the data, server can't save the
data.
if I don't override the setti
Hello
If I use register page to create user, the string of username and
email displays u'' on command line, and if I create user on
command line, the string of username and email display ''. the
difference is one has the 'u' and the other doesn't.
The important thing is:
When I want to fil
already set
> to UTF-8 (if applicable).
>
> 2011/12/5 Tsung-Hsien
>
>
>
>
>
>
>
>
>
> > Hello
> >I get the wrong message when type a string which needed to format
>
Hello
I get the wrong message when type a string which needed to format
such as
msgid "An inviatation was sent to %(email)s."
msgstr "邀請已送到%(email)s"
--
Incorrect string value: '\xE9\x82\x80\xE8\xAB\x8B...
I use comment of Django applicaition, and the comment page looks
anything good, but when I post the comment, there is no comment
displayed on the page without any problem showing.
the template code:
Comments
{% get_comment_count for bookmarks.sharedbookmark
shared_bookmark.id as c
I type wrong in view.py, causing the problem.
Have been solve this.
On Nov 20, 2:32 am, Tsung-Hsien wrote:
> The error does not show on Django, but firebug shows the error.
> I refer "Django 1.0 Web Site Development" and use the jQuery code
> below:
>
> function bookma
The error does not show on Django, but firebug shows the error.
I refer "Django 1.0 Web Site Development" and use the jQuery code
below:
function bookmark_save() {
var item = $(this).parent();
var data = {
url: item.find("#id_url").val(),
title: ite
I use Taggit to create a list of tags, and want to create unique tags
of the list.
I have a list as below
tags=[[], [], [], [],
[],[], [], []]
and write this
for i in range(0,len(tags)):
if tags[i] not in s:
s.append(tags[i])
However, the output s is same as tags.
s=[[],
I just change some style of css, but after runserver, the css is
nothing change.
I not only deleted the image file in the static folder, but deleted
whole static folder and the website still show the image and css.
only use in localhost, even doesn't deploy to server yet.
I don't know why that happ
Thanks your advice!
However,using {% if forloop.counter % 4 == 1 %} shows problem that
Exception Value:
Could not parse the remainder: '%' from '%'
Now, I refer
http://stackoverflow.com/questions/1438486/how-to-use-math-remainder-in-django-template
and change it to {%forloop.counter|add:"-1"|divis
I want to filter a loop when the number comes to 1,5,9,13,17...
I use this but fail
{% if forloop.counter |divisibleby range(1,100,4)%}{% endif %}
How to fix it, thanks a lot !!
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this gro
I have a photo page needed connecting each photo to different URL.
--
The URL as below:
url(r'^gallery/(?P\d+)/(?P\d+)/$', zoom_photo)
The view as below:
def zoom_photo(request, item_id, photo_id):
item = Item.objects.get(id=item_id)
I want to build a gallery which connects to different photo sets.
I have been completed the gallery main page, however, I meet two
problems:
1) Use title name of cover image as the URL of photo page, but if the
name include blank, then The URL is not complete. For example: the
cover image named sum
On Oct 6, 11:50 pm, kenneth gonsalves wrote:
> On Thu, 2011-10-06 at 23:31 -0700, Tsung-Hsien wrote:
> > class Item(models.Model):
> > name = models.CharField(max_length=250)
> > description = models.TextField()
>
> > class Meta:
> >
I write a model as below:
class Item(models.Model):
name = models.CharField(max_length=250)
description = models.TextField()
class Meta:
ordering = ["name"]
def __unicode__(self):
return self.name
class Photo(models.Model):
item = models.Forei
I want to put pictures on website and to let each row shows only four
pictures, but I write the template which shows each pictures in the
same row.
the loop within the , I think it should include and add if
syntax to do that.
How to write the syntax?
thanks!
{% load static %}
{% get_static_prefix
I've been done my admin interface with TinyMCE. However, aftering
editing, I see words with HTML tags update to my website.
What's a good way to solve this?
Thank you!
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, sen
Hi,
when I runserver on my localhost, CSS can load on the web site.
Before I deployed to GAE,
I only change the app.yaml setting:
- url: /media/admin
static_dir: django/contrib/admin/media
expiration: '0'
to
- url: /static
static_dir: static
expiration: '0'
After I deployed to GAE,
I
21 matches
Mail list logo