and entered
but i don't know if you can do this with a model based form or if you
have to manually create it.
On 27 July, 12:35, Daniel Roseman <dan...@roseman.org.uk> wrote:
> On Jul 27, 12:15 am, AKK <andrewkenyon...@gmail.com> wrote:
>
> > Hi, I have a form based on a model w
Is there a way to do this or should i create my own form manually?
Andrew
On Jul 27, 12:15 am, AKK <andrewkenyon...@gmail.com> wrote:
> Hi, I have a form based on a model which allows users to add comment.
> A comment is made up of the comment is about, the body, the date and
>
Hi, I have a form based on a model which allows users to add comment.
A comment is made up of the comment is about, the body, the date and
time and also who made the comment.
I am mainly interested in the datetime and user fields. What i would
like to know is how i can automatically have these
Thank you, got it working
On 21 July, 16:55, Daniel Roseman <dan...@roseman.org.uk> wrote:
> On Jul 21, 4:25 pm, AKK <andrewkenyon...@gmail.com> wrote:
>
>
>
> > Thanks, i tried this:
>
> > blog_posts = Post.objects.filter(post_slug=slug)
> &g
Thanks, i tried this:
blog_posts = Post.objects.filter(post_slug=slug)
blog_comments = blog_posts.comment_set.all()
but i got this error and i don't know why:
Traceback:
File "C:\ProgLangs\Python25\lib\site-packages\django\core\handlers
\base.py" in get_response
86. response
Do i need to have a one to many or many to many field for this to
work?
Thanks
Andrew
On 20 July, 22:24, AKK <andrewkenyon...@gmail.com> wrote:
> Hello, i currently have two classes in my model:
>
> class Post(models.Model):
> prepopulated_fields = {"p
Hello, i currently have two classes in my model:
class Post(models.Model):
prepopulated_fields = {"post_slug": ("post_title",)}
post_title = models.CharField(max_length=750)
post_slug = models.SlugField()
def __unicode__(self):
return
Thanks, this is what i wanted.
On 20 July, 20:02, Alex Gaynor <alex.gay...@gmail.com> wrote:
> On Mon, Jul 20, 2009 at 2:00 PM, AKK<andrewkenyon...@gmail.com> wrote:
>
> > I kinda know what the problem is here but don't know how to fix it.
>
> > I have this
I kinda know what the problem is here but don't know how to fix it.
I have this model class Comment(models.Model):
comment_post = models.ForeignKey('Post')
comment_date = models.DateTimeField('Date comment made')
comment_body = models.TextField()
comment_spam =
Hi, i have a login form using the generic view like so:
(r'^accounts/login/$', 'django.contrib.auth.views.login',
{'template_name': 'blogSite/login.html'}),
but i only want the form to show up if your not logged in, but since
its is a generic view how can i use
if not
hi,
i have a form like this:
User name:
Password:
and the next field is where the user should be redirected assuming
they have the correct details.
When they login i want them to be redirected to myurl.com/blog/ but
what i have above redirects them to
I'm still abit confused.
Does that mean this part in the book is wrong?:
def search(request):
if 'q' in request.GET:
message = 'You searched for: %r' % request.GET['q']
else:
message = 'You submitted an empty form.'
return HttpResponse(message)
I also tried what you
Hi,
I'm working through chapter 7 of the djangobook online. and i've got
the following:
def search(request):
if 'criteria' in request.GET:
message = 'You searched for: %r' % request.GET['criteria']
else:
message = 'You submitted an empty form.'
return
Thanks, thats worked fine. I don't know why my original message has
reproduced itself.
Regards,
Andrew
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to
Hi,
I've got the django adming setup but if i look at posts for example i
just get a with post object loads of times. How can i it so it
displays the post title?
In my admin.py i have:
admin.site.register(Post)
and the model is:
post_title = models.CharField(max_length=750)
.
Hi,
I've got the django adming setup but if i look at posts for example i
just get a with post object loads of times. How can i it so it
displays the post title?
In my admin.py i have:
admin.site.register(Post)
and the model is:
post_title = models.CharField(max_length=750)
.
Hello,
I have a number of views and templates and a list of categories which
i get from my models using:
categories_list = categories.objects.all()
Since i need to display this in multiple (but not all) templates is
there a better way to achieve this than just putting; categories_list
=
d improperly. Can you post the code from
> your setting.py file where you specify your processors? Not just the
> strings, but the entire Python structure where you define those.
>
> On Mar 1, 7:51 am, AKK <andrewkenyon...@gmail.com> wrote:
>
> > Having loo
Having looked at the traceback i gather its something to do with the
imports:
Environment:
Request Method: GET
Request URL: http://localhost:8080/
Django Version: 1.0.2 final
Python Version: 2.5.2
Installed Applications:
['django.contrib.auth',
'django.contrib.contenttypes',
Thank you. I had forgotten the context instance part but now i've
added that as below:
"render_to_response('blogSite/index.html', locals(),
context_instance=RequestContext(request))"
and i get:
Exception Type: ValueError
Exception Value: Empty module name
but if i take out
Actually i thought i have but i haven't, i added:
TEMPLATE_CONTEXT_PROCESSORS = (
"django.core.context_processors.media"
)
to my settings.py (it didn't seem to be in there by default, i don't
know if thats supposed to be the case).
Then when it didn't work i tried creating a simple
Managed to get it working. Thanks for the help.
Andrew
On 28 Feb, 00:36, Malcolm Tredinnick <malc...@pointy-stick.com> wrote:
> On Fri, 2009-02-27 at 11:53 -0800, AKK wrote:
> > Sorry I must mean the media url. Are the media_root and the media_url
> >
Sorry I must mean the media url. Are the media_root and the media_url
automatically linked? In my settings.py i have:
C:/Program Files/Apache2.2/myproject/
media/ as the root &
http://localhost:8080/akonline/media/
as the url
and i have an image (imgs/img.jpg) in my
Hi,
I have a template and I want to get some images out of my media root.
I was wondering is there anyway to automatically return the media root
from settings.py rather than manually specifying it rather each time.
Thanks
Andrew
--~--~-~--~~~---~--~~
You
Thanks a lot. I guess, I was not reading it well.
On Jul 24, 4:55 pm, "James Bennett" <[EMAIL PROTECTED]> wrote:
> On 7/24/07, akk <[EMAIL PROTECTED]> wrote:
>
> > Traceback (most recent call last):
> > File "", line 1, in
> > File &q
File "", line 1, in
File "/usr/lib/python2.5/site-packages/django/db/models/base.py",
line 40, in __new__
model_module = sys.modules[new_class.__module__]
KeyError: '__console__'
Thanks a lot,
akk
--~--~-~--~~~---~--~~
You received this
26 matches
Mail list logo