Wow, this is exactly what I'm looking for. I'm gonna try this app soon. Thanks!
--Tirta
-Original Message-
From: Malcolm Tredinnick
Date: Mon, 22 Dec 2008 15:26:42
To:
Subject: Re: Language code prefix in url
On Sun,
On 22 Dic, 02:17, Malcolm Tredinnick wrote:
> Certainly a bit unexpected. Can you paste the relevant lines from your
> URL Conf file, please?
>
> Regards,
> Malcolm
Sure :)
here it is:
url(r'foglio/(?P[0-9]+)/$', views.show_worksheet,
name='show_worksheet'),
Thanks
Thanks for the in depth feedback about what is going on with the
order.
Also thanks for the code snippet. I ended up doing something very
similar.
On Dec 21, 8:16 pm, Malcolm Tredinnick
wrote:
> On Sun, 2008-12-21 at 08:58 -0800, Raisins wrote:
> > i = [ 1, 5,2,6]
> >
On Dec 22, 4:49 am, "Greg Schwimer" wrote:
> On Sun, Dec 21, 2008 at 1:47 PM, Daniel Roseman <
>
> roseman.dan...@googlemail.com> wrote:
>
> > You won't see errors because you haven't included them in your
> > template. Either render the whole form with {{ form.as_p }} - which
On Dec 22, 5:20 am, eldonp2 wrote:
> Please help me understand the execution logic of a view. I have copied
> the example from the official Django documentation:
>
> def contact(request):
> if request.method == 'POST': # If the form has been submitted...
> form =
Thanks!
On Dec 22, 10:16 am, Malcolm Tredinnick
wrote:
> On Sun, 2008-12-21 at 23:07 -0800, sunn wrote:
>
> [...]
>
> > I would like to order my Block objects by first page.sortorder and
> > then sortorder. Any idea on how to accomplish this?
> > I have tried with
On Sun, 2008-12-21 at 23:07 -0800, sunn wrote:
[...]
> I would like to order my Block objects by first page.sortorder and
> then sortorder. Any idea on how to accomplish this?
> I have tried with ordering = ['page.sortorder', 'sortorder'] but this
> does not work ("ordering" refers to
from django.db import models
class Page(models.Model):
sortorder = models.IntegerField()
parent = models.ForeignKey('self', null=True, blank=True)
class Meta:
ordering = ['sortorder']
def __unicode__(self):
return self.display
class Block(models.Model):
Hi there. I'm not looking for a fully definite answer here
necessarily, but I am searching for input on the best way to attack
this problem. Here it is, somewhat abstracted so that you don't have
to wrap your head around my problem domain:
Let's say I've got two models -
Please help me understand the execution logic of a view. I have copied
the example from the official Django documentation:
def contact(request):
if request.method == 'POST': # If the form has been submitted...
form = ContactForm(request.POST) # A form bound to the POST
data
On Sun, 2008-12-21 at 21:46 -0700, Greg Schwimer wrote:
> OK, that was very helpful, thank you. Yes, my problem is because I am
> not setting the date. Thinking it through, I don't want the user
> changing this, so it would be helpful to use the auto_now_add idea you
> suggested. However, I
On Sun, Dec 21, 2008 at 1:47 PM, Daniel Roseman <
roseman.dan...@googlemail.com> wrote:
>
>
> You won't see errors because you haven't included them in your
> template. Either render the whole form with {{ form.as_p }} - which
> will render the errors as well - or for each field include a
OK, that was very helpful, thank you. Yes, my problem is because I am not
setting the date. Thinking it through, I don't want the user changing
this, so it would be helpful to use the auto_now_add idea you suggested.
However, I can't get that working. Here's my mode; definition for pub_date:
I have three ImageField in my form and model, I want to know how to
upload the three image files in the form processing code. I found
Django Admin page handles the image file upload nicely. And I want to
do the exactly same work. But I can not find the piece of code that
does the job when
On Sun, 2008-12-21 at 19:52 -0800, Tirta K. Untario wrote:
> Hi all, I'm new to Django, and trying to port my old site to Django for
> practice purpose.
>
> Different from Django multilingual implementation by using cookie, I want to
> add lang code to every url, i.e:
>
>
On Sun, 2008-12-21 at 19:57 -0800, iruns...@gmail.com wrote:
> Hi,
>
> I am new in Django and I am wondering if it is possible to access to a
> form field value in through a template.
>
> I know that I can access to the field by {{field}} and also can access
> to the field.label, errors,
> From: Tirta K. Untario
> Subject: Language code prefix in url
>
> /en/my_app/something_here/1/2/3/4/
> /de/my_app/something_here/1/2/3/4/
> /fr/my_app/something_here/1/2/3/4/
My suggestion would be to look at e.g. Apache's URL rewriting rules.
Take those URLs and produce
Hi all, I'm new to Django, and trying to port my old site to Django for
practice purpose.
Different from Django multilingual implementation by using cookie, I want to
add lang code to every url, i.e:
/en/my_app/something_here/1/2/3/4/
/de/my_app/something_here/1/2/3/4/
Hi,
I am new in Django and I am wondering if it is possible to access to a
form field value in through a template.
I know that I can access to the field by {{field}} and also can access
to the field.label, errors, label_tag, but I would like to access to
the intial value of a field.
Suppose I
On Sun, 2008-12-21 at 18:50 -0800, George Sakkis wrote:
> Hi all,
>
> I have a situation which I think would best be modeled as (single)
> inheritance, involving product reviews for various kinds of products.
> Naturally, there are some fields which are common to all reviews
> (overall rating,
Hi all,
I have a situation which I think would best be modeled as (single)
inheritance, involving product reviews for various kinds of products.
Naturally, there are some fields which are common to all reviews
(overall rating, user, review date) and some which are specific to the
type of
Hello:
Using tiny_mce.js into django Admin (change_form.html) is nice, but
when you include into a textField letters such as á or ñ and try to
find them using the django search engine, no results are obtained
because internally the á is represented by and ñ is
represented by Is there a way to
On Sun, 2008-12-21 at 13:18 -0800, stormlifter wrote:
> Well that kind of dodges the question.
> I two am looking for a way to mix and match a ModelForm
No, it doesn't dodge the question (although, because you top-posted, the
response was hidden: the suggestion was to use two form objects).
On Sun, 2008-12-21 at 11:40 -0800, Kaaia wrote:
> Hi,
>
> I am very new in django (and python) so my question may be quite
> dummy, so be patient please. I am playing with example based on
> django's tutorial.
>
> I have following class:
>
> class Pilot(models.Model):
> ...
> cn =
On Sun, 2008-12-21 at 11:45 -0800, patrick91 wrote:
> Hi, I've a problem with the url tag, when I call this template:
> Visualizza
> I get this error:
> Caught an exception while rendering: Reverse for
> 'catsnc.show_worksheet' with arguments '(5537,)' and keyword arguments
> '{}' not found.
>
>
On Sun, 2008-12-21 at 08:58 -0800, Raisins wrote:
> i = [ 1, 5,2,6]
> Model.objects.filter(id__in = i)
>
> This currently will order them by id, even if i call order_by() with
> no parameters. The docs say "If you don't want any ordering to be
> applied to a query, not even the default
On Sun, 2008-12-21 at 16:41 -0800, Vizcayno wrote:
> Hello:
> Using tiny_mce.js into django Admin (change_form.html) is nice, but
> when you include into a textField letters such as á or ñ and try to
> find them using the django search engine, no results are obtained
> because internally the á is
From: Ben Pritchard
Subject: A Top-Level Django Index for the root URL
The intention is that this page will list all my of sandbox
projects. So at the moment it just links to http://localhost:8000/polls
but (a) coding the link seems like a HTML solution
Thanks
On Dec 20, 11:26 am, Jeff FW wrote:
> Looking
> athttp://code.djangoproject.com/browser/django/trunk/django/contrib/aut...
> it doesn't look like it clears the session. It *does* generate a new
> key, but that shouldn't affect anything. It should only take you
>
>From what I can tell your not wrapping the thumbnail file in
ContentFile your just returning the raw file from the string IO. To
use the the ImageField django provides you must provide it with a file
that is in a special wrapper called ContentFile. I would suggest
trying this:
from
Well that kind of dodges the question.
I two am looking for a way to mix and match a ModelForm
I've got...
# Create your models here.
class PersonForm(ModelForm):
class Meta:
model = Person
exclude = ('address',)
class AddressForm(ModelForm):
class Meta:
model =
> I see from the traceback that the problem is occurring in
> validate_unique. There were various bugs in the validation of unique
> elements in forms in version 1.0, which were mainly fixed in version
> 1.0.2. Try downloading that version instead and see if that fixes your
> problem.
Exactly!
On Dec 21, 7:02 am, schwim wrote:
> OK, I'm a total newbie. I ran through the tutorial on the django site,
> and decided to extend the poll system a bit just to learn more. I
> figured quite a bit out, but on this one I'm stuck.
>
> I want to provide a page at polls/new to
On Dec 21, 7:40 pm, Kaaia wrote:
> Hi,
>
> I am very new in django (and python) so my question may be quite
> dummy, so be patient please. I am playing with example based on
> django's tutorial.
>
> I have following class:
>
> class Pilot(models.Model):
> ...
>
On Sun, Dec 21, 2008 at 8:00 PM, Sahil R Cooner wrote:
> You don't have to store anything in the database you can just use the models
> to store
> information then return that the user is authenticated...I can post a code
> example for you I
> have made using ldap auth
Hi,
I am very new in django (and python) so my question may be quite
dummy, so be patient please. I am playing with example based on
django's tutorial.
I have following class:
class Pilot(models.Model):
...
cn = models.CharField('Soutěžní znak', max_length = 3, primary_key
= True)
Hello everyone,
First, a warning: I'm a total noob but I have really enjoyed working
through the tutorial.
The first post-tutorial thing I've done is construct a top-level page
that gets rendered using:
urlpatterns = patterns('',
(r'^$', 'mysite.views.index'),
This was necessary
Thank you Karen :)
My python install had some weird patches. Now everything works
absolutely fine :)
Thanks again :)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send
Did it!
Thanks a bunch.
On Dec 21, 8:16 pm, Bradley Wright wrote:
> Request isn't ending up in the context, try installing:
>
> http://docs.djangoproject.com/en/dev/ref/templates/api/#django-core-c...
>
> It's not enabled by default, and you need it to make request
Hi, I've a problem with the url tag, when I call this template:
Visualizza
I get this error:
Caught an exception while rendering: Reverse for
'catsnc.show_worksheet' with arguments '(5537,)' and keyword arguments
'{}' not found.
But when I call this code from the shell:
>>> from
Oh shit, that's awesome! Thanks! I thought it had already created the
DB and wanted me to fill in that info... I'm so stupid sometimes.
Thanks a bunch mrtot...
On Dec 21, 3:50 am, mrtot wrote:
> Hi Chris,
>
> maybe it's the best to just do what the error message suggest:
>
>
Request isn't ending up in the context, try installing:
http://docs.djangoproject.com/en/dev/ref/templates/api/#django-core-context-processors-request
It's not enabled by default, and you need it to make request available
in templates.
--~--~-~--~~~---~--~~
You
Hey guys,
I want to check the user's user agent string in a template tag, but
when I try to use the request variable in the template I get a Caught
an exception while rendering: Failed lookup for key [request] error
message.
I'm using the generic list_detail templates, is there anything special
I have the same issue, but my issue is that Django is interfacing with
a web service and ideally will have *no user database* on the front
end. All the examples I've seen involve essentially copying the user
from LDAP/wherever and sticking them in the User model, which:
a) Is duplication across
Cheers, I was just doing something stupid then. :)
--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this
Hi schwim,
Welcome to Django! Glad to have you. ;-)
You probably receive the same page again because there were errors in
the form, most probably because you didn't include all the fields
required (as you suspect). To see specifically what errors there
were, please refer to:
Before I can write validation of uploaded images, I first need to know
how to save multiple upload images in view. Can anyone share some code
or reference on this? Thanks.
On Dec 20, 10:31 pm, Brandon Taylor wrote:
> Hi,
>
> You can do validation on images by using a
Hi Friends...
I know this is a not a right place to ask this question.
but it is related to Python. I thought it to ask.
Is there any python library is available to read a pdf files... ?
Or any library to convert the pdf into text files?
If you have any idea about above issues
please
Thanks to Graham and Jeff.
I moved my code out of the document root and used the proper alias to
tell Apache where to find Django's admin.media files.
Problem solved ?
MS
> For mod_wsgi see:
>
> http://code.google.com/p/modwsgi/wiki/IntegrationWithDjango
>
i = [ 1, 5,2,6]
Model.objects.filter(id__in = i)
This currently will order them by id, even if i call order_by() with
no parameters. The docs say "If you don't want any ordering to be
applied to a query, not even the default ordering, call order_by()
with no parameters."
Is there a way to
Errata, this email has correct sources, sorry for the pollution.
On Sun, Dec 21, 2008 at 4:46 PM, Mirat Can Bayrak
wrote:
>
> hi, i have a state selection which has options "exists", "not exists" and
> "redirected" when it is selected as exists i want to show some
On Sun, Dec 21, 2008 at 4:46 PM, Mirat Can Bayrak
wrote:
>
> hi, i have a state selection which has options "exists", "not exists" and
> "redirected" when it is selected as exists i want to show some more fields,
> but on other selections i dont want him to show them.
hi, i have a state selection which has options "exists", "not exists" and
"redirected" when it is selected as exists i want to show some more fields, but
on other selections i dont want him to show them. can i do that it django?
--
Mirat Can Bayrak
Hi Chris,
maybe it's the best to just do what the error message suggest:
"Please fill out DATABASE_NAME in the settings module before using the
database. "
Put in something like '/home/chris/projects/django-tutorial/db/db.db'
You can create your own name. Django just wants to know where it
Okay... I'm on part two of the tut now and I am attemping to use
Python's built-in SQLite Database just to get a feel for Django.
However, the tutorial confuses me in part one when it defines
DATABASE_NAME, "The name of your database. If you're using SQLite, the
database will be a file on your
Hi!
What is the best practice to deploy a Django application creating a user but
not installing the admin app. I want to deploy my app to clients cleanly
(like i.e "make install") and I need to create a user to be able to start
using the django app.
I think that a Django app is a bit complicated
Thanks Jeff - I've figured it out now... I'm new to Python - I'm 14...
Anyway, it's not the UNIX that was screwing me up, it's that I hadn't
installed Django properly - just dragged it into site-packages without
setting a symlink. Again, thanks for replying - no doubt I'll have
more questions for
OK, I'm a total newbie. I ran through the tutorial on the django site,
and decided to extend the poll system a bit just to learn more. I
figured quite a bit out, but on this one I'm stuck.
I want to provide a page at polls/new to add a new poll. I'm trying
to use the
Hi, I've been building a Django site using Lighttpd as a server for a
local sandbox. URLs that do not capture data to send to the view,
e.g.:
(r'^index$', 'Gallerie500.viewer.views.index'),
are working fine. However, galleries that are sending data in the
request, e.g.:
(r'^display/(\d)$',
No more input on this for a while so I tried various moving the
directories around.
My supposition is that it can't find the part of the distribution
containing the admin code.
vhost.conf (on a subdomain)
---
SetHandler python-program
PythonHandler django.core.handlers.modpython
Chris wrote:
> it says it can't find django-admin.py
I didn't see that for my most recent reply. Your problem is that
django-admin.py isn't on your PATH. Either put it in your PATH or run it
with a full path: /path/to/django-admin.py
If you're unfamiliar with this terminology, you need to read up
Chris wrote:
> No directory created in my cd, but I see you're working remotely, no?
> I'm trying to get it running on my Mac first before running it on a
> server or remote machine. Am I wrong? What I'd really appreciate is
> someone telling me EXACTLY what I need to do – every single aspect of
>
Bartek pisze:
> Hi all
> When I loop over sys.modules in templatetags/pobierz.py there's
> django.templatetags.photologue, so probably that's why "from
> photologue.models import Gallery" throws ImportException - there's not
> models in django.templatetags.photologue
>
> Anyway in sys.modules
No directory created in my cd, but I see you're working remotely, no?
I'm trying to get it running on my Mac first before running it on a
server or remote machine. Am I wrong? What I'd really appreciate is
someone telling me EXACTLY what I need to do – every single aspect of
installation,
64 matches
Mail list logo