Re: Best packages for aggregating news + compiling stats

2013-05-30 Thread Mike Dewhirst
On 31/05/2013 1:18pm, C. N. Desrosiers wrote: I'm in the early stages of planning a website that will aggregate news on a specific topic (and later have other sections with statistics pulled from various public data sets). Google News seems to have an excellent algorithm for selecting the most

Best packages for aggregating news + compiling stats

2013-05-30 Thread C. N. Desrosiers
I'm in the early stages of planning a website that will aggregate news on a specific topic (and later have other sections with statistics pulled from various public data sets). Google News seems to have an excellent algorithm for selecting the most relevant articles based on a keyword so, at

Re: Workshop: Don't Be Afraid to Commit, Cardiff, UK

2013-05-30 Thread Rahul Ramesh
Hi Daniele, I think what you're doing is really great. Do you have recorded videos available online or do you plan to record your next session? It'd be great for people like me who can't attend the workshop. Regards, Rahul On Fri, May 31, 2013 at 2:10 AM, Daniele Procida

How do I install this django application?

2013-05-30 Thread Mohammad Hakim
Hello everyone, I have been trying to find out how to install django-honeypot and seems that i had to have a form application installed first. So I have followed instructions given to me at

Re: input data will be lost if there are errors in the form

2013-05-30 Thread Jeff Hsu
Thank you, Tom. It's exactly what I need. On Thu, May 30, 2013 at 3:55 AM, Tom Evans wrote: > On Thu, May 30, 2013 at 3:31 AM, Jeff Hsu wrote: > > Hi, > > > > I find this very interesting. In my html template form: > > > > >

Re: Using multiple model files per app with the Improved Multiple Model Files Django Snippet

2013-05-30 Thread Mike Dewhirst
On 30/05/2013 10:43pm, Doug S wrote: I'm trying to use multiple files for my models in a single app. I found a nice solution on Django Snippets : http://djangosnippets.org/snippets/1838/ but I'm not able to get it to work. The docs assume that I know more than I do

Re: Queryset math

2013-05-30 Thread Avraham Serour
try using annotate, you can do something like Entry.objects.extra(select={'diff': "A - B"}) take a look at https://docs.djangoproject.com/en/dev/ref/models/querysets/#extra On Thu, May 30, 2013 at 11:46 PM, Javier Guerra Giraldez wrote: > On Thu, May 30, 2013 at 3:18 PM,

Re: 404 Resolver causing server errors

2013-05-30 Thread jayhalleaux
When switch to a flat 404 page without using a handler404 it works fine. Not sure if this a bug in Django because the above method used to work fine, but now it doesn't. On Thursday, May 30, 2013 4:29:33 PM UTC-4, jayhalleaux wrote: > > So I am having issues with my 404 errors. > > When I

Re: Importing data using loaddata from exported data using dumpdata

2013-05-30 Thread Bill Freeman
I'm glad that you've got it licked. On Thu, May 30, 2013 at 4:36 PM, Gitonga Mbaya wrote: > Ah, a bit of digging found the solution. This link explains the issue: > http://bit.ly/13mS8ZB specifically: > > "cmd.exe" supports an ascii and an utf16 output mode: this can be

Re: Queryset math

2013-05-30 Thread Javier Guerra Giraldez
On Thu, May 30, 2013 at 3:18 PM, SeanJ wrote: > as soon as those values come from the queryset I can't do math on them. what have you tried? -- Javier -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe

Workshop: Don't Be Afraid to Commit, Cardiff, UK

2013-05-30 Thread Daniele Procida
I'm running a Don't Be Afraid to Commit in Cardiff weekend after next, under the auspices of the Cardiff Dev Workshop. It's a workshop/tutorial for Python/Django developers who would like to contribute to the projects they use, but need more grounding in some of the tools required. I ran this

Re: Importing data using loaddata from exported data using dumpdata

2013-05-30 Thread Gitonga Mbaya
Ah, a bit of digging found the solution. This link explains the issue: http://bit.ly/13mS8ZB specifically: "cmd.exe" supports an ascii and an utf16 output mode: this can be selected by "cmd.exe"-> ascii mode "cmd.exe /u" -> unicode mode The only difference between the two modes is

404 Resolver causing server errors

2013-05-30 Thread jayhalleaux
So I am having issues with my 404 errors. When I manually throw a 404 error, my handler404 works fine and catches the error showing my custom 404 error page. http://tracklist.us/archive/event/1000/2012-12-05-sasha-moonpark-xxv-costa-salguero/ Now when I use a bad url which should be caught

Re: Importing data using loaddata from exported data using dumpdata

2013-05-30 Thread Gitonga Mbaya
What you say makes sense. I was just thinking about that very thing of the nul character as I looked at the bad file in the hexeditor. I think your suspicion of cmd.exe's ">" operation being at fault is the root of my problems since the file is bad right from get go. Thanks much for all your

Re: Importing data using loaddata from exported data using dumpdata

2013-05-30 Thread Bill Freeman
If all else fails this untested tool (attached) might translate bad files to good ones. Run it like this: python utr16toascii.py bad_file name_for_new_good_file On Thu, May 30, 2013 at 4:10 PM, Bill Freeman wrote: > This file is encoded in UTF-16 with a byte order mark.

Queryset math

2013-05-30 Thread SeanJ
I think this is a newbie question, but I can't find the answer in the docs or Group posts. If I have a value stored in my data tables like: a = Some_table.objects.filter(pk=10).values('number') b = Another_table.objects.filter(pk=2).values('another_number') and maybe even a value from a

Re: Importing data using loaddata from exported data using dumpdata

2013-05-30 Thread Bill Freeman
This file is encoded in UTF-16 with a byte order mark. That is to say, other than starting with \xff\xfe (the two character byte order mark),, every other character is nul (\x00). There are actually 1449 useful characters in this 2900 byte file. A converted version is attached. json.load() is

Re: view data tables?

2013-05-30 Thread Kakar Arunachal Service
thanks It worked pretty well! On Sun, May 26, 2013 at 6:47 AM, Drew Ferguson wrote: > On Sun, 26 May 2013 06:14:11 +0530 > Kakar Arunachal Service wrote: > > > Sad, i'm on windows! So, can u tell me how to view the tables that i >

Re: Importing data using loaddata from exported data using dumpdata

2013-05-30 Thread Gitonga Mbaya
I just did a fresh dump and I realise the difference is not that drastic. The extra stuff must come from trying to edit it. Here is a fresh file from the dump... On Thursday, May 30, 2013 9:50:26 PM UTC+3, ke1g wrote: > > Can you load the file using json.load()? I.e.; is that one of the things

Re: Importing data using loaddata from exported data using dumpdata

2013-05-30 Thread Bill Freeman
Can you load the file using json.load()? I.e.; is that one of the things that you have already tried? On Thu, May 30, 2013 at 2:32 PM, Gitonga Mbaya wrote: > All you suggest I had already tried. Without indent, same result. dumping > an xml file, same thing. The only thing

Re: Importing data using loaddata from exported data using dumpdata

2013-05-30 Thread Gitonga Mbaya
All you suggest I had already tried. Without indent, same result. dumping an xml file, same thing. The only thing I didn't try was loading it in a different project. I am doing all this on Windows 7 on the same machine. On Thursday, May 30, 2013 8:57:42 PM UTC+3, ke1g wrote: > > Try again

Re: Importing data using loaddata from exported data using dumpdata

2013-05-30 Thread Bill Freeman
Try again without the indent (just for grins). Are the two systems on the same box, or did you have to transfer it over a network, or via a flash drive, or the like? If two boxes, is one Windows and the other not? (Line boundaries differ, though I would hope that the json tools would be proof

Re: current transaction is aborted, commands ignored until end of transaction block

2013-05-30 Thread Andreas Kuhne
2013/5/30 Sam Solomon > Hmm, yeah, Ryan could be onto something, but that doesn't really help > figure out the root cause (which likely was an error that existing before > upgrading but just went ignored). > > What should help get to the root issue is checking out the

Re: Importing data using loaddata from exported data using dumpdata

2013-05-30 Thread Gitonga Mbaya
Bill, These are the exact steps I follow: python manage.py dumpdata --indent=4 > fixtures/data.json python manage.py loaddata fixtures/data.json That is when I get: DeserializationError: No JSON object could be decoded I checked the json code using http://jsonlint.com/ and it was reported as

Re: Importing data using loaddata from exported data using dumpdata

2013-05-30 Thread Gitonga Mbaya
Bill, This is are the exact steps I follow: python manage.py dumpdata --indent=4 > fixtures/data.json python manage.py loaddata fixtures/data.json That is when I get: DeserializationError: No JSON object could be decoded I checked the json code using http://jsonlint.com/ and it was reported

Re: current transaction is aborted, commands ignored until end of transaction block

2013-05-30 Thread Sam Solomon
Hmm, yeah, Ryan could be onto something, but that doesn't really help figure out the root cause (which likely was an error that existing before upgrading but just went ignored). What should help get to the root issue is checking out the postgresql log file (for me:

Re: Importing data using loaddata from exported data using dumpdata

2013-05-30 Thread Bill Freeman
When you say "created from a dumpdata export", do you mean that the file has been edited since the export? If so, you have probably introduced a syntax error in the JSON. See if you can find a JSON validator site on the web, or an editor or tool that pretty prints the JSON to see if you can spot

Re: current transaction is aborted, commands ignored until end of transaction block

2013-05-30 Thread ryan west
Hi Andreas, The reason that you are seeing this likely is because of a bug in the way django handled Postgres autocommit. This has been documented here: https://docs.djangoproject.com/en/dev/releases/1.5/#behavior-of-autocommit-database-option-on-postgresql-changed Regards, Ryan On Friday,

Re: Django - Tastypie update

2013-05-30 Thread Hélio Miranda
I'm trying to use the Patch, but is giving error when sending the data: *"The format Indicated 'text / plain' had the deserialization method available. Formats Please check your `` `` and `` `` content_types on your Serializer."* I do not know why, my class this way: *class Meta:* *

Re: Django - Tastypie update

2013-05-30 Thread ryan west
Are you using a PUT request to make this change? If you are making a PUT request, as far as I know, Tastypie will attempt to replace the resource with what you are sending. If you only want to update 1 field on the resource, look at making a PATCH request. On Thursday, May 30, 2013 6:10:33 AM

Re: Using SQL or not

2013-05-30 Thread Hélio Miranda
But you can see the amount of tables and relationships? This store is for players, clubs, historical clubs and players, gaming information and Statistics of games and players in each game. But can you give me an opinion? -- You received this message because you are subscribed to the Google

Re: Using SQL or not

2013-05-30 Thread Alex Mandel
Unless you have a specific need of a NoSQL feature the fact that you have many related tables seems a better use case for SQL relational database. Enjoy, Alex On 05/30/2013 08:42 AM, Avraham Serour wrote: can't see the image properly, too small, clicking on larger doesn't load and the expand

Re: Using SQL or not

2013-05-30 Thread Avraham Serour
can't see the image properly, too small, clicking on larger doesn't load and the expand button on the right bottom corner doesn't work On Thu, May 30, 2013 at 5:42 PM, Hélio Miranda wrote: > Good! > Not sure this is the most appropriate place to put it, if not I apologize.

Re: request_finished signal not being called with Django 1.5.1 with uwsgi

2013-05-30 Thread jaap
I'm being hit by the same issue. I don't really understand why it worked with older versions of Django though? That seems to be a bug. Op vrijdag 12 april 2013 01:28:42 UTC+2 schreef Lewis Sobotkiewicz het volgende: > > So figured it out. > > Apparently Ubuntu 12.04 packages uwsgi 1.0.3 in

Using SQL or not

2013-05-30 Thread Hélio Miranda
Good! Not sure this is the most appropriate place to put it, if not I apologize. My question is as follows: I have to implement a scheme about football, all data on clubs, players and games as their statistics. The doubt I have is whether it is more advisable to do it in SQL or NoSQL as I was

Re: Importing data using loaddata from exported data using dumpdata

2013-05-30 Thread Gitonga Mbaya
I have searched high and low for a solution to this problem and nothing I could find anywhere led to a solution. On a whim I decided to type out the json file into notepad and save it as a different json file. I then tried loading that and it worked. Next I just copy pasted the contents of the

Re: SyncDb doesn't create tables in database

2013-05-30 Thread Anas
You are right ! It looks that the table has been created the first time and i didn't saw the message. Concerning the nodeid, i thought that it would be generated automatically and incremented for each new created instance , isn't it ? And i noticed also that the graph was created while the

Re: IDE django with perforce

2013-05-30 Thread Ezequiel
On Thursday, May 30, 2013 2:23:11 AM UTC-3, Aswani Kumar wrote: > > hi guys, > > we are having problem with eclipse 3.8 with pydev perforce plugins on > ubuntu 13.04 > > *problem :* after using for few days or unexpected shutdown, eclipse > stops working i mean opening. > > we need perforce with

Re: SyncDb doesn't create tables in database

2013-05-30 Thread Anas
You are right ! It looks that the table has been created the first time and i didn't saw the message. Concerning the nodeid, i thought that it would be generated automatically and incremented for each new created instance , isn't it ? Thanks for the reply On Thursday, May 30, 2013

Re: SyncDb doesn't create tables in database

2013-05-30 Thread Tom Evans
On Thu, May 30, 2013 at 1:46 PM, Anas wrote: > I am having Neo4Django in my django based application and trying to use two > databases at the sametime : Neo4j and PostGIS. So i configured settings.py > as suggested in the docs (http://neo4django.readthedocs.org) and models.py

Django - Tastypie update

2013-05-30 Thread Hélio Miranda
Hi I am using the tastypie with mongoengine, and my problem is when I edit a field in a collection, when I save, references to other collection are deleted ... Does anyone know why? I can only edit a field without changing the other? -- You received this message because you are subscribed to

RE: problem with extending django registration form

2013-05-30 Thread Babatunde Akinyanmi
Hi, Have you been able to sort out this issue? Why don't you create your own backend and shoe horn it into django-registration. You'll need to implement register, activate, registration_allowed, get_form_class, post_registration_redirect and post_activation_redirect methods (as needed) though.

SyncDb doesn't create tables in database

2013-05-30 Thread Anas
I am having Neo4Django in my django based application and trying to use two databases at the sametime : Neo4j and PostGIS. So i configured settings.py as suggested in the docs (http://neo4django.readthedocs.org) and models.py as well. When i try to run syncdb , i am getting this message

Using multiple model files per app with the Improved Multiple Model Files Django Snippet

2013-05-30 Thread Doug S
I'm trying to use multiple files for my models in a single app. I found a nice solution on Django Snippets : http://djangosnippets.org/snippets/1838/ but I'm not able to get it to work. The docs assume that I know more than I do about how this solution works. Its

SyncDb doesn't create tables

2013-05-30 Thread Anas
Hello all, I am trying to create a table in my DB using models.py and the ./manage.py syncdb command. But what i notice is that anything is being inserted even though i can run this commad : ./manage.py sqlall testapp (where testapp is my app) and get the sql that permit to create the table.

Re: django 1.5 abstractuser / accessing information of logged on user

2013-05-30 Thread tony gair
Thanks for the post Tom, I notice that the FormMixin class is from django.views.generic.edit and I am confused to how to use it so I gave it a try with #views.py class PremisesUpdateView(LoginRequiredMixin, FormMixin): form_class = PremisesForm model = Premises success_url =

Re: django 1.5 abstractuser / accessing information of logged on user

2013-05-30 Thread tony gair
Thanks for the post Tom, I notice that the FormMixin class is from django.views.generic.edit and I am confused to how to use it so I gave it a try with #views.py class PremisesUpdateView(LoginRequiredMixin, FormMixin): form_class = PremisesForm model = Premises success_url =

Re: Is it possible to add SQL comments to a query built with the ORM?

2013-05-30 Thread akaariai
There is no public API way. You can likely do this with .extra(): Object.objects.filter(Q(pub_date__lte=datetime.now)).extra(where=['1=1 / * query no. 123 */']) - Anssi On 30 touko, 12:42, Timo Josten wrote: > Hint: This is a cross-post >

Re: django 1.5 abstractuser / accessing information of logged on user

2013-05-30 Thread Tom Evans
On Thu, May 30, 2013 at 9:57 AM, tony gair wrote: > > I am using CBV / django braces for authentication. My user authorisation > model inherits abstractuser and adds a few fields which are foreign keys to > two other models organisation and premises. > > When a form

Re: input data will be lost if there are errors in the form

2013-05-30 Thread Tom Evans
On Thu, May 30, 2013 at 3:31 AM, Jeff Hsu wrote: > Hi, > > I find this very interesting. In my html template form: > > enctype="multipart/form-data"> > {% csrf_token %} > > {{ form.title.errors}} > > {{form.title}} >

Is it possible to add SQL comments to a query built with the ORM?

2013-05-30 Thread Timo Josten
Hint: This is a cross-post from http://stackoverflow.com/questions/16831162/is-it-possible-to-add-sql-comments-to-a-query-built-with-the-orm I am trying to identify slow querys in a large-scale Django 1.3 web application. As it is kind of difficult to match the raw sql query in the slow

Re: Django - Tastypie filtering by related field

2013-05-30 Thread Hélio Miranda
I still can not solve my problem. I'm a little lost not knowing what to do ... I do not know what's wrong? Nobody can help me? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it,

Re: Tastypie-mongoengine it is possible to filter

2013-05-30 Thread Hélio Miranda
I still can not solve my problem. I'm a little lost not knowing what to do ... I do not know what's wrong? Nobody can help me? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it,

Re: linking the logged in user to other models to filter query sets -( noobie )

2013-05-30 Thread Joey Chang
you just give the user object to the form object in you view handler. some like: form = HeatingUserForm(user=request.user) or if have request POST data, you could do it like this: form = HeatingUserForm(request.POST, user=request.user) then: self.user = kwargs.pop('user')

Re: linking the logged in user to other models to filter query sets -( noobie )

2013-05-30 Thread tony gair
with the line self.user = kwargs.pop('user') do I need to import anything to access that the value 'user' ? On Wednesday, 29 May 2013 15:16:32 UTC, Tom Evans wrote: > > On Wed, May 29, 2013 at 3:29 PM, tony gair > wrote: > > > > > > I've done a basic django app

django 1.5 abstractuser / accessing information of logged on user

2013-05-30 Thread tony gair
I am using CBV / django braces for authentication. My user authorisation model inherits abstractuser and adds a few fields which are foreign keys to two other models organisation and premises. When a form initialises I want to be able to examine the details of the user logged in , look to see

Re: current transaction is aborted, commands ignored until end of transaction block

2013-05-30 Thread PhilipSahli
Hi The easiest way to finding the causing error in my opinion is to execute the generated queries by hand in a psql shell. Normally I had a mismatch between model definitions and table layouts in the database. But at the end I also had a logical error with handling the transactions in the