Re: IDE django with perforce

2013-05-29 Thread kamta singh
sorry yr,from beginning i am using pycharm On Thu, May 30, 2013 at 11:08 AM, Avnesh Shakya wrote: > Try Pycharm, but use always eclipse. eclipse is better than it. > Regards, > Avnesh Shakya > > > On Thu, May 30, 2013 at 10:53 AM, Aswani Kumar wrote:

Re: IDE django with perforce

2013-05-29 Thread Avnesh Shakya
Try Pycharm, but use always eclipse. eclipse is better than it. Regards, Avnesh Shakya On Thu, May 30, 2013 at 10:53 AM, 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

Re: IDE django with perforce

2013-05-29 Thread kamta singh
use pycharm On Thu, May 30, 2013 at 10:53 AM, 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. >

IDE django with perforce

2013-05-29 Thread Aswani Kumar
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 django, can any one tell me whats the best ide for django with integrated

Re: Scripts to update Django tables

2013-05-29 Thread Mike Dewhirst
On 30/05/2013 12:01am, Brian wrote: I'm new to Django (and frameworks in general) and having an issue with a project I'm working on. Basically, I want to scrape data from a sports league website on a regular schedule and add updated stats into my database. I think the way you have described

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

2013-05-29 Thread Jeff Hsu
Hi, I find this very interesting. In my html template form: {% csrf_token %} {{ form.title.errors}} *{{form.title}}* . This is fine, and it will show the previous inputs if there are errors in the form, however, if I try to

Please ,How to pass request.user to wizard form field?

2013-05-29 Thread amoypeople
sorry ,please forgive me my poor english. I customize a FriendMultiplySelectedField which inherited from forms.ModelMultipleChoiceField , to query a list friend for choice . when I added __init__ function in form to accept request.usr and then pass it to FriendMultiplySelectedField. i

Re: ORM Prefetch related and only()

2013-05-29 Thread Àlex Pérez
As you say the raw sql always is the solution. But I take a few time to think how that could be possible with the ORM, and like akaariai says the prefetch_related get the values for de _default_manager. But if i defined a temporally manager that makes the only clausure it works, but i don't know

Re: ORM Prefetch related and only()

2013-05-29 Thread Christophe Pettus
On May 29, 2013, at 12:44 PM, Àlex Pérez wrote: > You know the way to simulate the behaviour that i want.? Raw SQL. At the point you are doing a multi-join query and selecting a subset of the fields to be returned, you probably should switch to raw SQL anyway. -- -- Christophe Pettus

Re: ORM Prefetch related and only()

2013-05-29 Thread Àlex Pérez
Ok thank's!!! but you thinks thats the normal behaviour? this could be included in future versions of the orm? You know the way to simulate the behaviour that i want.? 2013/5/29 akaariai > There is no way to alter the behavior of prefetch_related. It fetches > the related

ANNOUNCE: django-modelqueryform

2013-05-29 Thread C. Kirby
I've just placed django-modelqueryform on github http://github.com/ckirby/django-modelqueryform and PyPi. django-modelqueryform is a project that allows users to build somewhat complex queries against a model tree. It can help with complex user

Re: ORM Prefetch related and only()

2013-05-29 Thread akaariai
There is no way to alter the behavior of prefetch_related. It fetches the related objects with the query defined by the related manager and that's it. - Anssi On 29 touko, 19:40, Àlex Pérez wrote: > I want to know if there is a way that the query that is executed to get

Re: Admin for proxy model for custom User

2013-05-29 Thread Andres Osinski
I omitted the code from the sample, but I do have that. The issue seems to be that when the admin page loads, it's neither hitting the deafault get_queryset() method in the ModelAdmin, not hitting the proxy model's default manager methods. This is likely to be a bug. On Tue, May 28, 2013 at 11:35

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

2013-05-29 Thread C. Kirby
Not knowing the specifics of your UserAccount model I will assume it has an organization = ForeignKeyField(Organization) In that case in your view you can just do: user_organization = request.user.organization and use that to filter the query On Wednesday, May 29, 2013 10:45:54 AM UTC-5, tony

ORM Prefetch related and only()

2013-05-29 Thread Àlex Pérez
I want to know if there is a way that the query that is executed to get the prefetch related information can get only certains values, actually that only works for select_related, May be i have done something wrong but the prefetch_related query is getting all the fields of the model. Someone

Re: Allow visitor to add a form to a formset

2013-05-29 Thread Cody Scott
My issue was that I was putting my form_name in the cp['form_name-TOTAL_FORMS'] and it is always just form. -- 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, send an email to

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

2013-05-29 Thread tony gair
I think my first post was a bit messy and I left some information out I have an organisation as a foreign key contained in my abstact user object which is Heating_User. The premises also contains the organisation as a foreign key. What I am looking to do on my premises view is to filter the

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

2013-05-29 Thread Tom Evans
On Wed, May 29, 2013 at 3:29 PM, tony gair wrote: > > > I've done a basic django app with a user which contains an organisation and > premises foreign key inside the user model which has been inherited using > the features of django 1.5. > > I use the organisation id and

Re: Scripts to update Django tables

2013-05-29 Thread Tom Evans
On Wed, May 29, 2013 at 3:01 PM, Brian wrote: > I'm new to Django (and frameworks in general) and having an issue with a > project I'm working on. Basically, I want to scrape data from a sports > league website on a regular schedule and add updated stats into my database. > All

Re: Scripts to update Django tables

2013-05-29 Thread C. Kirby
Django models instances are python objects and are manipulated as such. Lets say you had a model: def Game(Model): team1 = TextField() team2 = TextField() date = DateField() location = TextField() In order to create new model instances and save them to a database you would do:

Re: Scripts to update Django tables

2013-05-29 Thread Avraham Serour
add your script to celery and make the necessary imports so the script can use your model just like you did in manage shell take a look at http://stackoverflow.com/questions/1310495/running-a-python-script-outside-of-django but in this case I suggest not creating a subcommand as the first answer

Re: Allow visitor to add a form to a formset

2013-05-29 Thread C. Kirby
It's actually not the most straightforward process. Here is a jquery plugin that will help you: http://code.google.com/p/django-dynamic-formset/ And here is a way to do it via POST without using javascript: http://brantsteen.com/blog/django-adding-inline-formset-rows-without-javascript/ On

Allow visitor to add a form to a formset

2013-05-29 Thread Cody Scott
I have a form with one field for emails. I would like to allow the visitor to add another email field. What do I need to do to allow the user to create another form? #following the docshttps://docs.djangoproject.com/en/1.5/topics/forms/formsets/#adding-additional-fields-to-a-formset#I don't

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

2013-05-29 Thread tony gair
I've done a basic django app with a user which contains an organisation and premises foreign key inside the user model which has been inherited using the features of django 1.5. I use the organisation id and premises id inside other models which I would like to present themselves providing

Re: No module named wsgi

2013-05-29 Thread Lunga Baliwe
Thanks for your replying, am only seeing your reply now. On Thu, May 23, 2013 at 7:49 PM, Sandeep kaur wrote: > On Thu, May 23, 2013 at 8:29 PM, Luggaz wrote: > > I don't know what I dd but it seems to work now! > > > mod wsgi installation could have

Scripts to update Django tables

2013-05-29 Thread Brian
I'm new to Django (and frameworks in general) and having an issue with a project I'm working on. Basically, I want to scrape data from a sports league website on a regular schedule and add updated stats into my database. All of the Django tutorials for models I've looked at seem to give me

Dump LineString GEOM to Point GEOM (One Model To Another)

2013-05-29 Thread kpurdon
Is it possible, outside of using a raw SQL query (PostGIS/PostgreSQL) to do a GEOM dump. I have a table (model) where 1 row is 1 LineString and I need to dump that table into another table (model) where 1 row is 1 point from the LineString. Raw SQL would be something like: SELECT geom AS

Tastypie-mongoengine it is possible to filter

2013-05-29 Thread Hélio Miranda
I am using in my application Tastypie-mongoengine, and was trying to do a filter on a field with ReferenceListField, is this possible? Is that here: http://django-tastypie-mongoengine.readthedocs.org/en/latest/usage.html I find nothing I was trying to use it in my class goal: filtering = {

Make a raw_id_fields input textbox wider

2013-05-29 Thread Victor
*SORRY My previous message was incomplete *** I'm trying to make the input textbox of a raw_id_fields wider than the default size but without success. Here is what I tried ('codarticolo' is the raw_id_fields): admin.py . class MovimentomagInline(admin.TabularInline):

Make a raw_id_fields input textbox wider

2013-05-29 Thread Victor
I'm trying to make the input textbox of a raw_id_fields wider than the default size but without success. Here is what I tried ('codarticolo' is the raw_id_fields): admin.py . class MovimentomagInline(admin.TabularInline): formfield_overrides = { models.CharField:

Re: Selecting site in admin

2013-05-29 Thread Amirouche Boubekki
Use groups maybe this can help http://stackoverflow.com/questions/8392780/django-admin-group-permissions-to-edit-or-view-models 2013/5/28 Mário Neto > Do you can this in your template > > > 2013/5/28 Victor > >> As a newbye I'm happily using admin. >>

Re: django database cache for longtime?

2013-05-29 Thread Gonzalo Delgado
El 28/05/13 20:04, kase escribió: > i need cache a page where i'm process a lot information > > and i dont wish process again > and i dont wish keep in memory RAM, (maybe nobody ever review) > > so i wish put this page in a database cache but what can i do for never > expire? You want to use

Tastypie Advanced Filtering

2013-05-29 Thread Hélio Miranda
I am new to using django and tastypie. And I'm trying to make a filter to know how many players belong to a club, sending the id of the club, where the field in question has a relation to the collection Club I'm trying this: Código (Python): class PlayerResource(resources.MongoEngineResource):

Re: Object Lookup after Save

2013-05-29 Thread Martin J. Laubach
Well, that is what repeatable read is supposed to do -- once you do a Foo.objects.all() (or whatever) query, re-running the query will give you the same result. That's why it's called repeatable read. You have to either start a new transaction to break that visibility barrier or not use