my model:
class claimdoc(meta.Model):
description = meta.CharField(maxlength=30,core = True)
claim = meta.ForeignKey(Claim, edit_inline=meta.TABULAR,
num_in_admin = 3)
date = meta.DateField('Date Submitted')
name = meta.FileField(upload_to="claims/docs")
# Claim is another model
# Do a post-after-redirect so that reload works, etc.
return HttpResponseRedirect("/docs/%i/" % place.id) # just
corrected this claimdoc.id
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"D
I guess I am still new with databases so my question is regarding how I
should setup my models for a site where users can create accounts and
have their own private blogging areas.
In the past I always worked with flatfiles so every user had their own
folder on the filesystem and all of their dat
On Sun, 2006-04-09 at 14:19 +, Sandro wrote:
> I guess I am still new with databases so my question is regarding how I
> should setup my models for a site where users can create accounts and
> have their own private blogging areas.
>
> In the past I always worked with flatfiles so every user
> In the past I always worked with flatfiles so every user had their own
> folder on the filesystem and all of their data was within that folder.
> Does this mean that every user should have their own table to hold
> their blog posts or I should have one blog_post table and throw
> everyone's post
Thanks very much for your quick responses. I understand how the posts
table will interact with the user's table under a foreignkey, my main
concern was whether it would be better to have 1000's of records in one
table or 100's of records in multiple tables.
I am glad that you both pointed out th
I want to send email to users. The default charset is us-ascii, but I
need utf-8. How I see, there is SafeMIMEText class, where I can specify
the charset and other things, but I dont know how to use it. Can
someone give me a simple example.
--~--~-~--~~~---~--~~
Y
Hello,
I wonder if there's a bug when saving foreign keys through a
manipulator. Check the following lines:
# convert the request data into the appropriate Python types for those
fields
manipulator.do_html2python(new_data)
# save the new object
manipulator.save(new_data)
do_html2python calls Fo
On Apr 8, 2006, at 11:19 PM, gaghiel wrote:
>
> Writing your first Django app, part 1
> http://www.djangoproject.com/documentation/tutorial1/
>
> Hi, after I run this command:
> python manage.py install polls
>
> I got:
> Error: polls couldn't be installed. Possible reasons:
> * The database is
Hi all,
I am working on a voting system based on a model with three classes,
Post (the thing people will be voting on), Vote (the vote itself) and
Person (the voter and the poster). I've put simplified version at the
end of this post.
To get all the posts, I use
posts = Post.objects.all()
in my v
Thanks, I found my sql server didn't set up well. Now the `manage.py
install polls' passed. :)
--~--~-~--~~~---~--~~
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@g
right now this is not possible.
there is, however, a patch in the ticket system #1541 (
http://code.djangoproject.com/ticket/1541 ) that will do it... ) sample
usage on the ticket...
cheers
--~--~-~--~~~---~--~~
You received this message because you are subscribe
Thanks, but how I see, this is for 0.91, but I use m-r version. Maybe
I'l try the python smtplib?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-use
Replying to your own posts is so uncool ;)
Here's something that works, I have no idea whether it's efficient or
not - any ideas?.
This code is in my views.py
Essentially what's happening is that I'm adding another attribute
called 'alreadyvoted' to each one of the 'posts'. This is then
availab
Now this is getting silly ;)
But, there is one thing I'd like to add. By adding the logic into the
view and adding a new attribute, 'alreadyvoted', to my existing model,
I've managed to make the template very light. This is very different
from the sort of thing you would do in Zope (using PageTem
James wrote:
> Carlos,
>
> I have django running on my bluehost account with fcgi. The best notes
> on how to get things running I have found are here:
>
> http://wiki.dreamhost.com/index.php/Django
>
> Bluehost is setup pretty much the same as dreamhost. I recommend
> Bluehost for the price
Ok, really last post...
There's a problem with my code, voter.id is not right, voter.voter_id
is correct.
def alreadyvoted(post, voterid):
voters = post.vote_set.all()
print "len(voters)", len(voters)
for voter in voters:
print "voter:", post, voter.id, vo
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Thank you for your help.
I was able to load the index page of the only application I developed of
my project using apache, but I needed to change some urls. I haven't
yet understand this process completely. So I ask you for some 'light'.
I have th
I understand Django doesn't support database views
(http://en.wikipedia.org/wiki/View_%28database%29) right out of the
box, but I was wondering if there's a reasonably easy way to implement
(or at least emulate) them. Here's an illustration of a possible API
(compatible to the magic-removal DB API
19 matches
Mail list logo