Javier Guerra wrote:
> On Thu, Jul 9, 2009 at 5:52 PM, Randy Barlow wrote:
>> sjtirtha declared:
>>> class Media(Document):
>>>link =
>>>type =
>>>class Meta:
>>>abstract = True
>>>
>>> class Image(Media):
>>> size = .
>> You should know that this will generat
Hi,
how does your view looks like?
why you're unable to set initial data for the form?
Radovan
firebug wrote:
>
>
> Hi,
>
> I want to limit the choice of ChoiceField to a predefined value, if
> the value from POST does not exist in given choices. How this could be
> done easily? I don't wa
SOLVED. It was a wrong URL mapping, in the frontend, that I was not
seing, and the stack trace didn't give me a clue of where it was...
but thanks, anyway...
Diogo
On Jul 9, 3:35 am, diogobaeder wrote:
> I searched for this kind of error in this group, but there were only
> old posts, from when
On Fri, 2009-07-10 at 07:58 +0800, Russell Keith-Magee wrote:
> On Fri, Jul 10, 2009 at 3:23 AM, J. Cliff Dyer wrote:
> >
> > I'm trying to get my django site under tests. I've started testing my
> > pages using Client('url/to/my/page'), but I noticed that each test takes
> > about a second to ru
Sorry for digging up this thread but I fell off the list a bit and
just checked back today.
I really like the Pyjamas jsonprc implementation. In fact, I like it
so much I've gone ahead and modified a few things to do the SMD
generation and service URL resolution. However, I have a problem with
yes, if you'll need example let me know, it'll be scrap of my code but i'll
try to explain how it works.
Radovan
Sonal Breed wrote:
>
>
> Hi all, and R,
> Was able to achieve this using request.POST.getlist("CheckBoxName")
> and assigning value of primary key to checkbox. So when selected,
>
I took Alex's idea. It works great.
Thanks.
--~--~-~--~~~---~--~~
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 group, sen
On Thursday 09 July 2009 03:30:18 pm Chris Moffitt wrote:
> How is this different from the built in phone2numeric filter?
> http://docs.djangoproject.com/en/dev/ref/templates/builtins/#phone2numeric
The tel filter creates the well-formed tel: hyperlink automatically. So where
as {{"800-COLLECT"
thanks, indeed you are right.
Now to find out how bad I can break things by moving that behavior to
the other template.
On Jul 9, 5:34 pm, Karen Tracey wrote:
> On Thu, Jul 9, 2009 at 6:22 PM, Some Guy wrote:
>
> > I've found the following in the template ...
>
> > {% for result in results %}
You will need to adjust the LOGIN_URL (and possibly
LOGIN_REDIRECT_URL) setting in your settings file. One way to do this
would be to add a separate settings file for production if you don't
already have one. The production settings file can then have the
appropriate value for LOGIN_URL, say somet
This problem was logged as a bug and closed without fixing because the
development team thought it was not worthwhile.
See Jacob K-M's comment at the bottom for an explanation why.
http://code.djangoproject.com/ticket/8906
On Jun 3, 10:30 pm, "eric.frederich" wrote:
> So the person in IT that r
On Thu, Jul 9, 2009 at 6:22 PM, Some Guy wrote:
>
> I've found the following in the template ...
>
> {% for result in results %}
> {% for item in result %}
> {{ item }}{% endfor %}
> {% endfor %}
>
> I would like to apply an additional template tag to {{item}}, i.e.
> {{item|default_if_none:"" }}
settings.py
LOGOUT_URL=""
2009/7/9 Mr. T :
>
> In the tutorial it is simply '/accounts/login'
>
> This worked fine until I switched to a production apache server. My
> login_required decorators were broken because the path is absolute,
> login_required doesn't use the apache prefix.
>
> What to
As Randy Barlow said you cannot have the same column name in Document and
Media. If you change the name, two tables Document and Image will be
created with Media columns in Image and Document has its only Columns.
Media refers to Document.
Cheers,
Kalyan Lanka
On Thu, Jul 9, 2009 at 6:15 PM, sjt
Having great success with django_inlnes
http://github.com/mintchaos/django_inlines/
and am able to pass in and process custom arguments just fine. But
can't solve an issue I've hit: If an argument includes any kind of
punctuation marks, the inline template fails to render. For example,
in:
{{ jw
On Thu, Jul 9, 2009 at 4:44 PM, TechnicalBard wrote:
>
> Have discovered what works - but it goes against the docs...
>
> I needed to set User.is_active = True. The permissions for admin
> (has_perm) appears to check this flag and returns False for inactive
> users.
>
> Problem solved.
>
What d
On Fri, Jul 10, 2009 at 3:23 AM, J. Cliff Dyer wrote:
>
> I'm trying to get my django site under tests. I've started testing my
> pages using Client('url/to/my/page'), but I noticed that each test takes
> about a second to run (just to get a response code for the page--very
> basic tests).
Are y
On Thu, Jul 9, 2009 at 1:50 PM, jai_python wrote:
>
> Hie I am using formset for edit details belonging to a particular
> ticket. But when I used the below function , I am getting error as
> follows.
>
> Models
> ---
> class Ticket(models.Model):
>ticket_id = models.AutoFi
On Thu, Jul 9, 2009 at 12:01 PM, Michael Stevens wrote:
>
> Hi.
>
> I'm trying to use a model formset.
>
> I've successfully got it rendering data from the database and showing
> it on a form to edit, but I'm now trying to recreate the data in save.
>
> So I've got:
>FooFormset = modelform
Awesome. I'll see what I can do with these.
--~--~-~--~~~---~--~~
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 group, sen
On Thu, Jul 9, 2009 at 5:52 PM, Randy Barlow wrote:
> sjtirtha declared:
>> class Media(Document):
>> link =
>> type =
>> class Meta:
>> abstract = True
>>
>> class Image(Media):
>> size = .
>
> You should know that this will generate three DB tables. The media a
This question applies to any other JavaScript validation tool, but I'm doing
an app that uses dojo, and i'm trying to put client-side validation smartly,
but obviously not achieving it :)
Is there any way to add extra fields to the form's HTML created by ModelForm
??
I'm specially concerned about
I'm trying to construct a query which combines two filters on a
related model, and I'm having no luck. Hopefully somebody can see what
I'm doing wrong, and point me in the right direction.
I'd like to be able to specify two exclude criteria on a related
model, and have both criteria apply to the
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
sjtirtha declared:
> Hi,
>
> I'm new in Django and now I'm already facing the issue with Model
> Inheritance.
> Here is my imagination, how the model should like
>
> class Document(models.Model):
>name = ...
>type =
>
>
> class Medi
Django-chunks appears to be the perfect solution to my problem. Thanks
Daniel! Thanks to you too Eugine for your response.
On Jul 10, 2:19 am, Daniel Roseman wrote:
> On Jul 9, 8:47 am, "paul.dorman" wrote:
>
>
>
> > Hi all,
>
> > I'd like to include blocks of content in my templates which is
>
On Thu, Jul 9, 2009 at 8:54 AM, James PIC wrote:
>
> Hi,
>
> Apparently, this was not triggered by class names, but by verbose_name
> length:
>
> INSERT INTO "auth_permission" ("name", "content_type_id", "codename")
> VALUES (%s, %s, %s) (u"Can change cat\xe9gorie d'immobilier
> d'entreprise (LCP
On Thu, Jul 9, 2009 at 8:50 AM, Francisco Rivas wrote:
>
> Hi all, I am getting some information from a DB and some of the vaules
> of a field contains information like this :
>
> Sam\xfael J\xf3n Gunnarsson which must be Samúel Jón Gunnarsson
>
> and I get that information and pass it to a view
How is this different from the built in phone2numeric filter?
http://docs.djangoproject.com/en/dev/ref/templates/builtins/#phone2numeric
-Chris
On Thu, Jul 9, 2009 at 5:27 PM, Aaron Maxwell wrote:
>
> Hi everyone.
>
> I've put up a django application providing a template filter, "tel", that
>
Javier Guerra wrote:
>
> write a column template:
> ---
> {% [f]or article in col_articles %}
>{{article}}
> {% endfor %}
> ---
>
> and call it three times, with a different col_articles
That's still breaking the DRY principle. :) Alex got it right.
Regards,
Friðrik Már
--~--~-
Hi everyone.
I've put up a django application providing a template filter, "tel", that
helps format telephone URLs. This is helpful when writing mobile-optimized
web sites, or other contexts you want "click-to-call" to work.
For example, you can say something like this in your template:
{{{
I've found the following in the template ...
{% for result in results %}
{% for item in result %}
{{ item }}{% endfor %}
{% endfor %}
I would like to apply an additional template tag to {{item}}, i.e.
{{item|default_if_none:"" }}
I have discovered that in this template {{ item }} is already wra
Hi,
I see that in Django I'm able to define a model inheritance, which
later will be also applied to generate the DB tables by using Multi-
Table Inheritance. This will result 2 database tables, from super
class and subclass. This is good from design perspective.
But how about here the performan
Hi,
I'm new in Django and now I'm already facing the issue with Model
Inheritance.
Here is my imagination, how the model should like
class Document(models.Model):
name = ...
type =
class Media(Document):
link =
type =
class Meta:
abstract = True
class Im
On Thu, Jul 9, 2009 at 3:29 PM, Wiiboy wrote:
>
> Hi,
> On the homepage of my website, I have three columns of articles from
> users. I can't quite figure out how to make those three columns
> without violating DRY. Now, I have a dictionary of lists, with each
> list being the list of articles fo
On Thu, Jul 9, 2009 at 4:49 PM, Wiiboy wrote:
>
> The columns are actually categories. The left column is sports, etc.
> So I can't make it a grid like that.
>
If each column is a discrete category, why not just filter the
object/model by category for each column? You're not really repeating
yo
On Thu, Jul 9, 2009 at 4:49 PM, Wiiboy wrote:
>
> The columns are actually categories. The left column is sports, etc.
> So I can't make it a grid like that.
>
> I don't quite see how the paginator helps.
> >
>
Why not just make it a list of tuples, so
[('left', [list_of_left cats]), ('right',
The columns are actually categories. The left column is sports, etc.
So I can't make it a grid like that.
I don't quite see how the paginator helps.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" gro
I don't know the answer to your specific question but you could make a
feedburner RSS from it. Then you can insert adsense for feeds on it
with just a click on adsense settings (it's all integrated.)
On Jul 8, 9:35 pm, Alessandro Ronchi
wrote:
> I need to put an HTML code in my feeds, but if I p
Hi,
I'd like to add an onkeyup event on a form field. I've defined the following
in
my form:
contest = forms.CharField(max_length=100,
widget=forms.TextInput(attrs={"onkeyup" :
"lookup(this.value,'id_contest');",} )
)
This comes out
On Jul 9, 4:29 pm, Wiiboy wrote:
> Hi,
> On the homepage of my website, I have three columns of articles from
> users. I can't quite figure out how to make those three columns
> without violating DRY. Now, I have a dictionary of lists, with each
> list being the list of articles for one column
On Thu, Jul 9, 2009 at 3:30 PM, Javier Guerra wrote:
> maybe is it possible to use signals like this? i haven't checked the
> source, but it seems plausible to have them dispatched _after_ the
> request is serviced.
no, it doesn't work like that. also, it seems that a custom
middleware wouldn't
Have discovered what works - but it goes against the docs...
I needed to set User.is_active = True. The permissions for admin
(has_perm) appears to check this flag and returns False for inactive
users.
Problem solved.
On Jul 9, 10:15 am, TechnicalBard wrote:
> Alas - that doesn't make a diffe
On Thu, Jul 9, 2009 at 3:19 PM, Fluoborate wrote:
>
> Hello All,
>
> I am afraid that I might have to write my own middleware to do this. I
> really want to do something like the following:
>
> #In views.py:
>
> def welcome( request ):
> return HttpResponse( "Welcome to my website" )
> #No c
Hi,
On the homepage of my website, I have three columns of articles from
users. I can't quite figure out how to make those three columns
without violating DRY. Now, I have a dictionary of lists, with each
list being the list of articles for one column. I then loop through
the lists. Example:
Hi,
>if SHA1_RE.search(activation_key):
>try:
>profile = self.get(activation_key=activation_key)
>except self.model.DoesNotExist:
>return False
>if not profile.activation_key_expired():
>user = profile.us
Hello All,
I am afraid that I might have to write my own middleware to do this. I
really want to do something like the following:
#In views.py:
def welcome( request ):
return HttpResponse( "Welcome to my website" )
#No code after the 'return' statement will ever be executed, but I
wish
Hi all, and R,
Was able to achieve this using request.POST.getlist("CheckBoxName")
and assigning value of primary key to checkbox. So when selected,
the particular DB entry is deleted.
Thanks a lot for your help.
Sonal
On Jul 8, 10:23 pm, urukay wrote:
> Sonal,
>
> i used Ajax, posted dict with
On Thu, Jul 9, 2009 at 1:38 PM, Keith Pettit wrote:
> I though there was something similar to doing a "pk = obj.save()" but I
> can't seem to find the right way to do it.
after doing the "obj.save()", the obj will have an "id" attribute.
--
Javier
--~--~-~--~~~---~
I tried that and still got no error or directory.
if SHA1_RE.search(activation_key):
try:
profile = self.get(activation_key=activation_key)
except self.model.DoesNotExist:
return False
if not profile.activation_key_expire
I'm trying to get my django site under tests. I've started testing my
pages using Client('url/to/my/page'), but I noticed that each test takes
about a second to run (just to get a response code for the page--very
basic tests).
First of all, it seems like the client go through all the usual
app
Hey Ben,
Thanks for your help. It worked, but it changed the entire format of
the screen. I don't know what's up next, but I'll find out shortly! :)
On Jun 30, 4:49 pm, Ben wrote:
> Hey this might be a question I can answer - I'm a NKOTB too.
>
> The easiest way is to modify the "title" and "br
I'm using inlineformset_factory to create a database entry with child
objects. All works well for submiting a recording then returning to a
record list. But I need a way to submit the new record then continue
editing the same document or reference it after submit.
I though there was something si
Is there any reason you can't create your own signal and put it in the
rounds save() method and then just call the parents save?
http://docs.djangoproject.com/en/dev/topics/signals/#defining-and-sending-signals
Cheers,
Ryan
On Jul 9, 6:12 am, Eugene Mirotin wrote:
> Hello!
>
> I have a tricky
Thanks so much for all the advice.. Yes, you are right, a lot of it
sounds like rubbish, and i'm just lost! Yes, I am going to finish up
the tutorial today, and read up on the documentation.
Thanks so much for your help. I will surely keep you updated on how
things go!
Much appreciated once agai
Hie I am using formset for edit details belonging to a particular
ticket. But when I used the below function , I am getting error as
follows.
Models
---
class Ticket(models.Model):
ticket_id = models.AutoField("ID", primary_key=True)
title = models.CharField("Ticket ti
Hi Divesh,
> I have this model that I want to design on Django. I have already
> created the mysql side of it, and the mysql database is ready. Also, i
> have loaded mysqldb and i think it works.
It sounds like you've created something with MySQL and imported it to
a database that's used by Dj
>Don't know if i understand you right, but you have to create two models
(Species 1 & 2). And then you write a view, that will do the searching
according parameters (Tolerance, pagination, species 1&2)
So I have to create something like the website above on Django. Was
just wondering if there was
Hmm I didn't change any imports as far as i am aware.
By full traceback do you mean the entirety of the error in the error
log?
Such as:
[Thu Jul 09 16:24:08 2009] [error] [client 192.168.2.20] mod_python
(pid=26734, interpreter='ccprod.arrowt.co.uk', phase='PythonHandler',
handler='django.core
Alas - that doesn't make a difference...
On Jul 8, 4:29 pm, Frédéric Hébert wrote:
> Hi,
>
> Maybe, should you put is_staff=True :
>
> http://docs.djangoproject.com/en/dev/topics/auth/#users
>
> Regards,
>
> Frédéric
>
> 2009/7/8 Technicalbard :
>
>
>
>
>
>
>
> > I'm trying to write an Active
Hi.
I'm trying to use a model formset.
I've successfully got it rendering data from the database and showing
it on a form to edit, but I'm now trying to recreate the data in save.
So I've got:
FooFormset = modelformset_factory(Foo exclude = ['id', 'foo'])
foo_formset = FooFormse
Hey!
A full traceback could be helpful.
A lot of time when you've got really strange import errors they have
something to do with circular imports. Did you change any imports
right before or after the upgrade?
Regards,
Friðrik Már
On Jul 9, 2009, at 3:25 PM, huw_at1 wrote:
>
> Hi all,
>
>
Hi all,
I have just been moving my website to a production server and am
having some difficulty getting it working. I have upgraded the Django
from 1.0 on my development server to 1.1 on the production server.
When I try to access the admin pages I get an Internal Server Error
and a message in th
On Thu, Jul 9, 2009 at 10:31 PM, Thierry wrote:
>
> Hi,
>
> The "webdesign" django.contrib add-on [1] currently implements only 1
> templatetag, supposed to help web designers. I think Django could
> benefit from built-in elements that could be useful to web developpers
> too, out of the box.
>
>
Hi,
The "webdesign" django.contrib add-on [1] currently implements only 1
templatetag, supposed to help web designers. I think Django could
benefit from built-in elements that could be useful to web developpers
too, out of the box.
Some disorganized ideas that lead me to write this message:
* Wh
On Jul 9, 8:47 am, "paul.dorman" wrote:
> Hi all,
>
> I'd like to include blocks of content in my templates which is
> editable in the Admin app. I'd design the overall template, but
> include bits that the computer illiterate folks here could change,
> something like this:
>
> [my template]
>
>
Hi,
I want to limit the choice of ChoiceField to a predefined value, if
the value from POST does not exist in given choices. How this could be
done easily? I don't want to modify the POST-dictionary before it is
passed to the form instance, because I would have to write same code
all over the pla
It did the job. Thanks!
On Jul 9, 3:51 pm, Jonathan Buchanan
wrote:
> 2009/7/9 Viktor Semykin :
>
>
>
> > Hi everyone.
>
> > I'm trying to generate slugs automatically and disallow user to
> > interfere with this. I think way to go is something like:
>
> > class Entry(Model):
> > title=CharF
Hi,
Apparently, this was not triggered by class names, but by verbose_name length:
INSERT INTO "auth_permission" ("name", "content_type_id", "codename")
VALUES (%s, %s, %s) (u"Can change cat\xe9gorie d'immobilier
d'entreprise (LCP)", 44, u'change_categoriedelcp')
Traceback (most recent call last
2009/7/9 Viktor Semykin :
>
> Hi everyone.
>
> I'm trying to generate slugs automatically and disallow user to
> interfere with this. I think way to go is something like:
>
> class Entry(Model):
> title=CharField(max_length=100)
> slug=SlugField(default=slugify(...title...))
>
> but I have
Hi all, I am getting some information from a DB and some of the vaules
of a field contains information like this :
Sam\xfael J\xf3n Gunnarsson which must be Samúel Jón Gunnarsson
and I get that information and pass it to a view which creates a XML
file ut by some reason those values are not disp
> Why not to add dots to your regexp? For example, [\w\d\-\.]+ ?
That's the problem, it doesn't work.
I guess my question should have been: How come \. doesn't appear to be
matched in url.py?
--~--~-~--~~~---~--~~
You received this message because you are subs
Why not to add dots to your regexp? For example, [\w\d\-\.]+ ?
On Jul 9, 3:36 pm, Dids wrote:
> Hi,
>
> I'm struggling to get the regex right in my urls.py file to match a
> url with a dot inside it. (think ip address).
>
> for exmaple :
> http://servername/Url.With.Dot
>
> I'm not even
Hi everyone.
I'm trying to generate slugs automatically and disallow user to
interfere with this. I think way to go is something like:
class Entry(Model):
title=CharField(max_length=100)
slug=SlugField(default=slugify(...title...))
but I have no idea how to pass title field (or at lea
Hi,
I'm struggling to get the regex right in my urls.py file to match a
url with a dot inside it. (think ip address).
for exmaple :
http://servername/Url.With.Dot
I'm not even sure it can be done so before I loose the rest of my hair
on it, I thought I'd better ask.
Anyone of you had
I just made a post about this on django-developers. The problem is in
psycopg2 creating the query's SQL before it knows the postgresql
version. So, the query is executed without "returning id", but
psycopg2 expects the returning id to be there when in gets the
results... -> problem.
Anssi Kääriäi
Hi again,
I think I got it... I had "TransactionMiddleware" enabled and
'autocommit' set to True... When I deleted 'autocommit' exception is
gone.
Regards,
Szymon
On 9 Lip, 13:35, Szymon wrote:
> Hi,
>
> I'm lost. Maybe someone here will help me:
>
> Model:
>
> class obrazki(models.Model):
>
>
Question: A web hosting company doesn't necessarily offer a command
line tool to create folders and execute scripts on a shared web
server.
Is it possible to make your way without it to install django on a
public server?
Cheers.
Robert
--~--~-~--~~~---~--~~
You r
Hi,
I'm lost. Maybe someone here will help me:
Model:
class obrazki(models.Model):
obrazek = models.ImageField(upload_to="upload/%y/%m/%d/")
slug = models.SlugField(max_length=200)
tytul = models.CharField(max_length=100)
tagi = TagField(null=True)
data = models.DateTimeFie
Sorry for flooding.
It's an interesting behaviour of django: If I'm adding user
(user,password,confirm password) and press 'Save and continue editing'
it creates user(!) , but then nothing happens(I expect something like
a large form with email etc.) Maybe something with templates?
--~--~-
Ok, dropped database and recreated it using syncdb, added superuser.
The same thing - can't edit users :((
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to dja
I'm superuser ...
--~--~-~--~~~---~--~~
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 group, send email to
django-users+un
On Thursday 09 Jul 2009 4:24:19 pm alecs wrote:
> I'm able to add groups and edit groups, sites, can add user(user&pass)
> but can't change it.
did you by any chance delete the 'change user' permission?
--
regards
kg
http://lawgon.livejournal.com
--~--~-~--~~~---~--~
I'm able to add groups and edit groups, sites, can add user(user&pass)
but can't change it.
--~--~-~--~~~---~--~~
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@googl
error.log is clear... neither happens in firebug ...
--~--~-~--~~~---~--~~
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 gr
On Thursday 09 Jul 2009 3:43:03 pm alecs wrote:
> Hi! Can you help me with admin web ui: I'm on page
> http://172.16.23.33/admin/auth/user/ and I can't change user details - when
> I click on user nothing
> happens. Though I'm able to add user ...
>
> access.log of my apache
error log would be mo
Hi! Can you help me with admin web ui: I'm on page
http://172.16.23.33/admin/auth/user/
and I can't change user details - when I click on user nothing
happens. Though I'm able to add user ...
access.log of my apache
tail -f access.log
172.16.23.33 - - [09/Jul/2009:13:00:12 +0300] "GET /admin/au
Hello!
I have a tricky (as seems to me :) problem.
Consider I have 2 simply related models - a Game and a Round (with FK
to Game). Each has some generic fields like name and description.
Also, the Round has the ordering field (called number) (oh, I can
imagine your sighs =)
They are edited on th
Define the model that includes:
* (some) Foreign key to the page the block belongs to (so, most
probably you'll have to define the model for the site page)
* the text field for the block contents
Register this model in the admin, which will generate the form with 2
fields - drop-down select (for t
Hi all,
I'd like to include blocks of content in my templates which is
editable in the Admin app. I'd design the overall template, but
include bits that the computer illiterate folks here could change,
something like this:
[my template]
[a form which is included in the template]
[a block of con
update:
I get the same error with the latest stable Django. Error originates
from the call to pickle:
pickle.dumps(form)
On 9 jul, 08:51, yuccaplant wrote:
> Hi all,
>
> When I try to put a form in session, I get pickle error:
>
> Can't pickle : it's not
> found as django.utils.functional.__
90 matches
Mail list logo