Not a prank, it was just what I thought..., it is always better to ask
than assume...thanks for confirmation that this is the best one
around.
On Feb 10, 2:08 am, Shawn Milochik wrote:
> On 02/09/2011 04:06 PM, SimpleDimple wrote:> Guys, Need to know which is the
> best
This is core material in terms of learning Django... you need to have
(at least) worked through the tutorials. Assuming you have done that,
you'll be in a position to attempt to write the code for this. If
that code is not working, post it here - along with the error traces
and expected output -
On 10/02/2011 6:19pm, Cal Leeming [Simplicity Media Ltd] wrote:
On Wed, Feb 9, 2011 at 4:38 PM, Dev@CB > wrote:
Well, the "python manage.py runserver" command returned a screen full
of errors. What would be the appropriate way to post
On Thu, Feb 10, 2011 at 7:52 AM, NavaTux wrote:
> Hi all,
> i have been using modelform in my site,Now i want to do filter
> the
> objects(only today generated) in the particular model(TAG) ,for that
> constraint
> TAGS has to be generated today only, because
Hello community,
I'm using a django version 1.3 beta 1 SVN-15481 and a mysql 5 backend
I have the following field definition in my model:
class Jtem(models.Model):
name=models.CharField(blank=True, null=True, max_length=255)
nachname=models.CharField(max_length=255)
Doing manage.py
On Wednesday, February 9, 2011 9:06:54 PM UTC, SimpleDimple wrote:
>
> Guys, Need to know which is the best forum/group for Django help ? I
> thought this is the one but I don't see much activity here despite of
> the fact that there are 19000+ members...where do you go for
> discussing your
On Thursday, February 10, 2011 10:19:49 AM UTC, Roman Klesel wrote:
>
> Hello community,
>
> I'm using a django version 1.3 beta 1 SVN-15481 and a mysql 5 backend
>
> I have the following field definition in my model:
>
> class Jtem(models.Model):
> name=models.CharField(blank=True, null=True,
On Thu, 2011-02-10 at 02:20 -0800, Daniel Roseman wrote:
> On Wednesday, February 9, 2011 9:06:54 PM UTC, SimpleDimple wrote:
> >
> > Guys, Need to know which is the best forum/group for Django help ?
> I
> > thought this is the one but I don't see much activity here despite
> of
> > the fact
Hallöchen!
My configuration: Apache + mod_wsgi + SVN Django. APPEND_SLASH is
off.
Currently, a URL like "http://www.example.com/super%2F/edit/; is
normalised to "http://www.example.com/super/edit/;. This is bad
because the entity to be edited is called "super/"(sic!) but this
way, you edit
Hi,
Is there a way to show (in the admin tool) certain fields only if other
fields are filled with certain values ?!
Example:
I've got a table named Product.
1 product can be a book, a magazine oder just a project.
If a Product is a Book i want to fill different fields than if it
I have a model (let's call it MyModel) with a ManyToManyField called
categories to another model (let's call it MyCategory). MyCategory has a
boolean field called locked that, when true, indicates that new
relationships from MyModel to MyCategory should be forbidden (but existing
ones should be
Here is the problem from terminal:
Traceback (most recent call last):
File "manage.py", line 11, in
execute_manager(settings)
File "/Library/Python/2.6/site-packages/django/core/management/
__init__.py", line 438, in execute_manager
utility.execute()
File
Almost every method of QuerySet clones it. Sometimes it is very
ineficcient, for example when querysets are constructed in loops. I
have a function, which makes about 20 queries, and its execution time
is about 100ms. After profiling the function, I saw that clone() takes
most of the time: 70ms.
I got models:
- Post (id, thread_id, text, pid)
- Thread (id, name, last_pid)
PID is the number of post in thread. So it needs to be unique to each
thread. Like:
Thread 1 : [1, 2, 3, 4, 5]
Thread 2 : [1, 2, 3, 4, 5, 6, 7]
And the "last_pid" field of thread is cache of pid of last post in
On Thu, 2011-02-10 at 01:29 -0800, silver.francis wrote:
> sqlite3.OperationalError: unable to open database file
>
> Can anyone help me with this
are there write permissions in the parent directory of the sqlite file?
--
regards
KG
http://lawgon.livejournal.com
Coimbatore LUG rox
On Thu, Feb 10, 2011 at 11:54 AM, Paul Bagwell wrote:
> I got models:
>
> - Post (id, thread_id, text, pid)
> - Thread (id, name, last_pid)
>
> PID is the number of post in thread. So it needs to be unique to each
> thread. Like:
> Thread 1 : [1, 2, 3, 4, 5]
> Thread 2 : [1, 2,
Model I've described is just an example.
In the real world, I'm developing imageboard (chan).
This is anonymous forum with sections. Each section needs to have its own post
counter. It is very typical for all modern chans (wakaba, kusaba etc.).
Wakaba just creates separate table for each
On Thu, Feb 10, 2011 at 12:39 PM, Paul Bagwell wrote:
> Model I've described is just an example.
> In the real world, I'm developing imageboard (chan).
> This is anonymous forum with sections. Each section needs to have its own
> post counter. It is very typical for all modern
Imageboard:
- When user creates new post, its counter is computed by (section_biggest + 1).
- When user deletes a post, nothing happens to section counter:
Post [id:55, pid:1] created
Post [id:71, pid:2] created
Post [id:71, pid:2] deleted
Post [id:89, pid:3] created
- Has separate counters for
Hello Daniel,
thanks for you reply
2011/2/10 Daniel Roseman :
>> >>> from test_django.roman.models import Jtem
>> >>> o=Jtem.objects.get(pk=29)
>> >>> o.name=''
>> >>> o.save()
>>
>> Now the record looks like this:
>>
>> mysql> select * from roman_jtem where id=29;
>>
Hallöchen!
Torsten Bronger writes:
> [...]
>
> Currently, a URL like "http://www.example.com/super%2F/edit/; is
> normalised to "http://www.example.com/super/edit/;. This is bad
> because the entity to be edited is called "super/"(sic!) but this
> way, you edit "super".
>
> [...]
>
> Somewhere
>> You explicitly set the field to an empty string,
>
> Yes, which evaluates to an equivalent of None or False in python, and
> with the above setting I've declared that None values should be
> allowed and should be stored as NULL in the database.
Python 2.6.5 (r265:79063, Apr 16 2010,
Your requirements sound slightly contradictory " display a new
screen ... while still keeping the existing screen". I assume you
want something like a pop-dialog box that you would get typically in a
desktop app. For this, you will need to use javascript. A javascript
library, such a jQuery,
Hi,
I want to assign the id of the user that is currently logged in to a
field of a model.
How do I do that ?!
Kind regards
. . . . . . . . . . . . . . . . . . . . . . . . . .
Patrick Szabo
XSLT-Entwickler
LexisNexis
Marxergasse 25, 1030 Wien
mailto:patrick.sz...@lexisnexis.at
Yeah, you'll definitely want to find some aggregate to do the sorting.
The only way to sort by a custom method is doing an in-python sort,
which is going to be much slower than having the db sort for you. If
you post the score models, we could probably help more.
Alex
On Feb 9, 8:49 am, "Casey
2011/2/10 :
'' == None
> False
yes, makes sense ... I was thinking of things like:
if '':
if []:
...
which probably lead me to a wrong conclusion.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this
It's been a while since I dealt with those things, but what about this
scenario:
The attacker detects the CSRF code using an attack resembling the
scenario here:
http://wiki.developerforce.com/index.php/Secure_Coding_Secure_Communications#Secure_Communications_and_Cookies
[to save some time,
On Thu, Feb 10, 2011 at 2:29 PM, Alex Robbins
wrote:
> Yeah, you'll definitely want to find some aggregate to do the sorting.
Ok, didn't know it. I'll take a look at it...
> The only way to sort by a custom method is doing an in-python sort,
> which is going to be
Set the field value to request.user.id.
--
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
On Thu, 10 Feb 2011 14:27:18 +0100, Roman Klesel
wrote:
> 2011/2/10 :
> '' == None
>> False
>
> yes, makes sense ... I was thinking of things like:
>
> if '':
> if []:
> ...
>
> which probably lead me to a wrong conclusion.
I apologize
Do you want the episode with the highest individual score, or the
highest average score?
Alex
On Thu, Feb 10, 2011 at 7:41 AM, Andres Lucena wrote:
> On Thu, Feb 10, 2011 at 2:29 PM, Alex Robbins
> wrote:
>> Yeah, you'll definitely want to
I don't have much experience with this, but it looks like a good use
case for signals and atomic counters using memcached.
Just my 2 cents
Jirka
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to
Might be a stupid question but do i have to import to do that !?
. . . . . . . . . . . . . . . . . . . . . . . . . .
Patrick Szabo
XSLT-Entwickler
LexisNexis
Marxergasse 25, 1030 Wien
mailto:patrick.sz...@lexisnexis.at
Tel.: +43 (1) 534 52 - 1573
Fax: +43 (1) 534 52 - 146
Thanks. I'll take a look at it.
On Feb 10, 7:15 am, Derek wrote:
> Your requirements sound slightly contradictory " display a new
> screen ... while still keeping the existing screen". I assume you
> want something like a pop-dialog box that you would get typically in a
>
If you have the contrib.auth and session middleware installed (which you do by
default) then that will be available in you views without any additional
imports.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send
I imorted from django.contrib.auth.models import User but when i do
Mitarbeiter = request.user.id
It tells me that NameError: name 'request' is not defined
What am i doing wrong ?!
. . . . . . . . . . . . . . . . . . . . . . . . . .
Patrick Szabo
XSLT-Entwickler
LexisNexis
Marxergasse 25,
2011/2/10 :
...
Thanks for the kind words. Your comments are very welcome!
--
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
Oh okay, so this only works for views ?!
Can't i use that in my models.py ?!
. . . . . . . . . . . . . . . . . . . . . . . . . .
Patrick Szabo
XSLT-Entwickler
LexisNexis
Marxergasse 25, 1030 Wien
mailto:patrick.sz...@lexisnexis.at
Tel.: +43 (1) 534 52 - 1573
Fax: +43 (1) 534 52 - 146
On Thu, 10 Feb 2011 15:29:09 +0100, "Szabo, Patrick \(LNG-VIE\)"
wrote:
> Oh okay, so this only works for views ?!
> Can't i use that in my models.py ?!
There are places where you can use models without being logged or
having any idea of what a user can be.
For
On Thursday, February 10, 2011 2:27:15 PM UTC, Szabo, Patrick (LNG-VIE)
wrote:
>
> I imorted from django.contrib.auth.models import User but when i do
>
> Mitarbeiter = request.user.id
>
> It tells me that NameError: name 'request' is not defined
>
> What am i doing wrong ?!
>
The first thing
On Thu, Feb 10, 2011 at 6:03 AM, Szabo, Patrick (LNG-VIE) <
patrick.sz...@lexisnexis.at> wrote:
> Hi,
>
>
>
> Is there a way to show (in the admin tool) certain fields only if other
> fields are filled with certain values ?!
>
>
>
> Example:
>
>
>
> I’ve got a table named Product.
>
>
>
> 1
On Thu, Feb 10, 2011 at 2:52 PM, Alex Robbins
wrote:
> Do you want the episode with the highest individual score, or the
> highest average score?
>
I want the links (within that episode) sorted by highest score.
(Sorry for no making it clear before)
Thank you,
Hi,
I've defined the following in my root urls and also defined the
corresponding views and templates. The 404 handler picks up the
template correctly but the 500 handler doesn't. The control never
reaches the view function though apache logs report it as 500 server
error. Am I missing something
I'm trying to use raw SQL to retrieve the information that I want to
display in a dropdown list. Here's the error that I'm getting:
TemplateSyntaxError at /polls/updatepath/
Caught AttributeError while rendering: 'RawQuerySet' object has no
attribute 'all'
I'm not sure what this is trying to
Wow, you are right. This is a tricky lookup. The generic relation
makes it pretty tough. I'd just use the python sort unless you see a
real performance problem.
class LinkGetTopScores(models.Manager):
def get_top_score(self):
return sorted(self.all(), key=lambda n: n.get_score)
Maybe
Hello list, I have a question. I want to assign the size of a file to
a var in the view, but the value must to be formated in a human-
readable file size. This is for a PDF report. In a template I can be
used the filter "filesizeformat", but Are some way to use that filter
in a view?
Thanks for
On Thursday, February 10, 2011 3:46:01 PM UTC, refreegrata wrote:
>
> Hello list, I have a question. I want to assign the size of a file to
> a var in the view, but the value must to be formated in a human-
> readable file size. This is for a PDF report. In a template I can be
> used the filter
On Feb 9, 9:17 am, Daniel Roseman wrote:
It would be worth raising a ticket for this.
Done! < http://code.djangoproject.com/ticket/15267 >.
Toodle-l..
creecode
--
You received this message because you are subscribed to the Google Groups
"Django users"
On Thursday, February 10, 2011 4:04:14 PM UTC, creecode wrote:
>
> On Feb 9, 9:17 am, Daniel Roseman wrote:
>
> It would be worth raising a ticket for this.
>
> Done! < http://code.djangoproject.com/ticket/15267 >.
>
> Toodle-l..
> creecode
Er...
On Thu, Feb 10, 2011 at 5:21 AM, Lior Sion wrote:
> It's been a while since I dealt with those things, but what about this
> scenario:
>
> The attacker detects the CSRF code using an attack resembling the
> scenario here:
>
>
Hey Daniel,
On Feb 10, 8:36 am, Daniel Roseman wrote:
> Er... blush... I had a go at this myself last night, and have already raised
> a ticket. I'll mark yours as a duplicate (our fixes were pretty much the
> same). Sorry about that.
No problem. As long as it is fixed!
all() is a method on a Manager instance, that returns a QuerySet
containing every row in the table, without filtering. It is used
because you can't iterate over a Manager, only over a QuerySet.
As an example, if MyModel is a model, then MyModel.objects is a
Manager. If you tried to do this in
I'll have to look at this in more detail, but two notes, off-the-top.
First, port 80 is kept open because the browser will try port 80 if
the user types in the url without the protocol. On port 80 all we do
is issue a redirect to https, but the client will have spilled the
cookies by then.
I have the following:
class MyDateSearchWidget(forms.MultiWidget):
def __init__(self, *args, **kwargs):
widgets = (
JsDateWidget(attrs={'class': 'jsDateField', 'size': '10',
'style':'width:12em;', 'localized':True}),
forms.HiddenInput(attrs={'value' : 'date'}),
How I can incorporate in a web a 3D image made with VPython using
Django?
--
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
Hi all!
Anyone has an example of loggin/register users using Facebook?
All the ways i try just don´t work or don´t work fine.
A simple example will be appreciated!
Thanks in advance!!!
"
*O relógio da vida recebe corda apenas uma vez.*
*Ninguém tem o poder de decidir quando os ponteiros
So when I go to build the entries for my drop down list then I would
iterate over the query results like you suggested and at that point
where I iterate over the results then I can also set the different
select option attributes (html option tag attributes - value and
visible-choice) to the
On Thursday, February 10, 2011 4:48:05 PM UTC, Brian Craft wrote:
>
> I'll have to look at this in more detail, but two notes, off-the-top.
>
> First, port 80 is kept open because the browser will try port 80 if
> the user types in the url without the protocol. On port 80 all we do
> is issue a
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, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this
I'm using FormPreview with a ModelForm. My done() method gets the request
and the cleaned_data once form.is_valid() evaluates to True. I'm wondering
if I need to do anything special to use the cleaned_data or handle the
form-uploaded files. My current class definition is:
class
On 10/02/11 15:15, vamsy krishna wrote:
> Hi,
>
> I've defined the following in my root urls and also defined the
> corresponding views and templates. The 404 handler picks up the
> template correctly but the 500 handler doesn't. The control never
> reaches the view function though apache logs
It's fairly hard, Visual doesn't have an easy mechanism for rendering
png files.
One way is to render an equivalent from pov-ray. But in some ways that a
different question.
On 10/02/11 16:34, Juan Kepler wrote:
How I can incorporate in a web a 3D image made with VPython using
Django?
--
I noticed that for a form, has_changed is always returning true. On further
investigation, I found that the changed_data was pointing to the Date field
in the form. That took me to forms._get_changed_data function:
for name, field in self.fields.items():
On Wednesday, February 09, 2011 11:31:07 pm Cal Leeming [Simplicity Media Ltd]
wrote:
> There is one thing for sure. As it stands, there is an open market for a
> 'do it all' product that manages CI (continuous integration), workflow,
> development, SVN etc. I think Google Apps and Cherokee came
Further update. I think the problem is the database (GAE Datastore) stores
the month as "01" whereas the SelectDataWidget that I am using (from
django/forms/extras) is returning "1" for the month and hence they do not
compare! Any ideas how I can fix the select data widget?
Thanks
Sarang
--
I changed the code in SelectDateWidget (django/forms/extras) to return month
as '01' instead of '0'. I do not know if this problem is GAE specific. I
would appreciate if someone from Django dev group confirms this issue and
provides an appropriate fix.
if y and m and d:
if
Sorry, forgot to mention that after the above code change, has_changed() is
indeed working properly!
--
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
Looks interesting, but the interface is ugly :/ I'll try it out tho :)
On Thu, Feb 10, 2011 at 8:39 PM, Mike Ramirez wrote:
> On Wednesday, February 09, 2011 11:31:07 pm Cal Leeming [Simplicity Media
> Ltd] wrote:
>
> > There is one thing for sure. As it stands, there is an
On 5 Feb., 09:21, Ken Chida wrote:
> I tried my best to search for an answer but my efforts yielded nothing.
> Allow me to give you a simple example to illustrate my problem. Let's
> pretend that I want to have a login form on every single page on my
> website. Obviously,
I've been trying to use the Django admin to moderate spam comments,
but it appears that the URL validation is stricter in the admin (i.e.
in the default ModelForm) than in the comment posting form.
Any URL with an anchor in it (i.e. http://www.example.com/example.html#whatever)
passes validation
Er, Correction
It's not an anchor that's causing problems, but a port specification
-- e.g. http://www.example.com:81/example.html
On Feb 10, 4:45 pm, ringemup wrote:
> I've been trying to use the Django admin to moderate spam comments,
> but it appears that the URL
I just checked and my admin accepts (and correctly validates it) the port
inside a URL.
In django.core.validators.py you can see, that the port is accepted.
On 10.02.2011, at 22:55, ringemup wrote:
>
> Er, Correction
>
> It's not an anchor that's causing problems, but a port
I would like to do the following:
class WSMRTask(GridTask):
tasktype= "wsmr"
mtz_fp = FileField("MTZ file", upload_to=WSMRTask.path_gen)
class GridTask(Model):
tasktype= "unspec"
def path_gen(instance, filename):
return "%s/%s" % (WSMR_RELPATH,
I'm getting the following error when I try to run a view from a new
screen:
DatabaseError at /polls/addcomment/
table polls_comment has no column named emailcomments
I've checked the spellings and they appear to be correct. In my
Comment table I have the emailcomments field defined as a boolean
So bizarre. Adding the port seems to always cause a validation
failure on that field. Here's the offending inline declaration (Using
Django 1.2, btw):
from django.contrib.contenttypes import generic
from django.contrib.comments.models import Comment
class
I've followed the instructions here:
http://docs.djangoproject.com/en/dev/ref/contrib/formtools/form-preview/
to setup a form preview system. The problem is that my form includes a
mandatory file upload. I modified the form template to include:
however I still have problems processing the
I'm working on a website that runs on Django 1.2. It uses
django.contrib.auth, django.contrib.sessions.middleware and
django.middleware.csrf without modification. We recently discovered
that users of our site cannot login using IE6 or IE7. IE8 and all
other browsers that we know of seem to work
On Fri, Feb 11, 2011 at 1:07 AM, Daniel Roseman wrote:
> On Thursday, February 10, 2011 4:48:05 PM UTC, Brian Craft wrote:
>>
>> I'll have to look at this in more detail, but two notes, off-the-top.
>>
>> First, port 80 is kept open because the browser will try port 80 if
On 10/02/11 09:04, hank23 wrote:
Is there anyway in a form definition to specify how the options for a
select widget are to be coded when they're be generated automatically?
Specifically is there a way to specify where the value and the
displayed data attributes of the generated options are to
On Tue, Feb 8, 2011 at 4:05 PM, Bram de Jong wrote:
> as far as I read it the django unit tests run setUp before the
> fixtures are loaded...
> is that correct?
>
No, where did you read that?
Karen
--
http://tracey.org/kmt/
--
You received this message because you are
Hi,
I have a list of Python date objects that I'd like to format and string
together.
I can use the join templatetag to string them together:
{{ date_sequence|join: ", " }}
And I can also use the date templatetag to format them:
{{ date_sequence|date:" M j" }}
However, I can't see to pipe
Hello fellow django developers,
I have a model Project that has a foreign key to promotion, I have
created a ModelForm for Project and changed the widget to use a
RadioSelect.
The form shows fine with all options displaying the objects unicode
representation (in this case the promotion name).
Email: thomas.pe...@appliedrg.com
Our client is an Atlanta, GA based software development company.
Salary: DOE
Position: Django Software Engineer
Term: Contract to Permanent
Location: Virtual | Atlanta, GA Strongly Preferred
Your position will be critical. As a member of a small team of expert
This problem is more subtle than I had originally appreciated. Textual data
is just re-submitted via an embedded hidden form, and the security hash is
used to ensure that it hasn't been modified. File data is harder to cope
with. There are a few options:
1. The originally uploaded file is
http://www.fcic.gov/
--
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+unsubscr...@googlegroups.com.
For more options,
Hi friends,
Do you know any elegant tutorial to learn a regular
expression from a nutshell ? i have referred some links which are given in
a syntax without simple example, just i need a simple examples with clear
explanation even i tried in past two days to pick it
On Thu, 2011-02-10 at 22:47 -0800, NavaTux wrote:
> Do you know any elegant tutorial to learn a regular
> expression from a nutshell ? i have referred some links which are
> given in
> a syntax without simple example, just i need a simple examples with
> clear
> explanation even i tried in past
Hey,
May I strongly recommend you use "RegexBuddy", it really helps both building
regex and also learning whilst you use it.
The main site doesn't offer a trial download, but this link does:
http://www.soft32.com/download_65244.html
Cal <3
On Fri, Feb 11, 2011 at 6:47 AM, NavaTux
http://gskinner.com/RegExr/
--
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+unsubscr...@googlegroups.com.
For more
Hi Navaneethan,
It is like riding a bicycle; initially you falter a bit but later you ride with
style.
See http://www.regular-expressions.info/tutorial.html and
http://www.regular-expressions.info/javascript.html
Try not to build too complex expressions; always think of the guy who has to
90 matches
Mail list logo