Thanks for the help, don't have it sorted yet but I'm well on my way
--
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+
On 16 October 2010 00:21, Damir Dezeljin wrote:
> Hi.
> I'm working on an application tat communicates with embedded devices
> connected to the LAN. The devices are controlled by a central server written
> in C++. Django is used for the front-end or better to say the GUI for the
> server.
> Part o
I think there is some confusion here. I'm guessing you are using mysql-
python v1.2.1 since a 1.x mysql version would probably date back to
the mid to late 90s. Ask the admin if it is possible to upgrade mysql-
python for which you do not need to upgrade MySQL itself or even take
down the database.
I have a model like such:
class Response(models.Model):
raw_text = models.TextField()
respondent = models.ForeignKey('auth.User')
Response has a related model attached to it:
class Code(models.Model):
response = models.ForeignKey(Response)
coded_answer = mod
On Oct 15, 2:12 am, bowlby wrote:
> We're hosting a small site on our own server. On the server we have
> some pages that are non-django (for example munin to see server
> statistics). Is there a way to use django's authentication mechanism
> to reserve access to these pages to users who have an a
Hey Eric!
We're using ASI & Django and seeing the same thing.
Was setting shouldAttemptPersistentConnection enough to make the
problem go away? About 1/50 of our requests fail with this bug.
Thanks!
Mike
On Oct 7, 11:21 am, Eric Chamberlain wrote:
> We ran into the same error with ASIHTTPReque
Hi, the linux server of my company has mysql 1.2.1, which is too old
for Django. However, the administrator didn't want to upgrade it. I
have to install mysql 5.1.51 under my home directory. I did that
successfully, but Django still complain about the older mysql. Do you
know if there is a way to c
I finally turned off DEBUG on my site and got set up so that the
django code would email me the exceptions. This is ultra-cool! So I
got m first one in the mail today, and was hard-pressed to figure out
the user that ran into the error. I don't find request.user anywhere
in the report. Do I nee
Hello,
For those who might be interested there are several PostgreSQL + Django
talks happening at PgWest:
https://www.postgresqlconference.org/content/django-and-postgresql
https://www.postgresqlconference.org/content/speeding-django-and-other-python-apps-automatic-remoting-database-methods
You
Now works.
validators=[MaxValueValidator(Decimal('14.5'))
But I must to do an explicit declaration Decimal('14.5').
Somebody knows why?
On 15 oct, 18:13, refreegrata wrote:
> Hello list. I want to validate the data in a field of a model.
>
> with this
> validators=[MaxValueValidator(14)]
> the
Hello list. I want to validate the data in a field of a model.
with this
validators=[MaxValueValidator(14)]
the field is correctly validated
but with this
validators=[MaxValueValidator(14.5)]
always is invalid
Somebody know how use the "MaxValueValidator" when the "max_value" is
a decimal?
than
Thanks everyone, I tried using some signal handlers but it wasn't
happening so I reverted to the override of the save method and now I
have it working.
Regards,
Devin Morin
On Oct 15, 8:56 am, Blue Cuenca wrote:
> On 10/15/2010 9:01 PM, Devin M wrote:> Hello everyone,
> > I am writing a sav
For more than one database it seems that you are able to do it
http://docs.djangoproject.com/en/dev/topics/db/multi-db/.
You could implement your device functions inside something like
myproject.device.functions if your not working with alot of data.
Or you can implement that in the database handle
On Fri, Oct 15, 2010 at 9:37 PM, Alec Shaner wrote:
> doh! Just noticed that you already referenced ticket 10154 in your
> original post.
Well, I referenced the patch that I found searching with google, but
actually I didn't saw the ticket that it belongs to ;)
On the ticket there is another
doh! Just noticed that you already referenced ticket 10154 in your
original post.
On Fri, Oct 15, 2010 at 3:16 PM, Alec Shaner wrote:
> Interesting solution - after all that maybe it's more concise to just
> use the 'extra' filter instead since you're making it specific to
> mysql anyway, and you
Thanks.
I read the docs you pointed med to and now I have few more questions:
1. Is it possible to use two or more different back-ends with a single
Django project? For me it seems not.
2. After rethinking my needs I realized I need simple functions as e.g.
FlushDevice(), GetServerUptime(), Assig
Interesting solution - after all that maybe it's more concise to just
use the 'extra' filter instead since you're making it specific to
mysql anyway, and you could use mysql date functions.
By the way, in answer to your original question on this thread, there
already is a ticket to add F() + timed
Thank you for such a comprehensive answer.
I chose to add the field to the table. It seems to be the best
solution.
--
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 unsubscri
On Fri, Oct 15, 2010 at 7:54 PM, Alec Shaner wrote:
> On Fri, Oct 15, 2010 at 1:26 PM, Marc Aymerich
> wrote:
> >
> > Instead of use datatime.timedelta I convert it to string with this
> format:
> > MMDDHHMMSS and now all works fine with mysql :) Unfortunately this
> part
> > of code doesn'
On Fri, Oct 15, 2010 at 1:26 PM, Marc Aymerich wrote:
>
> Instead of use datatime.timedelta I convert it to string with this format:
> MMDDHHMMSS and now all works fine with mysql :) Unfortunately this part
> of code doesn't be database independent :(
>
> Thank you very much alec!
>
> --
> Ma
On Fri, Oct 15, 2010 at 5:02 PM, Alec Shaner wrote:
> It should be clarified that this occurs on the mysql backend, but not
> the postgres backend. It has to do with how MySQL handles the DATETIME
> object. You can't add a timedelta, because it expects a double.
>
> I created a test app using a m
Yep, thats it man! That is great, thanks!
On Oct 14, 11:01 pm, Antoni Aloy wrote:
> http://www.cdolivet.com/index.php?page=editArea&sess=106bb5f73b60725d...
>
> This a javascript code editor. Perhaphs it would give you another 40%
>
> 2010/10/15 pixelcowboy :
>
>
>
>
>
> > Thanks, I guess this ge
Hi,
I've got a django site which uses the built in view to change the users
language:
urls.py: (r'^i18n/', include('django.conf.urls.i18n')),
template:
{% csrf_token %}
{% for lang in LANGUAGES %}
{% ifequal lang.0 "de" %}
On 15/10/10 12:15, Alexander wrote:
> As you can see the 'rating' table has no separate primary key field.
Yeah, that is pretty commonplace (though not presently supported by
django), the natural primary key for a table may be composite...
> Here are the models created by Django with some my cor
Thanks for your reply.
--
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...@googlegroups.com.
For more options
On 10/15/2010 9:01 PM, Devin M wrote:
> Hello everyone,
> I am writing a save handler in my models.py file to run a few
> actions after a save. to do this I have a function called make_photos
> and a connection to the post_save signal.
> Here is my code:
>
>
> The only problem i have with thi
ok, thank for reply.
I think that with this query:
" AA.object.filter(...).select_related( field related in BB ) "
The impact in the performance is minimun
But with this query
" AA.object.filter(...).select_related() "
the impact is higher, because the first query do an unique "join", but
the
Hi,
I'm working on a project that uses 2 databases. I wrote a route for my
special database, that route should allow just some tables for syncdb,
and it works very well when i use ./manage.py syncdb --
database=my_other_db, however, i got some troubles with south, it
seems not respect my route, in
On Fri, Oct 15, 2010 at 5:02 PM, Alec Shaner wrote:
> It should be clarified that this occurs on the mysql backend, but not
> the postgres backend. It has to do with how MySQL handles the DATETIME
> object. You can't add a timedelta, because it expects a double.
>
> I created a test app using a m
On Oct 15, 4:19 pm, refreegrata wrote:
> Hello, how can i get fields from different tables related for a
> foreign key?
>
> When I do a inner join like
>
> AA.objects.filter(bb__field = ...) ...
>
> I just can access to the AA fields, and not to fields in the other
> table
>
> in a normal query i
FYI: SQLite3 indeed re-uses primary keys if they are deleted from the
tail of the sequence. (So I'll have to use a UUID as a permanent id.)
Thanks for your support.
Dirk
On Oct 10, 5:57 am, Russell Keith-Magee
wrote:
> On Sunday, October 10, 2010,Dirk wrote:
> > If I use
>
> > id = models.AutoFi
Hello, how can i get fields from different tables related for a
foreign key?
When I do a inner join like
AA.objects.filter(bb__field = ...) ...
I just can access to the AA fields, and not to fields in the other
table
in a normal query i can do something like "select AA.*, BB.* FROM. AA
inner jo
Im just storing these files in standard ImageFields does the field
take care of that automagically?
And whats the best way to delete the files saved to tmp? should i do a
system call for rm?
On Oct 15, 7:41?am, Jonathan Barratt
wrote:
> On 15 ?.?. 2010, at 21:35, Devin M wrote:
>
> > Ok its runn
It should be clarified that this occurs on the mysql backend, but not
the postgres backend. It has to do with how MySQL handles the DATETIME
object. You can't add a timedelta, because it expects a double.
I created a test app using a mysql backend and a Article model with
created and updated datet
On 15 ?.?. 2010, at 21:35, Devin M wrote:
> Ok its running in a infinite loop because im calling
> self.*photo.save() and that starts this loop all over again. Maybe I
> can add a field to the model like booleen resized and if its true dont
> do any resizing but if its false then perform some res
On 15 ?.?. 2010, at 20:01, Devin M wrote:
> Hello everyone,
>I am writing a save handler in my models.py file to run a few
> actions after a save. to do this I have a function called make_photos
> and a connection to the post_save signal.
> Here is my code:
>
> The only problem i have with t
Ok its running in a infinite loop because im calling
self.*photo.save() and that starts this loop all over again. Maybe I
can add a field to the model like booleen resized and if its true dont
do any resizing but if its false then perform some resizing(aka run
the function)? also im going to have t
Wait looks like i made an error.
http://testsite.com/page/{%pk - 1%}>Previous Page
and you might not be able to use pk so see if you can use data.pk
let me know if it works.
Regards,
Devin M
On Oct 15, 6:56 am, Devin M wrote:
> Oh you want just one record per page? Thats easy.
> urls.py
> (r'^pag
Oh you want just one record per page? Thats easy.
urls.py
(r'^page/(?P\d+)/$', 'data.views.pagelisting'),
views.py
def pagelisting(request, page_number):
data_list = Data.objects.filter(pk=page_number)
return render_to_response('list.html', {"data_list": data_list})
template list.html
{%
Hi Devin
Thank you for your reply.
I'm not sure if I've explained myself properly, or if I'm
misinterpreting your reply. What I am aiming for is a form containing
a single record. At the bottom of this form will be the pagination
tools << Prev 1 2 3 etc. which will enable the user to navigate
thr
You could use a template in django if your only serving some static
html. Otherwise if its php or something, make a template and restrict
it to admin and have the view render the php and spit it out to the
page context.
On Oct 15, 2:12 am, bowlby wrote:
> We're hosting a small site on our own ser
Hello,
It looks like you want a custom database backend. On
http://docs.djangoproject.com/en/dev/ref/settings/?from=olddocs#engine
they say
"You can use a database backend that doesn't ship with Django by
setting ENGINE to a fully-qualified path (i.e.
mypackage.backends.whatever). Writing a whole n
Wait... I just looked at your sql and it looks like you would need to
use multiple-column primary keys which are unsupported by django.
http://code.djangoproject.com/ticket/373
On Oct 15, 4:15 am, Alexander wrote:
> I have a database, which among others has the following tables:
>
> CREATE TABLE
Sorry, not sure about that warning because I'm using a postgresql database.
On Fri, Oct 15, 2010 at 3:17 AM, Marc Aymerich wrote:
>
>
> On Fri, Oct 15, 2010 at 3:39 AM, Alec Shaner wrote:
>>
>> You can't add a datetime to another datetime - you want to add a
>> datetime.timedelta instance instea
I did some quck googling and found this.
http://stackoverflow.com/questions/605896/django-querying-read-only-view-with-no-primary-key
This is the response from them that seems most helpful.
"all you need is a column that is guaranteed to be unique for every
row. Set that to be 'primary_key = True
Hi.
I'm working on an application tat communicates with embedded devices
connected to the LAN. The devices are controlled by a central server written
in C++. Django is used for the front-end or better to say the GUI for the
server.
Part of the data the user needs access too are stored in the data
So you have a page number thats getting passed from a url, right? and
then you want to display records based on that page number? you could
do something like this:
urls.py
(r'^page/(?P\d+)/$', 'data.views.pagelisting'),
views.py
def pagelisting(request, page_number):
records = range(page_numbe
Hello everyone,
I am writing a save handler in my models.py file to run a few
actions after a save. to do this I have a function called make_photos
and a connection to the post_save signal.
Here is my code:
class Album(models.Model):
title = models.CharField(max_length=200)
date = model
Hello
I need to be able to create a form that contains data from my
database. It also needs to have basic pagination at the bottom of the
form as there will be many records, and I would like my users to be
able to use pagination to access them (kind of like MS Access).
I can produce the form ok,
On Fri, Oct 15, 2010 at 5:26 PM, Brian Bouterse wrote:
> One of the challenges of going the GAE route is that you need to modify
> your application slightly to work with their version of models. Also, you
> can't ever run this code off of GAE, so it's kind of a lock-in in that
> respect. That b
One of the challenges of going the GAE route is that you need to modify your
application slightly to work with their version of models. Also, you can't
ever run this code off of GAE, so it's kind of a lock-in in that respect.
That being said it does work very well.
Brian
On Thu, Oct 14, 2010 at
I have a database, which among others has the following tables:
CREATE TABLE users (
userId BIGINT PRIMARY KEY
);
CREATE TABLE movies (
movieId BIGINT PRIMARY KEY,
title varchar(255) NOT NULL
);
CREATE TABLE ratings (
userId BIGINT NOT NULL REFERENCES users(userId),
movieId BIGINT NOT
This is a fork of this tread:
http://groups.google.com/group/django-users/browse_thread/thread/5c6beb41fcf961a4
I'm getting troubles combining instances of F() and timedelta. I'm working
with the very last trunk revision (14232),
I create a very simple model for troubleshoting the problem, the mo
On Thu, 2010-10-14 at 23:03 -0700, BlackMoses wrote:
> First table contains universal field which doesn't depends on
> language. Second contains fields that suposed to be in many languages,
> 'culture' field which store language code ('en', 'de' etc). Both
> tables are related with foreign keys of
We're hosting a small site on our own server. On the server we have
some pages that are non-django (for example munin to see server
statistics). Is there a way to use django's authentication mechanism
to reserve access to these pages to users who have an account?
Details:
we have site say, www.tes
On 15 ?.?. 2010, at 13:03, BlackMoses wrote:
> have question if Django have support for I18n models.
>
> My question is if there are any Django standards/tools that i should
> use for it? Or I have to take care with it on my own.
Yes there are standard tools, please see:
http://docs.djangopro
SHOW FULL PROCESSLIST;
EXPLAIN ;
On Thu, Oct 14, 2010 at 6:02 PM, Nick Arnett wrote:
> I am having a problem with locking on MySQL and can't quite figure out
> what's causing it. Although I have some scripts that do raw SQL, none of
> them are running, I see no other transactions in the process
have question if Django have support for I18n models. For example in
Symfony when i create 'news' table there are 2 tables in fact :
news
id
date
news_i18n
id
culture
title
text
First table contains universal field which doesn't depends on
language. Second contains fields that supose
On Fri, Oct 15, 2010 at 3:39 AM, Alec Shaner wrote:
> You can't add a datetime to another datetime - you want to add a
> datetime.timedelta instance instead. Out of curiosity I just tested it
> on one of my models and it does work, e.g.,
>
> MyModel.objects.filter(update_date__gt=F('entry_date')+
59 matches
Mail list logo