ImageField upload_to not workin

2008-11-14 Thread Javier
Hi, I've create a model: class ImagenesLugar(models.Model): archivo = models.ImageField(upload_to="imageneslugar/") texto = models.CharField(max_length=400) The thing is that when i create a new instance of this model and assign instance.archivo to a file then instance.archivo.path does

apache wsgi deployment on non-root URL and absolute URLs for the auth contrib app

2010-05-26 Thread Javier
Hi all, I'm trying to deploy my app under a non-root url (http://myserver.com/ myapp), using apache and wsgi, but I'm having troubles with the configuration of the authentication framework. When trying to log in, I get redirected to the url I defined for that in the settings file (LOGIN_URL), but

Can't post anything to django website, it says i'm spam.

2008-04-06 Thread Javier
Hi, I've been editing the DevelopersForHire page and I get a possible spam message. If i go with a proxy it says that too but adds that i've more links than the allowed max number. Also, i wanted to add a ticket about this but i got the same messages. I'm not spamming, look, I'm a human =) --~-

No "many-to-many tables for Group model" on syncdb

2007-05-14 Thread Javier
Hi, I'm creating a django proyect and when i want to add a group and the group's permission i get a "Table 'mysite.auth_group_permissions' doesn't exist" I've seen that in some tutorials, on syncdb, the output contains the following line: Creating many-to-many tables for Group model I never see

Reload a view pass X seconds

2011-05-29 Thread javier
Hi, I'm developing a django project and I want to put a chronometer in one of my pages, so pass X seconds the view will be reload again. Can anyone help me? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to d

Curso de Django

2008-09-08 Thread Javier Nievas
Buenas Os informo de que desde el 22 de septiembre al 1 de octubre se imparte en GRANADA un curso presencial de Django de 40 horas de duración. En el que se enseñan las bases para comenzar con este framework, así como su integración con Ajax. Aquí teneis el enlace: http://continua.ugr.es/data_h

Re: latitude/longitude field type

2009-03-16 Thread Javier Santana
GLatLng looks a good start: http://django-googlemap.googlecode.com/svn/trunk/geo/googlemap/models.py On Sun, Mar 15, 2009 at 11:32 PM, Sergio wrote: > > Hello, > > I'm working on field validation for latitude and longitude. I need to > validate them according to the DMS (degree, minutes, seconds

Re: per-application middleware

2009-07-07 Thread Javier Guerra
se a middleware as a decorator to a view function (and vice versa): from django.utils.decorators import decorator_from_middleware newview = decorator_from_middleware(middleware_class)(yourapp.someview) -- Javier --~--~-~--~~~---~--~~ You received this mes

Re: How to return Object ID(primary key) on new record submit?

2009-07-09 Thread Javier Guerra
On Thu, Jul 9, 2009 at 1:38 PM, Keith Pettit wrote: > I though there was something similar to doing a  "pk = obj.save()" but I > can't seem to find the right way to do it. after doing the "obj.save()", the obj will have

Re: How to execute more code after sending an HTTP response in a viewfunction?

2009-07-09 Thread Javier Guerra
) and join() methods just for this). but for multi-process Django i don't think it would work. maybe is it possible to use signals like this? i haven't checked the source, but it seems plausible to have them dispatched _after_ the request is serviced. -- Javier --~--~-~--~--

Re: How to execute more code after sending an HTTP response in a viewfunction?

2009-07-09 Thread Javier Guerra
On Thu, Jul 9, 2009 at 3:30 PM, Javier Guerra wrote: > maybe is it possible to use signals like this? i haven't checked the > source,  but it seems plausible to have them dispatched _after_ the > request is serviced. no, it doesn't work like that. also, it seems that

Re: Make three columns without violating DRY

2009-07-09 Thread Javier Guerra
%} {% include "column.html" %} {% endwith %} {% with articles.right as col_articles %} {% include "column.html" %} {% endwith %} {% with articles.center as col_articles %} {% include "column.html" %} {% endwith %} - -- Javier --~--~

Re: Model Inheritance

2009-07-09 Thread Javier Guerra
know that this will generate three DB tables.  The media and > document tables will share primary keys, with the media table defining > any fields not found in the document table. that's what the 'abstract = True' avoids -- Javier --~--~-~--~~~-

Re: Design Tools any suggestions?

2009-07-10 Thread Javier Guerra
(if any) architecture-wide design choice. -- Javier --~--~-~--~~~---~--~~ 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

Re: home page caching

2009-07-13 Thread Javier Guerra
mparable to memcached. the main hurdle is to control expiry when needed; but on simple cases (like these) can be the best way. -- Javier --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" g

Re: How to get this value

2009-07-13 Thread Javier Guerra
On Mon, Jul 13, 2009 at 4:36 PM, David wrote: > > Thanks Amit. Here is the problem that I meet. > > alerts = Alert.objects.filter((Q(dataset=dataset1) > > for eachalert in alerts: >    e_metric1 = eachalert.criteria1_metric1 try "e_metric1 = eachalert[criter

Re: home page caching

2009-07-13 Thread Javier Guerra
-- or in the urls.py: urls.py from django.views.decorators.cache import cache_page urlpatterns = ('', (r'^foo/(\d{1,2})/$', cache_page(my_view, 60 * 15)), ) -- Javier --~--~-~--~~~---~--~~ You r

Re: How to get this value

2009-07-13 Thread Javier Guerra
On Mon, Jul 13, 2009 at 5:48 PM, David wrote: > TypeError: 'Alert' object is unsubscriptable sorry, i was mixing languages. try "e_metric1 = eachalert.get (criteria1_metric1)" -- Javier --~--~-~--~~~---~--~~ You received this

Re: Style sheet not working after shifting from desktop to laptop

2009-07-14 Thread Javier Guerra
On Tue, Jul 14, 2009 at 12:08 PM, Fred Chevitarese wrote: > Use the Chrome Browser to see the source code generated by Django, and > then you can follow the css of your page. all browsers can show the page source, no need to push for any specific one (yeah, Chrome is my favorite) --

Re: New to unit testing, need advice

2009-07-15 Thread Javier Guerra
and verifying the response and effects. hope that helps, -- Javier --~--~-~--~~~---~--~~ 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

Re: New to unit testing, need advice

2009-07-16 Thread Javier Guerra
pearance of your website, quite possibly even change the whole user experience without rewriting the 'operational' code. -- Javier --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" grou

Re: Using the @login_required() decorator with #hash url's

2009-07-16 Thread Javier Guerra
x27;m redirected to /page (without the hash part). > Does anyone else have ideas of how to do something like this?  Thanks! maybe urlencode()'ing the '/page#section1' parameter? -- Javier --~--~-~--~~~---~--~~ You received this message because you a

Re: New to unit testing, need advice

2009-07-16 Thread Javier Guerra
l concepts could be alot more detached from the DB, and a thick business.py layer (with lots of tests!) would be definitely the best answer. -- Javier --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django us

Re: Using the @login_required() decorator with #hash url's

2009-07-16 Thread Javier Guerra
wser's fault, should be worked around with JavaScript -- Javier --~--~-~--~~~---~--~~ 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

Re: Using the @login_required() decorator with #hash url's

2009-07-16 Thread Javier Guerra
i understand it, the #part doesn't get _back_ to the server; but is it getting to the browser in the first place? not in the 'current url', but in the 'action' attribute of the form, (or 'href' of a link?) -- Javier --~--~-~--~~~--

Re: Graphing (Pie Chart, Bar Graphs, Line Plots, etc) in Django?

2009-07-17 Thread Javier Guerra
don't forget Flot: http://code.google.com/p/flot/ why do it in the server when you can use your user's machine? -- Javier --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" gr

Re: How to design a new website? (about apps)

2009-07-21 Thread Javier Guerra
's a lot of insights on this (don't remember who gave that talk, and i can't access youtube from work) -- Javier --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post t

Re: Using Model Object Data in views.py

2009-07-22 Thread Javier Guerra
ject into a string-like value. maybe when 'examining' it. if you simply try to access its fields, you should find them there. -- Javier --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users&

Re: IDE for Django and Ext JS

2009-07-28 Thread Javier Guerra
python code, and when i begin with the template, i fire up Quanta (the web devlopment IDE for KDE). it uses the same Kate KPart, so it still works great with Python, but adds a lot of HTML tools (previews, CSS editor, element editor, etc.) --

Re: quick question: how to have *.domainname.com url in django

2009-07-31 Thread Javier Guerra
ust write a middleware that picks the name from the original URL and stores it (or maybe the whole User object) in the request. -- Javier --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group.

Re: "join" query in Django?

2009-07-31 Thread Javier Guerra
of the SQL you want. much better is to think in terms of the data you want from the DB. -- Javier --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: quick question: how to have *.domainname.com url in django

2009-07-31 Thread Javier Guerra
ard characters in the hostname. other servers do it different. -- Javier --~--~-~--~~~---~--~~ 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

annotate() and subsets or related records

2009-08-03 Thread Javier Guerra
d how to add a column with the total number of items: Order.objects.annotate(Count('item')) but i can't count subsets of items. Is there any way to do that in the DB, or I have to do it in Python? -- Javier --~--~-~--~~~---~--~~ You received this mes

Re: annotate() and subsets or related records

2009-08-04 Thread Javier Guerra
;s the server's job to optimize it. It looks like it's doing the exact same fetches as the equivalent JOINs tks a lot -- Javier --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users"

Re: Select Table or Database based on User

2009-08-05 Thread Javier Guerra
Wojciech Gryc wrote: > Filtering by user ID each time would > be extremely wasteful, would it not? not with the right indexes. -- Javier --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users

Re: Sort by output of arbitrary method

2009-08-11 Thread Javier Guerra
On Tue, Aug 11, 2009 at 2:47 AM, Harish wrote: > s there any other way of doing this? read the whole result set and use Python sorting. -- Javier --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Djan

Re: Securing files held by FileField.

2009-08-13 Thread Javier Guerra
27;s content in the response. done! in my case, i'm using NginX, so i had to add an 'X-Accel-Redirect' with the path to the file. i think for Apache and lightttpd you do something similar, but pass an URL instead of a local path. be sure

Re: Securing files held by FileField.

2009-08-13 Thread Javier Guerra
Ben's comment is more like my step 2, but with a couple extra hoops to get to the URL. doesn't do anything for security, since in he ends serving the file with Django anyway. > Javier, could you post some example code? I'm pretty sure this is bang- > on what I want, although

Re: Is there a way to combine ifequal with ifequal/if?

2009-08-14 Thread Javier Guerra
as a filter. put the logic in the view function (or maybe in the model!) and hand a simple boolean to the template -- Javier --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group.

Re: How good is Django's MySQL driver & its unicode support?

2009-08-14 Thread Javier Guerra
27;t see any value on latin1 or other limited kludges) -- Javier --~--~-~--~~~---~--~~ 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

Re: Creating apps that can be easily migrated to subdirectories

2009-08-18 Thread Javier Guerra
plate? Is there a centralized/better/prescribed way to do > this? there shouldn't be any URL inthe templates, either use {% url ... %} for linking to views, or {{MEDIA_URL}}/relative/path for media content. -- Javier --~--~-~--~~~---~--~~ You received thi

Re: Creating apps that can be easily migrated to subdirectories

2009-08-18 Thread Javier Guerra
On Tue, Aug 18, 2009 at 1:14 PM, Sydney Weidman wrote: > > On Aug 18, 11:57 am, Javier Guerra wrote: >> On Tue, Aug 18, 2009 at 11:49 AM, Sydney Weidman wrote: >> > I'm moving some Django applications that used to be served from the >> > root of the site to

Re: displaying links based on permissions and object ownership

2009-08-20 Thread Javier Guerra
ttp://docs.djangoproject.com/en/dev/topics/auth/#authentication-data-in-templates -- Javier --~--~-~--~~~---~--~~ 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

Re: Python FOR loop syntax question

2009-08-21 Thread Javier Guerra
On Fri, Aug 21, 2009 at 2:09 PM, Joshua Russo wrote: > Why does this not work? >   >>> import decimal >   >>> tst = {'myTst': (decimal.Decimal, 0)} >   >>> for k, v in tst: >   ...  print('%s: %s' % (k, v)) use: for k,

Re: Modify the value in a row before returning through a query

2009-08-24 Thread Javier Guerra
def strippeddoamin (self): return stripdomain(self.domain) -- Javier --~--~-~--~~~---~--~~ 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@goo

Re: Modify the value in a row before returning through a query

2009-08-24 Thread Javier Guerra
On Mon, Aug 24, 2009 at 1:42 PM, Merrick wrote: >>>> url = yourmodel.objects.get(id=1) >>>> url.domain > u'http://yourdomain.com/' what does url.stripdomain() return? -- Javier --~--~-~--~~~---~--~~ You received this mess

Re: Modify the value in a row before returning through a query

2009-08-24 Thread Javier Guerra
rl.stripdomain() as a property: class ..: ... @property def stripdomain(self): . -- Javier --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, se

Re: Different DB tables for models based on object relations.

2009-08-26 Thread Javier Guerra
anted, of course, that you use appropriate indexes. Django will automatically add the most important indexes for you. -- Javier --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post

Re: invalid template tag

2009-08-27 Thread Javier Guerra
om django import template > > register template.Library() should be 'register = template.Library()' -- Javier --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this

Re: invalid template tag

2009-08-27 Thread Javier Guerra
On Thu, Aug 27, 2009 at 2:03 PM, nixon66 wrote: > register.filter(uscurrency) should be register.filter ('uscurrency', uscurrency) -- Javier --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "D

Re: Parsing / Deserializing a JSON String

2009-09-02 Thread Javier Guerra
antts"[{"rows". instead of {"gantts":[{"rows". -- Javier --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send

Re: Return FK model

2009-09-03 Thread Javier Guerra
ge to use profiles instead of table inheritance? I know the userprofiles were the only choice before there was table inheritance; but is it still the best way? -- Javier --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: QuerySet method question

2009-09-07 Thread Javier Guerra
want some data stored in the intermediate relationship table, define the intermediate model and use the 'through' parameter to the fieldtype (http://docs.djangoproject.com/en/dev/ref/models/fields/#django.db.models.ManyToManyField.through) -- Javier --~--~-~--~~~

Re: Editors of choice

2009-09-07 Thread Javier Guerra
On Mon, Sep 7, 2009 at 10:55 AM, Samuel Hopkins wrote: > Anyhow, the purpose of this email was just to ask the community what > editor(s) they preferred to use with Django. Kate and Quanta+ -- Javier --~--~-~--~~~---~--~~ You received this message becau

Re: Security: Django vs popular PHP apps?

2009-09-07 Thread Javier Guerra
ight against so much existing code as you might have to when making Drupal work as you want. Many people feel they have to code less to write their own Django-based CMS than to customize an existing one. If that's your case, you're a lot less likely to brea

Re: understsanding views

2009-09-09 Thread Javier Guerra
() to the updated object's get_absolute_url() -- Javier --~--~-~--~~~---~--~~ 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 uns

Re: How to server static media secured by Django authentication

2009-09-11 Thread Javier Guerra
esponse" freeing up Django resources. note that you can simply return that same header without waiting for this patch. the main advantage will be that it automatically uses the appropriate header for different servers. -- Javier --~--~-~--~~~---~--~~ You receiv

Re: How to define a "has-a" relationship in dJango models

2009-09-16 Thread Javier Guerra
n most cases, you want the possibility of several contacts per user, so you can use the many-to-one. the only drawback if that you get an extra step to go from user to contact: "User.contact_set.all()". if you use one-to-one, the ORM lets you skip that step and write simply "User.

Re: How to refer to a data item?

2009-09-17 Thread Javier Guerra
kinds might use 'keys and values', or 'documents', or maybe a 'forest of objects'... -- Javier --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: where to put tests?

2009-09-17 Thread Javier Guerra
ght that using a 'test' directory with an empty __ini__.py and the tests files inside that should work... -- Javier --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to th

Re: Records doesn't sometimes get upated

2009-09-21 Thread Javier Guerra
On Mon, Sep 21, 2009 at 3:29 PM, Szymon wrote: > Isn't "self" refers to existing object? only if you include it in the parameter list: class whatever: def method (self, moreparams...): ... use 'self' instance... -- Javier --~--~-~--~~-

Re: File storage: Filesystem vs Database

2009-09-22 Thread Javier Guerra
is: Store them in a the database or store them in the filesystem as > actual files? - store in the filesystem - in the view that would serve them, don't read the data, but send an "X-SendFile" header to make apache deliver it. -- Javier --~--~-~--~~

Re: File storage: Filesystem vs Database

2009-09-22 Thread Javier Rivera
t is not accessible by url as long as apache can read it. I don't know if this is enough security for your app. Javier (a different one, BTW). --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users

Re: File storage: Filesystem vs Database

2009-09-22 Thread Javier Guerra
#x27;filepathname' return resp note, i've done this with NginX (which uses 'X-Accelerate' instead of 'X-SendFile'), but i've heard it works on Apache too -- Javier --~--~-~--~~~---~--~~ You received this message because you

Re: Django + QT4

2009-09-24 Thread Javier Rivera
sed the django templates, I use direct (and ugly and dirty) Mysql queries instead of using the django ORM, so I don't know if it's going to be useful for you, but I can upload it to google code, if you desire. Best regards, Javier. --~--~-~--~~~---~--

Re: group querysets in template

2009-09-24 Thread Javier Guerra
look now 232323 > etc what i usually do is: - in the view just get all the books, ordered by author - in the template iterate over the books, with an {% ifchanged book.author %} to display the author name -- Javier --~--~-~--~~~---~--~~ You received thi

Re: are django applications portable?

2009-09-25 Thread Javier Guerra
'use from any project', not "copy to every project". for that, it has to be accessible from the python path, since it's just a couple of python modules -- Javier --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Re: Running Django on Tornado's HTTP server

2009-09-29 Thread Javier Guerra
On Tue, Sep 29, 2009 at 4:24 AM, Kenneth Gonsalves wrote: > will document after trying it in production - a zillion times faster faster than. ? flup? -- Javier --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Goo

Re: accessing dict values in a template

2009-09-29 Thread Javier Guerra
{{ element.name }} - Desc: {{ element.desc }} {% endfor %} -- Javier --~--~-~--~~~---~--~~ 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

Re: accessing dict values in a template

2009-09-29 Thread Javier Guerra
sorry, the right syntax is {% for key, element in toto.items %}    Name: {{ element.name }} - Desc: {{ element.desc }} {% endfor %} (as documented in http://docs.djangoproject.com/en/dev/ref/templates/builtins/#for ) -- Javier --~--~-~--~~~---~--~~ You

Re: Returning a file from a view

2009-10-02 Thread Javier Guerra
rking, replace the actual data copying with the right headers to make the frontend webserver deliver the file. -- Javier --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. T

Re: accessing dictionry values in templates

2009-10-09 Thread Javier Guerra
Bogdan I. Bursuc wrote: > You may consider > creating a tag or a filter for this job. or a function on the model class -- Javier --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" g

Re: Optional URL argument from model's get_absolute_url causing NoReverseMatch error

2009-10-09 Thread Javier Guerra
On Fri, Oct 9, 2009 at 8:09 AM, Aaron wrote: > What is the proper way to introduce optional arguments here? add a second line to your URL mappigs with the third argument: (r'^(?P[-\w]+)/(?P[-\w]+)/$', 'model_view'), (r'^(?P[-\w]+)/(?P[-\w]+)/(?P[-\w]+)/$&#

Re: Optional URL argument from model's get_absolute_url causing NoReverseMatch error

2009-10-09 Thread Javier Guerra
On Fri, Oct 9, 2009 at 9:38 AM, Aaron wrote: > > On Oct 9, 11:22 am, Javier Guerra wrote: >> add a second line to your URL mappigs with the third argument: >> >> (r'^(?P[-\w]+)/(?P[-\w]+)/$', 'model_view'), >> (r'^(?P[-\w]+)/(?P[-\w]+)/(?P[

Re: unable to see SQL even after DEBUG=True in settings

2009-10-16 Thread Javier Guerra
that querysets are evaluated? Meaning that you actually > access them, just create querysets. also, from the transcript you send, it's not obvious if you actually run the app in the same python process or if it's running separately and you'd want to magically see the ef

Re: Complex annotated/aggregated QuerySet ?

2009-10-16 Thread Javier Guerra
uld manage to have two fields on Objective, that return the completed and remaining task sets respectively... unfortunately, i have no idea how to do that. -- Javier --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups &q

Re: SVG and Django

2009-10-16 Thread Javier Guerra
On Fri, Oct 16, 2009 at 2:35 PM, claytonbonelli wrote: > The image file is displayed on > my html page, but the SVG file dont. maybe some mime-type configuration missing? -- Javier --~--~-~--~~~---~--~~ You received this message because you are subscri

Re: Data Looping with a Join? Perhaps ...

2009-10-19 Thread Javier Guerra
ew: mypiles = request.user.collectionuserpile_set.order_by(collection_type) in the template: {% for pile in mypiles %} {% ifchanged %} {{pile.type}} {% endifchanged %} {{pile.item}} {% endfor %} -- Javier --~--~-~--~~~---~--~~ You received this message because you ar

Re: Data Looping with a Join? Perhaps ...

2009-10-19 Thread Javier Guerra
r t in CollectionType.all()) in the template: {% for type,pile in mytypes %} {{type}} {% for item in pile %} {{item}} {% endfor %} {% endfor %} -- Javier --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "D

Re: DRY (or how can I stop repeating myself)

2009-10-20 Thread Javier Guerra
On Tue, Oct 20, 2009 at 1:47 PM, Михаил Лукин wrote: > What is your best practice in such situations? write a custom tag -- Javier --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" grou

Re: concurrency and threading question

2009-10-21 Thread Javier Guerra
tween the webapp and the background job, unless you modify either mod_wsgi or flup to spawn a thread for background processing (Graham? what would it take to add that to mod_wsgi?) -- Javier --~--~-~--~~~---~--~~ You received this message because you are subscr

Re: how to cut and paste image into django app

2009-10-23 Thread Javier Guerra
augmented with flash libraries, like the great one from http://swupload.org/) -- Javier --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-use

Re: how to cut and paste image into django app

2009-10-23 Thread Javier Guerra
gle user that could understand what it was asking, and why. and once it's disabled on a machine, it's very hard to enable again. the server doesn't have to be PHP, in fact it's usually FTP. the PHP part is mostly to set the options for the tag -- Javier --~--~---

Re: Versionable Models?

2009-10-27 Thread Javier Guerra
On Tue, Oct 27, 2009 at 1:54 PM, Todd Blanchard wrote: > I'm starting a project where some models need to be fully versioned. check django-reversion: http://code.google.com/p/django-reversion/ -- Javier --~--~-~--~~~---~--~~ You received this message

Re: I got stuck when modelling.

2009-10-28 Thread Javier Guerra
to 'self') name creation_date if a host can belong to several hostgroups simply change the foreign key from host to hostgroup to a ManyToManyKey. make sure that the 'parent' field in hostgroup is null'able, to account for 'main' groups -- Javier --~--~---

Re: static list and start server process

2009-10-29 Thread Javier Guerra
t want a database query for every request, because menu entry > list would be very low frecuency updated check http://docs.djangoproject.com/en/dev/topics/cache/#template-fragment-caching specifically the {% cache %} {% endcache %} tag -- Javier --~--~-~--~~---

Re: Filtering on model methods

2009-10-29 Thread Javier Guerra
On Thu, Oct 29, 2009 at 10:18 AM, pbzRPA wrote: > It's a pity django does not provide this kind of > functionality. hum it would be a pretty impressive feat for an ORM to take some arbitrary python code and recompile it to (portable!) SQL to make the DB do the work.

Re: GROUP results in views.py

2009-10-30 Thread Javier Guerra
On Fri, Oct 30, 2009 at 4:05 PM, TiNo wrote: > SQL's GROUP BY is made for this isn't it? no, it's not. SQL's GROUP BY discards 'individual' rows off the result, showing only 'grouping' rows. -- Javier --~--~-~--~~~---

Re: Marking usernames as not for use dynamically

2009-11-02 Thread Javier Guerra
On Mon, Nov 2, 2009 at 2:00 PM, Max Battcher wrote: > I'm rather fond of using URLs of the form: > > http://example.com/~username/ +1 -- Javier --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: render_to_response taking 50 seconds!

2009-11-02 Thread Javier Guerra
ecord to the response, roughly: template = load template response = httpresponse() for record in queryset: response.write (template.rendertostring (record) return response i'm not sure; but this might let the response object stream the data, greatly reducing ram pres

Re: Preventing JOIN while checking if a self referencing FK is null

2009-11-04 Thread Javier Guerra
what about people_with_bffs = Person.objects.filter(bbf_id__isnull=False) ? (disclaimer, i haven't tried it) -- Javier --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To pos

Re: how to achieve functionality of asynchronous popups

2009-11-10 Thread Javier Guerra
rner. maybe not the embedded chat, (that is better handled with a full Comet architecture); but the 'more messages available' notification. in this case, the query is not about messages for a user, rather it's more like 'messages about this context', where the

Re: stable sort for list views in the admin interface

2009-11-15 Thread Javier Guerra
Karen Tracey wrote: > Thus, the actual sort is done by the database. IOW, it's not about stable vs. non-stable sort algorithms, since it doesn't transform one view's data to the next. instead, both views are generated from the same data with different parameters. -- Javier

Re: Complex Query Question

2009-11-20 Thread Javier Guerra
) (i'm not sure about '|'ing the Q() objects with the queryset 'user.events_set', but i don't know how to express this as a Q() object) -- Javier -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this g

Re: OneToOne across apps

2009-11-22 Thread Javier Guerra
he tables, it makes sure to add any index that would help on the usual JOINs -- Javier -- 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

Re: Big issue serving big files through a view

2009-11-23 Thread Javier Guerra
and nginx (at least) have this capability, but using different headers. -- Javier -- 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

Re: View assistance

2009-11-25 Thread Javier Guerra
ect_id=task_id, template_object_name="task", extra_context = { 'project': project } ) -- Javier -- You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: View assistance

2009-11-25 Thread Javier Guerra
's a matter of taste -- Javier -- 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

Re: Chart tool

2009-11-25 Thread Javier Guerra
f using flot) or somebody else (if using Google charts) deal with the heavy tasks. -- Javier -- 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

Re: Returning Django objects from Ajax request

2009-12-02 Thread Javier Guerra
ment. if you use a JavaScript template (there are several jQuery plugins), just return the data in JSON. -- Javier -- 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. T

  1   2   3   4   5   6   7   >