On Jun 14, 8:53 am, Jan Murre wrote:
> Hi,
>
> We are running a Django 1.0 site on PostgreSQL 8.1 (on a Debian
> server). We are using the 'db' backend for sessions. Trouble is that
> our users cannot log in to the site anymore, which is quite serious of
> course. Users with an existing session
Sorry, I wasn't clear. If I call 'len' (line 5), the number of
records returned by "paged_notes.paginator.count" process is correct.
If I don't call len, the number returned is off.
On Mon, Jun 14, 2010 at 9:17 PM, Harley Bussell wrote:
>
> count() does a sql count statement, while len() loads a
I am working on a simple site right now and the views are pretty easy.
Usually just iterate a loop of objects. But, I am trying to figure out
how a website with all different kinds of data, including a sign in
form, is setup in django. Is that all in one big view? Or, is there
some way to combine t
count() does a sql count statement, while len() loads all rows from
the database and returns the array length of the results.
count() is much faster and better to use if you can conditionally
avoid loading all results.
On Jun 15, 6:17 am, Lee Hinde wrote:
> This started off as a pagination questi
I need to go check out the related data of current data QuerySet and
set these into the model objects as attribute in the way, I know this:
for row in self.query.results_iter():
..
in iterator(self).but I can't do that,because it will lead to nested loops .
how to do that? thanks!
--
On Tuesday 15 June 2010 00:05:44 Hooshyar wrote:
> I have a question. Do you know any reference, link or white paper that
> compares Joomla to Django? I know how wrong this comparison could be,
> but an avid Joomla/PHP vendor is making it.
django is a framework, joomla is a cms - so they cannot be
On Jun 15, 2:48 am, Chris Seberino wrote:
> 1. Restarting Apache+mod_wsgi
> 2. Clearing Firefox cache and
> 3. Visiting Django app URL
>
> are all done often when debugging/developing a DJango app under Apache
> +mod_wsgi.
>
> I've noticed with mod_wsgi, I will *SOMETIMES* get an error after thi
still need help here. nothing seems to be working at all
On Jun 14, 2:14 pm, JRMAbock wrote:
> oops yes your right...it seems that you notice many mistakes that i
> make...i def should keep my eyes on the code..in this case however the
> code IS correct. I still think I should get your book...Im
Thank You, I found a patch for that. My version is already 1.2.1
After pathching fields.py and widgets.py it start working fine
On Tue, Jun 15, 2010 at 12:49 AM, D3f0 wrote:
> Hi
> There's been a slighty change in 1.2, take a look at:
> http://docs.djangoproject.com/en/dev/ref/settings/#date-in
Hi
There's been a slighty change in 1.2, take a look at:
http://docs.djangoproject.com/en/dev/ref/settings/#date-input-formats
Nahuel
On 13 jun, 09:00, Jeliuc Alexandr wrote:
> Hello.
> I'm using django1.2.1 with i18n and l10n enabled...
>
> standart django admin date format is mm-dd-
> when
That was perfect. Thank you. I don't look at the admin docs enough I
guess. The following worked:
customers = forms.ModelChoiceField(queryset=Customers.objects.all(),
widget=forms.TextInput)
On Jun 14, 3:03 pm, Lee Hinde wrote:
> On Mon, Jun 14, 2010 at 1:59 PM, geraldcor wrote:
> > Hello all,
On Mon, Jun 14, 2010 at 1:59 PM, geraldcor wrote:
> Hello all,
>
> I have a model A that has >4000 records in it. I have just created a
> new model B that has a foreign key to A. I want to be able to create
> an instance of B and save it which is no problem going the normal
> routes. However, I l
Hello all,
I have a model A that has >4000 records in it. I have just created a
new model B that has a foreign key to A. I want to be able to create
an instance of B and save it which is no problem going the normal
routes. However, I like to use Ajax to make the load times faster
because a lot of
Here it is!
http://code.djangoproject.com/ticket/13758
Any feedback on that ticket would be appreciated.
Regards,
Sam
On Jun 13, 11:20 pm, Karen Tracey wrote:
> On Sun, Jun 13, 2010 at 8:22 PM, Sam wrote:
> > As it stands, I'm inclined to think this issue is a bug.
>
> It sounds like it. Coul
This started off as a pagination question, but then I realized it was
a different issue:
Given: http://dpaste.com/hold/207217/
why would len(n) be different than n.count()
In my case, the len result is correct, but Paginator tries count first
(and uses that value).
--
You received this mess
Hello again,
My last question may have been unclear, so I'm going to be more
specific.
I want to use the results of this:
cursor.execute("SELECT * from sp_getreport(""varchar"" %s)", [usr])
(or something similar) In a custom template tag to display in a
template. The results of the query are:
a
I should have also said: 'errr... help please, what now?'
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...
Thanks Anssi - that's very clear - Dave
> If you don't define null=True the database will enforce that all rows
> are not null. Of course when you add a field into the database, the
> row will have a null value by default for the old rows, and the
> database will give you an error.
>
> If null val
I was able to trace the cause of the error, though not sure if this was the
cause with other people.
I loaded my data from an excel spreadsheet which copied a table from
microsoft word.
It seems that the copy from word puts some special characters in the
database.
I was able to manually type in t
I need to save the values of f in a columm and the values of Sfase in
a other columm for de exemple:
http://www.srl.caltech.edu/~shane/sensitivity/asteroids/scg_8564.dat
On 14 jun, 15:20, Waleria wrote:
> look my code:http://paste.pocoo.org/show/225383/
>
> f is f = xrange(3000,3400)
> and S
thanks again anssi, stellar reply
I might do this below. the tracking is the last thing to happen
before rendering,
so there are no more UPDATE or INSERTS
and in most cases views that use tracking don't do anything but select
anyway
but OTOH I'm already running rabbit and celery so I might mess
Hello Django users,
I have a question. Do you know any reference, link or white paper that
compares Joomla to Django? I know how wrong this comparison could be,
but an avid Joomla/PHP vendor is making it.
Also, if you know a reference material to compare Django to PHP, that
would be nice too, alt
On ma, 2010-06-14 at 11:26 -0700, Thomas Allen wrote:
> Is there a way to assume one field to be invalid if another is? In the
> form below, api_key can never be valid if location is not.
The place to implement such checks is in the clean() method of the form,
which is called after all the indivi
Hi everyone,
Is there a way to assume one field to be invalid if another is? In the
form below, api_key can never be valid if location is not.
import urllib, urllib2
from django import forms
from websites.models import *
KEY_PARAM = 'key'
class WebsiteForm(forms.ModelForm):
api_key = forms.C
look my code: http://paste.pocoo.org/show/225383/
f is f = xrange(3000,3400)
and Sfase are the values of function ..for each value of "f"
against a value for "Sfase"
Dou you understand?
On 14 jun, 15:08, Daniel Roseman wrote:
> On Jun 14, 5:05 pm, Waleria wrote:
>
>
>
> > Hello,
>
> > I ne
oops yes your right...it seems that you notice many mistakes that i
make...i def should keep my eyes on the code..in this case however the
code IS correct. I still think I should get your book...Im sure there
are many techniques in there that would help me with coding clean.
On Jun 14, 1:40 pm, Ka
On Jun 14, 5:05 pm, Waleria wrote:
> Hello,
>
> I need to leave a file tabbed, like this:
>
> http://www.srl.caltech.edu/~shane/sensitivity/asteroids/scg_8564.dat
>
> Following piece of my code that does this:
>
> savefig('C:\simuladores\detector\media\imagem.png')
> writer = csv.writer(open('C:\s
On Mon, Jun 14, 2010 at 1:39 PM, Karen Tracey wrote:
> C:\Users\Josh\Django-1.2.1\django\bin\views.py
>
This should have been
C:\Users\Josh\Django-1.2.1\django\bin\mysite\views.py
in the previous mail.
--
You received this message because you are subscribed to the Google Groups
"Django user
On Mon, Jun 14, 2010 at 1:14 PM, JRMAbock wrote:
> from django.http import HttpResponse
> import datetime
>
> def current_datetime(request):
>now = datetime.datetime.now()
>html = "It is now %s." % now
>return HttpResponse(html)
>
> this is what it looks likeits exactly how they te
Hello,
I need to leave a file tabbed, like this:
http://www.srl.caltech.edu/~shane/sensitivity/asteroids/scg_8564.dat
Following piece of my code that does this:
savefig('C:\simuladores\detector\media\imagem.png')
writer = csv.writer(open('C:\simuladores\detector\media
\dados.dat','wb'))
for v1,
thanks a lot!
i'll try Matts solution, it's exactly what i wanted to do,
using jquery to send an $.ajax request with method DELETE and id of
the object to delete
in the url params...
On Jun 14, 5:01 pm, Matt Hoskins wrote:
> From glancing at the code for the modpython and wsgi core handlers I
from django.http import HttpResponse
import datetime
def current_datetime(request):
now = datetime.datetime.now()
html = "It is now %s." % now
return HttpResponse(html)
this is what it looks likeits exactly how they tell me to show
itPython located my hello module before so I
On Mon, Jun 14, 2010 at 12:31 PM, JRMAbock wrote:
> Traceback:
> File "C:\Python26\lib\site-packages\django\core\handlers\base.py" in
> get_response
> 91. request.path_info)
> File "C:\Python26\lib\site-packages\django\core\urlresolvers.py" in
> resolve
> 214.
On Mon, Jun 14, 2010 at 11:39 AM, Jeff Green wrote:
> In one of my models, I have a CharField with Max_length of 2000
> characters.
> When I try to delete the record via admin, I get an error value too
> long for type character varying(200).
>
> It seems that the issue is because it is trying to
1. Restarting Apache+mod_wsgi
2. Clearing Firefox cache and
3. Visiting Django app URL
are all done often when debugging/developing a DJango app under Apache
+mod_wsgi.
I've noticed with mod_wsgi, I will *SOMETIMES* get an error after this
triad.
Reloading the Django URL makes it go away so it o
Traceback:
File "C:\Python26\lib\site-packages\django\core\handlers\base.py" in
get_response
91. request.path_info)
File "C:\Python26\lib\site-packages\django\core\urlresolvers.py" in
resolve
214. for pattern in self.url_patterns:
File "C:\Python26\lib\site-p
Hi All,
I have a slight issue that I am unable to find a clean solution to.
I have several tables all linking from one to another for example.
Data Center -> Rack -> Server -> Virtual Machine
Now..
A Virtual Machines has an ID linking it to a Server.
A Server has an ID link it to a Rack.
A Rack
Hello,
I need to leave a file tabbed, like this:
http://www.srl.caltech.edu/~shane/sensitivity/asteroids/scg_8564.dat
Following piece of my code that does this:
savefig('C:\simuladores\detector\media\imagem.png')
writer = csv.writer(open('C:\simuladores\detector\media
\dados.dat','wb'))
for v1,
In one of my models, I have a CharField with Max_length of 2000
characters.
When I try to delete the record via admin, I get an error value too
long for type character varying(200).
It seems that the issue is because it is trying to insert the record
into the django_admin_log and the change_messag
I'm migrating James Bennett's 'Cotrane' blog app (adding a 'modified'
date field) using South on the existing app (with data already
present). These are the steps, and the traceback. Posting here because
the exact same error (in this post's title) also appears in Django and
Dmigrations bug reports
On Jun 11, 4:26 pm, backdoc wrote:
> The examples are pretty slick.
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-us...@googlegroups.com.
To unsubscribe from this group, send email to
dj
>From glancing at the code for the modpython and wsgi core handlers I
think django always puts the URL arguments into "request.GET"
regardless of method (i.e. it's not restricted to just GET and POST
requests, since query strings on URLs can exist for any method) where
as "request.POST" will only b
On Mon, Jun 14, 2010 at 10:12 AM, Federico Capoano wrote:
> Hello to all.
>
> Version 1.2.1:
>
> In the admin, just noticed that when I delete any of the dynamic
> inlines (an image basically) of a form and then I hit the SAVE button
> the image is deleted successfully but I get this error:
>
> U
I have written certain custom tags that accept HTML attributes
(typically id and class), so they can often be verbose in usage. My
small idea was to write a tag that renders its contents as a tag, but
the trouble is that I cannot figure out how to parse the tag body.
For multi-line use of a tag "f
Hello to all.
Version 1.2.1:
In the admin, just noticed that when I delete any of the dynamic
inlines (an image basically) of a form and then I hit the SAVE button
the image is deleted successfully but I get this error:
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position
13: ord
Actually, upgrading to 1.2 and doing a copy from one db to the other seems
like the best
option.
Thanks for the info
Jeff
On Mon, Jun 14, 2010 at 5:34 AM, David De La Harpe Golden <
david.delaharpe.gol...@ichec.ie> wrote:
> On 14/06/10 04:15, Jeff Green wrote:
>
>> I was wondering what would be
Problem fixed - the error variable in my template was mispelled.
Thanks.
On Mon, Jun 14, 2010 at 3:13 PM, Sithembewena Lloyd Dube
wrote:
> Hi all,
>
> I have a "vote" view and "detail" template in the Polls application that I
> am writing. The idea is that the user will see a "vote" page where t
Thanks Daniel :) I am doing the tutorial and nothing else, step by step. I
mispelled the name of my template variable.
Many thanks,
Lloyd
On Mon, Jun 14, 2010 at 3:45 PM, Daniel Roseman wrote:
> On Jun 14, 2:13 pm, Sithembewena Lloyd Dube wrote:
> > Hi all,
> >
> > I have a "vote" view and "det
On Jun 14, 2:13 pm, Sithembewena Lloyd Dube wrote:
> Hi all,
>
> I have a "vote" view and "detail" template in the Polls application that I
> am writing. The idea is that the user will see a "vote" page where they can
> select one of two radio buttons for a choice to the poll, and click "vote".
>
I have also found a hack in admin/templates/auth/user/add_user.html
The django developers have inserted the following line into this
template, so that no matter which button is clicked, the same action
will be executed.
I override this template and my problem is solved
On Jun 14, 1:59 pm, sta
Was just wondering whether there is any video player which would give me the
frame number when i stop it? I mean, probably at the click of a button when
the movie is playing i need the frame number.
The idea is , i am working on a component which i want to release in open
source by which online vi
Hi, is there an easy way to turn the insert mode of a web page as a
grid.
The application will store a lot for invoices and it would be useful
if the display is something like an excel sheet. It doesn't matter if
the save functionality is at line by line level saving one invoice at
a time or at onc
Ok I got what i wanted :
http://djangosnippets.org/snippets/1052/
http://code.google.com/p/django-reversion/
-V-
http://twitter.com/venkasub
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googl
On Mon, Jun 14, 2010 at 5:00 PM, Daniel Roseman wrote:
>
> How does the user flow in your question differ from the standard form
> process?
>
My Q was more related to tracking the data changes - assuming that the DB
has a value 'Job' for attribute 'Name' and when displayed to the user he
changes
Hi all,
I have a "vote" view and "detail" template in the Polls application that I
am writing. The idea is that the user will see a "vote" page where they can
select one of two radio buttons for a choice to the poll, and click "vote".
This takes them to a "results" page where they can view the pol
Hi Django users,
developing my application for storing the employee's expenses, my
database has a model class named employee that has the below columns
(name, password, isAdmin, branch, isActive) The name and the password
should be used for the login and the isAdmin should be used for the
permiss
The additional problem with "is_staff" has been solved.
I created an OverridenUserAdmin(UserAdmin):
""" This class overrides the default UserAdmin model """
def save_model(self, request, obj, form, change):
""" Overrides the value of is_staff by saving this model """
obj.is_sta
Thank you. :)
On Mon, Jun 14, 2010 at 3:13 PM, stanleyxu2005 wrote:
> Take a look at
>
> ModelAdmin.formfield_overrides
>
>
>
> On Jun 14, 1:35 am, Jeliuc Alexandr wrote:
> > Hello.
> > I want to change default text input widget in admin for CharField to
> > text area...
> > How can I do it?
>
>
Take a look at
ModelAdmin.formfield_overrides
On Jun 14, 1:35 am, Jeliuc Alexandr wrote:
> Hello.
> I want to change default text input widget in admin for CharField to
> text area...
> How can I do it?
--
You received this message because you are subscribed to the Google Groups
"Django use
On Mon, Jun 14, 2010 at 4:48 AM, kalinski wrote:
> MyModel.objects.get(id=request.DELETE['id']).delete()
request.GET is a parsing of the 'query' part of the URL.
request.GET is a parsing of the content of the request.
request.COOKIES is a parsing of some headers of the request.
what are you exp
Hi All,
I have some problems with the integrated user profile module.
When a user profile is going to be created, there are three buttons
below: "Save and add another", "Save and continue" and "Save".
But no matter which button I click, it will always enter the user
profile page. (I am not sure,
On Jun 14, 12:20 pm, Venkatraman S wrote:
> Hi,
>
> Is there some way by which i can track what all has changed when a user
> submits a form.
> i.e, i display a form to a user(with data) -> the user *can* change some of
> its form elements -> submits the form.
>
> One way to do that would be to co
Hi,
Is there some way by which i can track what all has changed when a user
submits a form.
i.e, i display a form to a user(with data) -> the user *can* change some of
its form elements -> submits the form.
One way to do that would be to compare with the model when the user submits
and do a diff
As the other posters say, this is not possible with standard HTTP and
certainly not with Django.
By default, HTTP is one request / one response and Django (and other
web frameworks) are built on that. Take a look at the HTTP spec and
try looking at the packet contents for HTTP requests - it is qu
On 14/06/10 04:15, Jeff Green wrote:
I was wondering what would be the best method of trying to dump a
large database.
I am trying to migrate from postgresql to oracle, using django 1.2.1 I
have been unsucessful in using dumpdata.
One interesting point - django 1.2 supports multiple connections
Thanks!
Yep, it was a problem with the keyword argument 'user'. Solved the
issue by first calling the argument 'my_user' and not explicitly
stating it in the __init__ function signature.
def __init__(self, *args, **kwargs):
user = kwargs.pop('my_user', False)
...
On Jun 14, 2:25 am, Kare
well the answer is "no" yes?:
On Jun 14, 11:48 am, kalinski wrote:
> Hi Djangos,
>
> is this working like expected with recent django version:?
>
> def myview(request):
> if request.is_ajax:
> if request.DELETE #or alternatively if request.method=='DELETE':
> MyModel.objects
Hi Djangos,
is this working like expected with recent django version:?
def myview(request):
if request.is_ajax:
if request.DELETE #or alternatively if request.method=='DELETE':
MyModel.objects.get(id=request.DELETE['id']).delete()
or do i have to go through POST and for example
On Jun 14, 1:24 am, felix wrote:
> brilliant, you are correct:
>
> Foreign-key constraints:
> "traffic_tracking2010_content_type_id_fkey" FOREIGN KEY
> (content_type_id) REFERENCES django_content_type(id) DEFERRABLE
> INITIALLY DEFERRED
> "traffic_tracking2010_src_content_type_id_fkey" FOR
Many thanks for your helpful posts - in the end I just changed a bit
of my code to work with 2.4, but this will come in handy for when I
finally make the upgrade.
Thanks again,
Nick
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to thi
Thanks Daniel, that is absolutely right.
On Mon, Jun 14, 2010 at 10:07 AM, Daniel Roseman wrote:
> On Jun 14, 8:55 am, Sithembewena Lloyd Dube wrote:
> > Hi all,
> >
> > I am using Django 1.2 to write the Django tutorial poll app. At the end
> of
> > my *vote* view, I have the following line of
On Jun 14, 8:55 am, Sithembewena Lloyd Dube wrote:
> Hi all,
>
> I am using Django 1.2 to write the Django tutorial poll app. At the end of
> my *vote* view, I have the following line of code:
> *
> return
> HttpResponseRedirect(reverse(myproject.polls.views.results(args=(p.id,
> *
>
> When I
Hi all,
I am using Django 1.2 to write the Django tutorial poll app. At the end of
my *vote* view, I have the following line of code:
*
return
HttpResponseRedirect(reverse(myproject.polls.views.results(args=(p.id,
*
When I navigate to http://127.0.0.1:8000/polls/1/vote/, I am able to vote,
b
Hi,
We are running a Django 1.0 site on PostgreSQL 8.1 (on a Debian
server). We are using the 'db' backend for sessions. Trouble is that
our users cannot log in to the site anymore, which is quite serious of
course. Users with an existing session cookie can access the site
without trouble, but log
Hello Jeff,
I'm not familiar with postgresql but can you dump your data from
postgresql similar to what can be done with MySQL and the mysqldump
command?
On Jun 13, 8:15 pm, Jeff Green wrote:
> I would appreciate if anyone has suggestions on the best way to
> migrate a large database.
Toodle-l
75 matches
Mail list logo