Development of presentation editing module

2008-10-23 Thread Daniele Procida
I have sketched out an idea for an interface to apply presentation to blocks in semantic HTML content. We need a Django module that will implement this idea, and would like to find a developer or team of developers who can help refine the idea and produce a module. The work will be done accord

Logic for stylesheets

2008-12-10 Thread Daniele Procida
In a template I have: {% placeholder right-column Textarea %} I'd like the template to load stylesheetb.css rather than stylesheeta.css if that content item is empty. I guess I need some logic around the the styles listed in the , but I don't know what it should be, so I'd be grateful for a

Re: Logic for stylesheets

2008-12-10 Thread Daniele Procida
On Wed, Dec 10, 2008, CLIFFORD ILKAY <[EMAIL PROTECTED]> wrote: >In your case, you could have something like the following on that >specific page template, or if you need it for the general case, in your >base page template. > >{% block base_css %} >{% if content %} >href="/site_media/css/sty

Re: Logic for stylesheets

2008-12-10 Thread Daniele Procida
On Wed, Dec 10, 2008, Dave Dash <[EMAIL PROTECTED]> wrote: >I'm curious at what you're trying to ultimately do. > >On one of the projects I work on, we put a class on a encapsulating >div that defines future behavior: > > > > > > >and then we can do a special style for > >.no_content .content {di

Assessing Django for our web presence

2008-07-22 Thread Daniele Procida
Hi. I'm the web officer for the medical school of a large British university. We have decided to migrate our website to an Open Source content management and publishing platform, and Django is one of the systems we're investigating (Zope/Plone is another serious candidate). I visited another uni

Basic template inheritance question

2008-09-18 Thread Daniele Procida
I have a base.html template. In it I've inserted: {% block stylesheets %}{% endblock %} and in stylesheets.html in the same directory: {% extends "base.html" %} {% block stylesheets %} <--- my styles ---> {% endblock %} But the {% block stylesheets %} in st

Re: Basic template inheritance question

2008-09-18 Thread Daniele Procida
On Thu, Sep 18, 2008, Daniel Roseman <[EMAIL PROTECTED]> wrote: >On Sep 18, 8:50 am, "Daniele Procida" <[EMAIL PROTECTED]> >wrote: >> I have a base.html template. >> >> In it I've inserted: >> >>     {% block stylesheets %}{%

Re: Basic template inheritance question

2008-09-18 Thread Daniele Procida
On Thu, Sep 18, 2008, Daniel Roseman <[EMAIL PROTECTED]> wrote: >> >> I have a base.html template. >> >> >> In it I've inserted: >> >> >>     {% block stylesheets %}{% endblock %} >> >> >> and in stylesheets.html in the same directory: >> >> >>     {% extends "base.html" %} >> >>         {% block

Re: Basic template inheritance question

2008-09-18 Thread Daniele Procida
On Thu, Sep 18, 2008, Daniel Roseman <[EMAIL PROTECTED]> wrote: > >On Sep 18, 11:23 am, "Daniele Procida" <[EMAIL PROTECTED]> >wrote: >> Maybe if I explain what I'm doing it will help. >> >> Django CMS uses a base template, base.html. base.h

Re: IE Hell. Blank Page

2008-09-18 Thread Daniele Procida
On Thu, Sep 18, 2008, lingrlongr <[EMAIL PROTECTED]> wrote: >I primarily use and develop on Ubuntu and use Firefox. So I went to >check out how many bugs IE was generous enough to give me to fix. >Using the Django development server, I can connect fine from a Windows >computer and view the site

Re: IE Hell. Blank Page

2008-09-19 Thread Daniele Procida
On Thu, Sep 18, 2008, lingrlongr <[EMAIL PROTECTED]> wrote: >Thank you both. There WAS something I forgot in the . I got so >absorbed in making the the section its own block that I forgot >to close the tag. I can't count the number of times similar things have bitten me, when I have puzzled a

Django events

2008-10-15 Thread Daniele Procida
Is there a good single source of information about Django-related events (training, workshops, conferences, wahtever)? I think a calendar of such things at would be handy... Thanks, Daniele --~--~-~--~~~---~--~~ You received this me

ldapauth and TLS

2008-10-16 Thread Daniele Procida
I'm trying to get django.contrib.auth.ldapauth.LDAPBackend - from: working with our LDAP server. IWe need TLS before the server will permit us to exchange a password with it. According to the documentation, we should be able to

Re: Django events

2008-10-16 Thread Daniele Procida
On Thu, Oct 16, 2008, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: >> Is there a good single source of information about Django-related events >> (training, workshops, conferences, wahtever)? >> >> I think a calendar of such things at would >> be handy... > >Such th

Re: ldapauth and TLS

2008-10-16 Thread Daniele Procida
On Thu, Oct 16, 2008, Jeff Anderson <[EMAIL PROTECTED]> wrote: >> According to the documentation, we should be able to set LDAP_OPTIONS >> along with the other settings: >> >> ``LDAP_OPTIONS`` -- hash, python-ldap global options and their values >> {ldap.OPT_X_TLS_CACERTDIR:

Re: ldapauth and TLS

2008-10-16 Thread Daniele Procida
On Thu, Oct 16, 2008, Dj Gilcrease <[EMAIL PROTECTED]> wrote: > > LDAP_OPTIONS = 'ldap.OPT_X_TLS_DEMAND: True' >should be > LDAP_OPTIONS = {ldap.OPT_X_TLS_DEMAND: True} Sdly, that immediately crashes the server: Traceback (most recent call last): File "manage.py", line 4, in import setti

Re: ldapauth and TLS

2008-10-16 Thread Daniele Procida
On Thu, Oct 16, 2008, Dj Gilcrease <[EMAIL PROTECTED]> wrote: >LDAP_OPTIONS = {'OPT_X_TLS_DEMAND': True} I'm afraid that's not it either; nor is: LDAP_OPTIONS = {'ldap.OPT_X_TLS_DEMAND': True} Daniele --~--~-~--~~~---~--~~ You received this message because you

Re: ldapauth and TLS

2008-10-16 Thread Daniele Procida
On Thu, Oct 16, 2008, Steven Armstrong <[EMAIL PROTECTED]> wrote: >import ldap >LDAP_OPTIONS = {ldap.OPT_X_TLS_DEMAND: True} It's doesn't crash the server, but it's the same error as before: Exception Type: AttributeError Exception Value: 'dict' object has no attribute 'LDAP_OP

Re: ldapauth and TLS

2008-10-16 Thread Daniele Procida
On Thu, Oct 16, 2008, Dj Gilcrease <[EMAIL PROTECTED]> wrote: > >Where are you changing this setting? It should be in the ldapauth.py >settings section which should look something like the following, but >with your data in it > >import ldap >from django.conf import settings >from django.contrib.a

Re: ldapauth and TLS

2008-10-17 Thread Daniele Procida
On Thu, Oct 16, 2008, Daniele Procida <[EMAIL PROTECTED]> wrote: >I'm trying to get django.contrib.auth.ldapauth.LDAPBackend - from: > ><http://code.djangoproject.com/attachment/ticket/2507/ldapauth.py> > >working with our LDAP server. > >However, if we set

Skipping an item in a loop

2009-06-24 Thread Daniele Procida
I have a template in which I would like to do the following: {% for item in loop %} {% if [previous item].condition %} item.name {% endif %} {% endfor %} In other words, I want to do something with an item in the loop based on whether the *previous* item has some condition set.

Re: Skipping an item in a loop

2009-06-24 Thread Daniele Procida
On Wed, Jun 24, 2009, James Gregory wrote: >> >>> I have a template in which I would like to do the following: >> >> >>> {% for item in loop %} >> >>>     {% if [previous item].condition %} >> >>>         item.name >> >>>     {% endif %} >> >>> {% endfor %} >> >> >>> In other words, I want to do

Getting related objects

2009-06-24 Thread Daniele Procida
I have an application, with a model called Entities. I have another, with a model called NewsItem: class NewsItem(models.Model): destined_for = models.ManyToManyField( Entity, ) I can get a list of NewsItems for a particular Entity with something like: Entity.objects.al

Rendered output from a template tag

2009-06-25 Thread Daniele Procida
I created a simple_tag: def news_for_this_page(page): if page.entity_set.all(): # check page belongs to an entity first e = page.entity_set.all()[0] # first entity will be only one newslist = [] for item in e.newsitem_set.all(): # get entity's news items ne

Re: Rendered output from a template tag

2009-06-25 Thread Daniele Procida
On Thu, Jun 25, 2009, Daniel Roseman wrote: >> To do this, I think I need my function to call another template to >> render it appropriately - is that correct? >The best thing to do here is to use an 'inclusion tag' Thanks, I'm looking at that now, because the solution I came up with is also i

Two-way management of ManyToMany relationships

2009-06-26 Thread Daniele Procida
If the class People has a many-to-many relationship with the class Roles, the user can go to People Admin, and select multiple roles for each person. Is it possible to make the same relationship available in Roles, so that for each role we can select and deselct multiple Users? Thanks, Daniele

Re: Rendered output from a template tag

2009-06-26 Thread Daniele Procida
On Fri, Jun 26, 2009, Brian May wrote: >Is it possible to do the same thing with register.simple_tag, and maybe >takes_context (assuming register.simple_tag supports that)? What I used in the end was: @register.inclusion_tag('newslist.html', takes_context=True) def news_for_this_page(context):

Subject: Model Inheritance

2009-06-26 Thread Daniele Procida
Given: class Cyclist(models.Model): and: class ProfessionalCyclist (Cyclist): I can't immediately see way to make an existing Cyclist into a ProfessionalCyclist (in either Admin interface). How can this be achieved (can it be achieved)? Daniele --~--~-~--~~~--

Coding for arbitrary additional fields of a certain type

2009-06-27 Thread Daniele Procida
I am wondering what sort of coding/storage approach to take to manage contact details in a more sophisticated way. For example, one person might need: Phone (London): xxx x Phone (Edinburgh): xxx xx and another: Phone (office): xxx Phone (laboratory): xxx Phone (mobile): xxx

Weird disappearing apps issue

2009-06-27 Thread Daniele Procida
I've encountered a problem with apps that disappear from Django's view. It's happened to several of them, and has happened again just now after I managed to get them back. I was testing an app called 'research' - it appeared in the admin, and I was able to open both models there. Then I added th

Re: Weird disappearing apps issue

2009-06-28 Thread Daniele Procida
On Sat, Jun 27, 2009, Alex Gaynor wrote: >Your issue is that you have a circular import: A imports B and B imports >A.  To get around this see: http://docs.djangoproject.com/en/dev/ref/ >models/fields/#lazy-relationships Thanks, that was it. Is there some reason why Django doesn't throw up a wa

How to code for multiple sub-types of a model

2009-07-01 Thread Daniele Procida
I need to create a set of models to capture people's roles in an institution. Every person is a Person, with a name, contact details, a member of one or more departments, and so on. Some people are also Researchers, and/or Lecturers, Students and so on (there could be other categories that haven

Customised admin saving

2009-07-11 Thread Daniele Procida
I have a many-to-many relationship between two models, People and Entities (enities are departments and offices etc). Some of these relationships are managed by the user in admin, but others are implicit. For example, if the user adds John to the Laser Research Lab Administrative Office, it me

Re: Customised admin saving

2009-07-11 Thread Daniele Procida
On Sat, Jul 11, 2009, Daniel Roseman wrote: >> I think this means that I need to add a routine to my admin.py so that >> when the user hits Save, it will also manually assemble the information >> and save it for the affected models. >> >> Is that correct? If so, what is doing this called, so I c

Django and LDAP

2009-07-18 Thread Daniele Procida
Some time ago, I successfully managed to get Django LDAP authentication working. I used the patch at: Now for the life of me I can't repeat my success. Perhaps someone can remind me how I should expect this to work. If I have set up LD

Making Django ldapauth more sophisticated

2009-07-20 Thread Daniele Procida
I finally have ldapauth working now, and a user who is in our LDAP database can connect as a Django User. But it's not entirely satisfactory. Before the LDAP user becomes a Django User they have to try logging (which fails of course). Then they become a Django User, and then they can have their p

limit_choices_to

2009-08-01 Thread Daniele Procida
I am trying to set up a model. A Person has a ManyToMany relationship with Entities. One of those relationships is special - we can capture that with a ForeignKey relationship to Entity. But, I want to limit the choices for that special relationship to Entities that the person already has a rel

Re: limit_choices_to

2009-08-01 Thread Daniele Procida
On Sat, Aug 1, 2009, Ramiro Morales wrote: >If you need this for the admin app and are using Django 1.1 read about >the formfield_for_foreignkey ModelAdmin method: > >http://docs.djangoproject.com/en/dev/ref/contrib/admin/ >#django.contrib.admin.ModelAdmin.formfield_for_foreignkey > >you can wri

Logged-in user in prepopulated_fields

2009-05-26 Thread Daniele Procida
Does something exist there something along the lines of: prepopulated_fields = { "author": ([something to retrieve currently-logged-in user from authmod.User],) } Thanks, Daniele --~--~-~--~~~---~--~~ You received this message becau

Mutiple template inheritance

2009-05-28 Thread Daniele Procida
I need to create some templates that will cover a number of cases: display navigation menu: yes or no display additional info box: yes or no In other words, there are a total of four cases that need to be provided for. I understand how to use template inheritance so that a derived templ

Re: Mutiple template inheritance

2009-05-28 Thread Daniele Procida
On Thu, May 28, 2009, Masklinn wrote: >> I need to create some templates that will cover a number of cases: >> >>display navigation menu: yes or no >>display additional info box: yes or no >> >> In other words, there are a total of four cases that need to be >> provided for. >> >> I un

Tastiest show-off Django template filters

2009-06-02 Thread Daniele Procida
I'm doing a demo of some of our Django work soon. Partly, it'll be a showcase for Django. One thing I'd like to do is demonstrate Django's template filters, to show how powerful it is and how it can make a a contribution to the quality of web output. So far I have: * typogrify * humanize Are th

overriding save() for ManyToManyFields

2009-09-23 Thread Daniele Procida
My model has a save() override, in which a number of attributes (which are ManyToManyFields) need to get their values from the object's parent: def save(self): if self.parent: attribute_list = ['publishing_destinations', 'registration_enquiries', 'speakers', 'related_peopl

Re: overriding save() for ManyToManyFields

2009-09-23 Thread Daniele Procida
On Wed, Sep 23, 2009, mrts wrote: >> So, obviously I need another stage, to save the many-to-many relations >> once theo bject is saved. > >Call super(Event, self).save(), then update the many-to-many >relations. Don't I need to run some sort of save for those? Otherwise, what happens to the at

Re: overriding save() for ManyToManyFields

2009-09-24 Thread Daniele Procida
On Thu, Sep 24, 2009, mrts wrote: >So, given a obj = Referrer("foo"), updating its many-to-many field can >happen only after obj.save() returns (this is documented in >http://www.djangoproject.com/documentation/models/many_to_many/ ). > >If you are not able to call obj.save() and then manually u

Re: overriding save() for ManyToManyFields

2009-09-24 Thread Daniele Procida
On Thu, Sep 24, 2009, Daniele Procida wrote: >>So, given a obj = Referrer("foo"), updating its many-to-many field can >>happen only after obj.save() returns (this is documented in >>http://www.djangoproject.com/documentation/models/many_to_many/ ). >> >

Re: How to update a ManyToManyField in a model's custom save method

2009-09-24 Thread Daniele Procida
On Wed, Sep 23, 2009, M Godshall wrote: > >I have a Project model with a ManyToManyField called "members" to keep >track of members of a project. Whenever the model is updated, I need >to check if certain members need to be removed from or added to the >m2m field. I am trying to do exactly th

Unrelated Inline admin objects

2009-11-01 Thread Daniele Procida
Every example discussing inline admin objects invovles (naturally) models that are related to one another, for example, a books model placed inline on an authors model admin: But what if there were no relation? H

Re: Unrelated Inline admin objects

2009-11-01 Thread Daniele Procida
On Sun, Nov 1, 2009, Karen Tracey wrote: >> But what if there were no relation? How does the admin know which inline >> items belong to it? >> >> >You can't list an unrelated model inline with another. I believe you'll get >an error about no ForeignKey pointing to the parent model existing in t

Django, nginx, Passenger

2012-03-02 Thread Daniele Procida
We're having a devil of a time with our new server, which went live yesterday after two months of testing. Every so often, nginx will display a 502 gateway error page, and something like this will appear in the logs: 2012/03/02 18:05:38 [error] 29743#0: *1479 upstream prematurely closed connec

DjangoCon Europe Early Bird registration

2012-03-28 Thread Daniele Procida
Just a reminder - you only have a couple of days left to register at the Early Bird rate. Also, I challenge you to find cooler accommodation in Zürich than I have: Daniele -- You received this message because you are subscribed to

Where are the women?

2012-04-24 Thread Daniele Procida
I was looking at again with excited anticipation, and reading through the talk summaries. - and then I had a closer look at the names of this year's speakers. There are *two* women out of

Re: Where are the women?

2012-04-25 Thread Daniele Procida
On Wed, Apr 25, 2012, Hanne Moa wrote: >On 24 April 2012 16:14, Daniele Procida wrote: >> I was looking at <http://2012.djangocon.eu/schedule/> again with >excited anticipation, and reading through the talk summaries. >> There are *two* women out of the 24 or so speake

Re: Where are the women?

2012-05-21 Thread Daniele Procida
On Tue, Apr 24, 2012, Daniele Procida wrote: ><http://2012.djangocon.eu/schedule/involving-women-in-the-community/> - >and then I had a closer look at the names of this year's speakers. > >There are *two* women out of the 24 or so speakers listed, and only one >is doi

Re: Taggit fragmentation

2012-05-29 Thread Daniele Procida
On Tue, May 29, 2012, Simon Bächler wrote: >I believe that if you publish a repo and you are the main contributor >then it is your responsibility to maintain it. That seems to be asking a bit much, frankly. Don't forget that one way for Alex (or whoever) to meet the obligations you set out fo

Re: Taggit fragmentation

2012-05-29 Thread Daniele Procida
On Tue, May 29, 2012, Marcin Tustin wrote: >That's not quite right. Once you build up a reputation as the package to >have, if you don't at least hand over the project, you expose everyone to >the pain of figuring out how to either use your code, or which is best >place to get a forked version. I

Re: How to add Google Map Markers With Django Template Tags

2012-05-31 Thread Daniele Procida
On Thu, May 31, 2012, DF wrote: >Any insight on how to properly loop through items in a stored Django object >with lat, lon info and place these on a Google Map using the API would be >very appreciated. I do it like this:

Re: How to add Google Map Markers With Django Template Tags

2012-05-31 Thread Daniele Procida
On 31 May 2012, at 21:21, DF wrote: That's interesting, but mine seems like it could be less involved. This is what I attempted, which failed: http://dpaste.org/55T9x/ Well, you don't need all the other stuff I discussed, but the key thing is: given some variable (in my example it was place.si

Re: Django and PHP webhosting in Germany

2012-06-16 Thread Daniele Procida
On Sat, Jun 16, 2012, sjtirtha wrote: >can somebody recommend a good and cheap web hosting for django and >php(wordpress)? >I'm looking something below 10 ? monthly, only for small apps and blogs. have worked well for me; they are inexpensive and the support is quick

Re: Django and PHP webhosting in Germany

2012-06-17 Thread Daniele Procida
On Sun, Jun 17, 2012, Mike Ryan wrote: >Does anyone else feel that "which webhost..." questions should be politely >responded to with a link to >https://code.djangoproject.com/wiki/DjangoFriendlyWebHosts, and a request >not to post similar questions in future? Not really, it seems a perfectl

Django testing strategy

2012-10-04 Thread Daniele Procida
I have started writing my first tests, for a project that has become pretty large (several thousand lines of source code). What needs the most testing - where most of the bugs or incorrect appear emerge - are the very complex interactions between objects in the system. To me, the intuitive way

Re: Django testing strategy

2012-10-05 Thread Daniele Procida
On Thu, Oct 4, 2012, Evan Brumley wrote: >django-dynamic-fixture can also help a lot in this situation: >http://paulocheque.github.com/django-dynamic-fixture/ > >Certainly beats having to futz around with fixtures. Thanks - there seem to be a lot of tools to generate test data in various ways,

Re: Django testing strategy

2012-10-10 Thread Daniele Procida
On Thu, Oct 4, 2012, Daniele Procida wrote: >I have started writing my first tests, for a project that has become >pretty large (several thousand lines of source code). >I'd appreciate any advice. Many thanks for the advice and suggestions. This is what I have produced s

Better feedback for admin users

2012-10-16 Thread Daniele Procida
I am starting to customise the admin classes for my models so that I can provide extra feedback to the user. For example I want to report - in the admin page - useful information about how the system will interpret the current state of the object being edited. I'm doing this by using readonly

Re: Better feedback for admin users

2012-10-19 Thread Daniele Procida
On Thu, Oct 18, 2012, Marc Aymerich wrote: >On Wed, Oct 17, 2012 at 12:21 AM, Daniele Procida wrote: >> I am starting to customise the admin classes for my models so that I >can provide extra feedback to the user. >> >> For example I want to report - in the admin p

Calculated attributes of ModelAdmin classes

2012-10-19 Thread Daniele Procida
I have a ModelAdmin class. Sometimes, I want it to include a certain field in the fieldsets, and sometimes I don't (whether it does or not would be the result of a calculation on the instance that is being edited in the admin). How can I make the fieldsets attribute a calculated value, calcul

Tests tutorial for djangoproject.com

2012-11-07 Thread Daniele Procida
I have done some work on writing up a tutorial for testing (part 5 of the existing tutorial, in effect). My draft so far: I'd really appreciate feedback, on any aspect (accuracy, style, terminology, good p

Database management commands

2011-10-27 Thread Daniele Procida
I keep getting errors like this: _mysql_exceptions.OperationalError: (1005, "Can't create table 'arkestra_medic_dev.#sql-51b_4a8' (errno: 150)") when running database management commands (syncdb, south migrate). Sometimes those commands work, sometimes they don't; it happens across a variety o

Re: Database management commands

2011-10-27 Thread Daniele Procida
On Thu, Oct 27, 2011, Tom Evans wrote: >On Thu, Oct 27, 2011 at 12:33 PM, Daniele Procida wrote: >> I keep getting errors like this: >> >> _mysql_exceptions.OperationalError: (1005, "Can't create table >'arkestra_medic_dev.#sql-51b_4a8' (errno: 1

Re: Database management commands

2011-10-28 Thread Daniele Procida
On Fri, Oct 28, 2011, Russell Keith-Magee wrote: >On Fri, Oct 28, 2011 at 12:49 AM, Leonardo Giordani > wrote: >> This is a problem related to Innodb and MyISAM. Django uses this >> latter, > >Incorrect. Django doesn't have any built in preference for InnoDB or >MyISAM -- it uses the system defau

Django and its MySQL databases

2011-11-23 Thread Daniele Procida
My old database's tables were MyISAM. On my new server, MySQL by default uses InnoDB, which I understand is preferable. However, when I ask Django tp a new table, on a database on the new server (which still contains lots of MyISAM tables imported from the old database) it creates them with for

DjangoCon Europe 2013 call for papers

2012-12-11 Thread Daniele Procida
DjangoCon Europe http://2013.djangocon.eu will be held in Warsaw from the 15th-19th May 2013 (three days of talks followed by two of sprints and workshops). The organisers are very pleased to invite members of the Django community to submit their talk proposals for the event. We're looking for

Don't be afraid to commit - a free Python/Django workshop (Cardiff, UK)

2013-01-11 Thread Daniele Procida
I have made a combined talk/workshop proposal for DjangoCon Europe in May (all proposals at ). I want to run the workshop part a couple of times before taking it to Warsaw (assuming the proposal is accepted, but it's worth doing anyway). The workshop is free and

Custom jQuery in admin

2013-01-11 Thread Daniele Procida
I had a custom widget, which broke after some other things were updated. It was saying: TypeError: 'undefined' is not a function (evaluating '$('#id_conta cts_and_people-phonecontact-content_type-object_id-0-label').combo box()') Last night, I finally managed to fix it, after noticin

"Add another [inline item]" and custom widgets with JavaScript

2013-01-24 Thread Daniele Procida
I work with a rather complex autocomplete widget for admin that works with generic foreign keys (select the content type, then you can do an autcomplete search for the item). The problem is that it breaks when you "Add another [inline item]" in the admin - the issue raised in

Share an apartment in Warsaw for DjangCon Europe

2013-02-01 Thread Daniele Procida
I am hoping to go to DjangoCon in May, arriving 14th departing 19th or 20th after the sprints. Finances are tight - I am looking into apartments, which might be cheaper and more comfortable than a hotel. If anyone else is doing the same and would like to share, please drop me a line. Thanks,

Re: On the fly image resize

2013-02-04 Thread Daniele Procida
On Sat, Feb 2, 2013, nYmo wrote: >I'm new to django and also python but have already some programming >experience. I'm currently creating my first application in django and get >stucked because I'm looking for the best way to resize uploaded images. >I'm already so far that I can upload/delete/

Django Form Designer

2013-03-07 Thread Daniele Procida
I like and use Django Form Designer, , but it hasn't been updated for a while and needs some work. For example, it needs better docs and tests, while there are a number of outstanding pull requests. I'm hoping to hear back from Samuel Luescher,

Django Inspector - Inspects and reports on Django sites

2013-04-15 Thread Daniele Procida
If like me you're responsible for a large and sprawling site, maintained by several dozen users, and you feel you don't know enough about what's going on in it you might find useful. I discovered a few interesting things the first time I ran it, incl

Re: cant syncdb with postgresql

2013-04-25 Thread Daniele Procida
On Thu, Apr 25, 2013, Pedro Silva wrote: >I cant sync db with heroku postgresql, with sqllite works great. >Can anybody help me? >requeriments: >Django==1.4.5 >PIL==1.1.7 >distribute==0.6.36 >dj-database-url==0.2.1 >django-db-log==2.2.1 >django-log-file-viewer==0.4 >psycopg2==2.5 >virtualenv==1.9

Re: cant syncdb with postgresql

2013-04-25 Thread Daniele Procida
On Thu, Apr 25, 2013, Pedro Silva wrote: >installed apps: >'django.contrib.auth', >'django.contrib.contenttypes', >'django.contrib.sessions', >'django.contrib.messages', >'django.contrib.staticfiles', >'django.contrib.admin', >'django.contrib.admindocs', >'psycopg2

Python/Django DevOps community and resources

2013-05-20 Thread Daniele Procida
Hi folks. I've just got back from the most astounding DjangoCon Europe in Warsaw, where several of decided that the DevOps in the community needed more mutual support. So, we've set up #django-devops on irc.freenode.net, and for an email list. Do

IdeaScale-alike DJango applications

2013-05-22 Thread Daniele Procida
Are there any Django applications that do the same thing as ? IdeaScale basically seems to be a way for users to submit proposals, and have them voted up and down by other users; like polls, but in a web 2.1beta kind of way. It's something I've been asked about. Any sug

Re: IdeaScale-alike DJango applications

2013-05-23 Thread Daniele Procida
On Thu, May 23, 2013, Russell Keith-Magee wrote: >On Wed, May 22, 2013 at 6:53 PM, Daniele Procida wrote: > >> Are there any Django applications that do the same thing as < >> http://ideascale.com>? >> >> IdeaScale basically seems to be a way for users t

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 at

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

2013-05-31 Thread Daniele Procida
On Fri, May 31, 2013, Rahul Ramesh wrote: >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. I don't think that a recording of it would work well, b

Friendly browsing through categories

2013-06-03 Thread Daniele Procida
I am developing an application (for managing a variety of learning/training resources) each of which is catalogued in various ways - type, audience, topic(s), domain(s), cost, and so on. I have the Django application's models and structures built, and I have begun populating it with data, I'd l

.filter() and .exclude() don't add up

2013-07-26 Thread Daniele Procida
How is this possible? # we start with a queryset actual_events # get forthcoming_events using filter() forthcoming_events = actual_events.filter( Q(single_day_event = True, date__gte = datetime.now()) | \ Q(single_day_event = False, end_date__gte = datetime.now()) ) # get previous

Re: .filter() and .exclude() don't add up

2013-07-26 Thread Daniele Procida
On Fri, Jul 26, 2013, Steve McConville wrote: >Firstly (and I don't think this is the cause of the problem) you're >calling datetime.now() four times, which will give you four different >datetimes (ie. the queries will not be completely identical). Good point, I will address that. > Secondly >S

Re: .filter() and .exclude() don't add up

2013-07-27 Thread Daniele Procida
On Fri, Jul 26, 2013, Bill Freeman wrote: >You really should figure out which record isn't showing up in either sub >case and look at it in detail to see if NULLs are involved before you spend >time trying to fix a problem that you don't have. > >You could, for example collect all the ids from th

Re: .filter() and .exclude() don't add up

2013-07-27 Thread Daniele Procida
On Fri, Jul 26, 2013, Steve McConville wrote: >> So, if one of the fields can be Null, then *neither*: >> >> queryset.filter(field=value) >> >> queryset.exclude(field=value) >> >> will match a record where it's Null? > >As I understand it, this is correct - it's certainly the way SQL was

Re: .filter() and .exclude() don't add up

2013-07-28 Thread Daniele Procida
On Sat, Jul 27, 2013, Steve McConville wrote: >Perhaps I'm not sure exactly what you mean by "more general", but I >was recommending something like > >red_things = queryset.filter(Q(color="red")) >non_red_things = queryset.filter(~Q(color="red") | Q(color__isnull=True) > >This will produce SQL li

Re: .filter() and .exclude() don't add up

2013-07-30 Thread Daniele Procida
On Mon, Jul 29, 2013, akaariai wrote: >> I understood that part. But by "more general" I mean one that will work >> for any case, without having to know where the Nulls might be. >> >> So given queryset A, and its subset queryset B, we can place B against A >> and obtain its complement. >> >>

Ordering a queryset on a reverse foreign key's attribute

2013-08-01 Thread Daniele Procida
I have an Event model: class Event(Model): parent = models.ForeignKey('self', related_name='children') date = models.DateField() My question is: given a queryset of this model, how can I order it based on the Events' children's dates so that (say) Events with child Events wit

Re: Ordering a queryset on a reverse foreign key's attribute

2013-08-01 Thread Daniele Procida
On Thu, Aug 1, 2013, Simon Charette wrote: >>From a quick look I'd also expect `order_by('-children__date')` to work. > >Can you provide the generated SQL query and some results? I have in fact raised a ticket about this which shows the generated se

Cardiff Django users group

2013-09-28 Thread Daniele Procida
I'm starting a user group for Django developers in Cardiff, Wales. Email list: The plan is to hold meetings monthly, probably on a Wednesday evening with occasional events on weekends. I'm trying to get a suitable venue with good wireles

PyCons in Africa

2013-10-04 Thread Daniele Procida
First of all, apologies if you have to read this more than once because of the cross-posting. I've had an idea brewing recently. I went to meet Professor Judith Hall this afternoon to talk about it. She's involved with http://medicine.cardiff.ac.uk/mothers-africa/ (amongst other things) and is

Re: PyCons in Africa

2013-10-06 Thread Daniele Procida
On Fri, Oct 4, 2013, Nigel Legg wrote: >I have lived in both Zambia and Kenya, and have family in Zambia. Bongo >Hive in Lusaka may be a good place to start (they are on twitter). I >haven't been there for more than five years, but would be interested in >getting involved in some way, time and w

Re: Please suggest me best e-tutorial for Django framework.

2013-10-17 Thread Daniele Procida
On Thu, Oct 17, 2013, rush wrote: >http://www.djangobook.com/ is also a good choice. I would not recommend that actually. It's very out of date. Even the book itself says: "we ask that, at this time, djangobook.com not be used for educational purposes." On the other hand, if people woud like

Complex query reduction

2013-11-01 Thread Daniele Procida
I have been exploring a rather complex query: # get all the MPTT descendants of entity entities = entity.get_descendants() # get all the Researchers in these Entities researchers = Researcher.objects.filter(person__member_of__entity__in=entities) # get all the BibliographicRecords for these Re

  1   2   >