Re: Marketplace for Django apps

2012-09-11 Thread Jorge Vargas
I agree with Jonas here. having a place were you have get apps to solve
hard problems no one has done right (ecommerce is a very good example) is a
plus.

As for it being "cancer" and bad I don't agree there is a market for
everything. And that will bring more people in which in the end is what
everyone wants.
I do agree that it should be clear that said store will be managed by a
third party and not Django itself.

On Tue, Sep 11, 2012 at 7:11 AM,  wrote:

>
>
>> I want to ask you again, what you think about such service? Would you
>> buy or sell apps (or paid support) out there and why?
>>
>>
> If the apps are more then good enough and would spare companies time and
> there are no better or equal opensource alternatives,
> then yes I do believe some people might be willing to buy apps in such a
> market place. For example there is no real outstanding e-commerce
> application for django.
>
>
> --
> 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 from this group, send email to django-users+unsubscribe@**
> googlegroups.com .
> For more options, visit this group at http://groups.google.com/**
> group/django-users?hl=en
> .
>
>

-- 
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 from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Admin: how to change the default filtering options ?

2011-02-03 Thread Jorge Vargas
Hello,
I'm having the following situation.
I got a model "signup" which has a status field (todo, done,
processing, etc.) I have an admin view for it which should show all
signups and I have a filter that will let me do filter by status.
Therefore the person processing the sigups will just click the "todo"
link and start working. I will like to eliminate this step and just
give me todo signups
This is what I have tired/discarded

1- Overrride the queryset this seems the obvious solution but the same
view should give us access to all signups. To look at the history.
2- Override the ChangeList.get_query_set() however I couldn't see a
proper place to do this
3- Modifying the links to the page provide the right QS (won't work if
people go directly to the URL and they do that a lot)
4- Some really ugly stuff like "clicking" the filter link with JS


The only decent solution I have found to this will be to modify the
queryset to add a "order by status=todo" to the SQL in the backend.
However I will really like for the ChangeList to start with a default
filter that is different from "all".

Any other suggestions?

-- 
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 from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



How long is a model validation heavy testsuite supposed to run?

2010-10-12 Thread Jorge Vargas
Hello,

I recently inherited a project that uses a lot of model validations
and is mainly just a model (we have two django apps that use it as
their backend).

The test suite currently returns

Ran 460 tests in 980.347s
That is running on a SQLite db.

Is this normal/expected behavior ? is there a way to speed this up ?

We have some custom code both for the test running and for making the
project works therefore if this not not a normal behavior I suspect
that the problem may lie in there.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Django podcasting software?

2010-08-08 Thread Jorge Vargas
Hello,

A couple of friends want to start a podcast and have come to me for the
technical side. And I will like it to be python, because I don't want to go
with podpress for that site.

I will like to know if anyone has any good/bad experiences with
http://github.com/jefftriplett/django-podcast ?

I will also like to know if the source for http://djangodose.com/is
available as open source or if they are using django-podcast
underneath.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



geodjango: installation comments.

2008-10-18 Thread Jorge Vargas

Hello, first of all I'll like to thank everyone that worked on this,
it's really cool and a lot of knowledge has been put into one place
for easy consumption.

I did found some inconsistencies on the docs I'll like to point out:
1- the different installation docs use a methodology with little
changes, probably due to being written by different people. it will be
nice to unify them into a "canonical way", for example
http://geodjango.org/docs/install.html#post-installation uses a
template_db then copy that into testdb
while http://code.djangoproject.com/wiki/GeoDjangoInstall uses a testdb

Another similar example is the wiki given permission on the spacial
tables to the "user" while the sphinx version gives them to public.

2- There should be an indication on what to put in the INSTALLED_APPS,
I was tricked to believe I had to add django.contrib.gis.admin instead
of the normal admin.
3- I had to also add GEOS_LIBRARY_PATH = '/usr/local/lib/libgeos_c.so'
to my settings.py and it was a very obscure reference to that on the
ubuntu install http://code.djangoproject.com/wiki/GeoDjangoUbuntuInstall
4- there is no reference to where to add this
http://geodjango.org/docs/install.html#add-google-projection-to-spatial-ref-sys-table,
I added it at the top of urls.py, but I don't think that's optimal for
"real apps", specially if you are going to use non-google stuff.


This are more general not really instalation stuff
5- Where can we get some sample data? is there a place where public
domain shapefiles are stored?
6- shouldn't a small sample data be distributed with the package in
order to test the install?
7- the openlayers admin eat up a lot of my CPU, it's probably due to
my old laptop (centrino 1.4 - ubuntu) is there any benchmarks on what
a real server should be? or could that be that I'm running the python
server instead of mod_python?
8- shouldn't the shapefile importer (presented at the djangocon talk)
be part of the the utils package?

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: ANN: django-morsels

2008-08-22 Thread Jorge Vargas

thanks seems interesting.

On Thu, Aug 21, 2008 at 3:19 AM, Itai Tavor <[EMAIL PROTECTED]> wrote:
>
> At first glance (and, quite possibly, second and third) django-morsels
> might look like a clone of django-chunks 
> (http://code.google.com/p/django-chunks/
> ). Both apps attempt to solve the same problem, and in fact, I wrote
> this app after seeing and trying out django-chunks (so thanks, Clint
> Ecker!). But the feature set and functions differ enough to justify
> the existence of a second implementation.
>
> These apps provide a way to store partial page content in the
> database, and manage it in the admin app, when this content is
> integrated in pages that also contain dynamic features. I always dealt
> with this using FlatPages and templatetags (custom-written for each
> new project) that included them in templates. Looking at django-
> chunks, I realized a few things:
>
> 1) The templatetags I've already written worked better, for my own
> use, than the key-based approach of django-chunks.
> 2) Using a dedicated model for this type of content made a lot of sense.
> 3) Merging this model and all those custom templatetags I already had
> into a reusable app also made sense.
> 4) I needed a name that didn't have "chunks" in it.
>
> The main features of django-morsels are:
>
> * Each morsel can be tied to a site page by specifying the page's URL
> in the morsel.
>
> * Different morsels can be used in the same page by adding arbitrary
> names to the morsel's URL.
>
> * Morsels can be inherited from higher levels in the site's URL
> hierarchy. This allows the content of a single morsel to be displayed
> in a whole site section, while being overriden by other morsels in
> specific pages within the section.
>
> * Morsels can include an optional title, which may be used to identify
> the morsel and may also be displayed in templates using the morsel.
>
> * Two custom templatetags - morsel and withmorsel - allow morsels to
> be used in various, flexible ways.
>
> * Morsels can be locked, which prevents them from being deleted. This
> is intended to prevent accidental deletion of required morsels, as
> having to explicitly unlock a morsel before deleting it should make
> the user think twice about it.
>
> * If the typogrify app (http://code.google.com/p/typogrify/) is
> installed, morsel content will be typogrified when rendered using the
> morsel templatetag.
>
> You can find django-morsels at  morsels/>.
>
> Itai
>
>
>
> >
>

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Announcing pytagram

2008-08-22 Thread Jorge Vargas

That seems nice, but have you check out sphinx's module index?
http://sphinx.pocoo.org/modindex.html
it's really a web thing but it can be printed.

On Thu, Aug 21, 2008 at 9:00 AM, Giuliani Vito Ivan
<[EMAIL PROTECTED]> wrote:
>
> Hi,
> I recently started a little project named pytagram (http://
> code.google.com/p/pytagram/) that is aimed to generate a toc-like SVG
> file for mainly python projects. I did this especially for django,
> since it has A LOT of functions sparse in various namespaces and,
> although I know what a certain function does, I can never remember to
> which namespaces belongs or how it is named (and especially in this
> crazy run against 1.0, these functions are changing very quickly so
> automating the generation could be a great help for keeping things
> updated).
>
> An example of SVG that has been generated with pytagram:
> http://zeta-puppis.com/wp-content/uploads/2008/08/django1.svg
>
> This can then be saved as pdf/eps/whatever and eventually manually
> manipulated to fit special needs. I already printed one copy and I
> have that right in front of me :)
>
> Sorry if this message doesn't strictly belongs to django but I thought
> this thing can be useful to other django-guys.
>
> --
> http://zeta-puppis.com
> >
>

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: wsgi in django for hgwebproxy

2008-08-22 Thread Jorge Vargas

On Thu, Aug 21, 2008 at 12:54 PM, Faheem Mitha <[EMAIL PROTECTED]> wrote:
>
> Hello everyone,
>
> The version control system mercurial (hg) has some functionality to allow
> its repositories to be viewed via the web. However, it does not have a
> builtin authentication system.
>
There is another approach to get this working it's what the site
freehg.org uses, I posted a mail to mercurial list a couple of days
ago with several links and other goodies.

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: prepopulate_from

2008-08-19 Thread Jorge Vargas

On Tue, Aug 19, 2008 at 12:33 AM, Daniel Roseman
<[EMAIL PROTECTED]> wrote:
>
> On Aug 19, 6:18 am, "Jorge Vargas" <[EMAIL PROTECTED]> wrote:
>> On Mon, Aug 11, 2008 at 1:26 AM, Donn <[EMAIL PROTECTED]> wrote:
>>
>> > On Monday, 11 August 2008 08:56:13 Oleg Oltar wrote:
>> >> I want to use text stored in field title to generate slugs.
>> > In the svn (> 0.96) you have to use ModelAdmin like this:
>>
>> > clas Toon(models.Model):
>> >  title = models.CharField(max_length=50)
>> >  slug = models.SlugField(db_index=True,unique=True)
>>
>> > class ToonAdmin(admin.ModelAdmin):
>> >  prepopulated_fields = {"slug": ("title",)} #sluggify the title field
>>
>> > admin.site.register(Toon, ToonAdmin)
>>
>> Since we are in the topic is there a less verbose way of doing this? I
>> have several objects (4 so far) that all share the same slug/title
>> pattern. which translates into 5 classes and 10 properties. could it
>> be a good idea to subclass Slug providing the defaults I want?
>>
>> > HTH,
>
> There's no reason not to subclass the ModelAdmin object if you want
> the same prepopulated_fields in more than one admin.
>
too much boilerplate?

> class PrepopulatedAdmin(admin.ModelAdmin):
>prepopulated_fields = {"slug": ("title",)}
>
> class ToonAdmin(PrepopulatedAdmin):
>... other declarations...
>
> class AnotherAdmin(PrepopulatedAdmin):
>  more declarations 
>
> admin.site.register(Toon, ToonAdmin)
> admin.site.register(Another, AnotherAdmin)
>
> etc.
> --
> DR.
> >
>

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: prepopulate_from

2008-08-18 Thread Jorge Vargas

On Mon, Aug 11, 2008 at 1:26 AM, Donn <[EMAIL PROTECTED]> wrote:
>
> On Monday, 11 August 2008 08:56:13 Oleg Oltar wrote:
>> I want to use text stored in field title to generate slugs.
> In the svn (> 0.96) you have to use ModelAdmin like this:
>
> clas Toon(models.Model):
>  title = models.CharField(max_length=50)
>  slug = models.SlugField(db_index=True,unique=True)
>
> class ToonAdmin(admin.ModelAdmin):
>  prepopulated_fields = {"slug": ("title",)} #sluggify the title field
>
> admin.site.register(Toon, ToonAdmin)
>
Since we are in the topic is there a less verbose way of doing this? I
have several objects (4 so far) that all share the same slug/title
pattern. which translates into 5 classes and 10 properties. could it
be a good idea to subclass Slug providing the defaults I want?

> HTH,
> \d
>
> >
>

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: mod_python vs. mod_wsgi

2008-05-06 Thread Jorge Vargas

On Tue, May 6, 2008 at 5:43 PM, Adam Fast <[EMAIL PROTECTED]> wrote:
>
>  I'll check in the panel, but I get this when going to that URL (and
>  mentioned going to the main blog to find it, it's not there either):
>
>  "Not Found
>
>  The requested URL /django-setup-improvements was not found on this
>  server.:".404 error.

yea I got that for a while, but then refesh and it went away. I guess
we caught them with their server rebooting :)
>
>
>
>
>
>  On Tue, May 6, 2008 at 4:35 PM, Bernd <[EMAIL PROTECTED]> wrote:
>  >
>  >  This is the correct link:
>  >
>  > http://blog.webfaction.com/django-setup-improvements
>  >
>  >  This feature is still available in the control panel :-)
>  >
>  >
>  >
>  >
>  >  On Tue, 2008-05-06 at 16:18 -0500, Adam Fast wrote:
>  >  > Strangely enough, this link is now dead...and it's not mentioned at
>  >  > the top of their blog either.  Maybe they pulled the plug?
>  >  >
>  >  >
>  >  >
>  >  > On Tue, May 6, 2008 at 2:45 PM, Brot <[EMAIL PROTECTED]> wrote:
>  >  > >
>  >  > >  Hello,
>  >  > >
>  >  > >  today webfaction announced (http://blog.webfaction.com/django-setup-
>  >  > >  improvements) that they have now a one-click django/mod_wsgi
>  >  > >  installer.
>  >  > >
>  >  > >  What's your opinion with mod_wsgi? Is it better than mod_python?
>  >  > >  What's the advantages/disadvantages?
>  >  > >
>  >  > >   Bernd
>  >  > >  >
>  >  > >
>  >  >
>  >  >
>  >
>  >  >
>  >
>
>  >
>

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: mod_python vs. mod_wsgi

2008-05-06 Thread Jorge Vargas

On Tue, May 6, 2008 at 3:45 PM, Brot <[EMAIL PROTECTED]> wrote:
>
>  Hello,
>
>  today webfaction announced 
> (http://blog.webfaction.com/django-setup-improvements) that they have now a 
> one-click django/mod_wsgi
>  installer.
>
>  What's your opinion with mod_wsgi? Is it better than mod_python?
>  What's the advantages/disadvantages?
they are several resources around the net with this information and in
general it is up to you.

some people say (including the webfaction post) that currently
mod_wsgi is a bit faster.

IMO it just depends on whether you are using wsgi and the support your
platform has for it.
>
>   Bernd
>  >
>

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Calling self.related_object.save() from self.save() ???

2008-04-23 Thread Jorge Vargas

On Wed, Apr 23, 2008 at 11:09 AM, Don Spaulding
<[EMAIL PROTECTED]> wrote:
>
>
>
>  On Apr 22, 11:24 pm, Malcolm Tredinnick <[EMAIL PROTECTED]>
>  wrote:
>
> > On Tue, 2008-04-22 at 13:47 -0700, Don Spaulding wrote:
>  >
>  > [...]
>  >
>  > > I try to do something like this:
>  >
>  > > order = Order()
>  > > order.save()
>  > > order.items.create(price=Decimal("5.00"))
>  > > order.total #gives me 0
>  > > order.save()
>  > > order.total #gives me the correct order.total
>  >
>  > > My guess is that even though I've saved the item before calling
>  > > order.save(), the order objects still doesn't know that the new item
>  > > is related to it.  Anybody know if this is expected behavior?
>  >
>  > Yes, it is expected. As Jorge noted, the "order" instance is a snapshot
>  > of the data at one moment in time, not a live update.
>  >
>  Thanks Malcolm and Jorge.  I didn't understand Jorge's response the
>  first couple times I read it, but now it seems a bit clearer.
>
sry for that sometimes I sound confusing.

>  I can accept that the item's self.order is stale in Item.save().  But
>  my use case is still "Every time I add an item to an order, the
>  order's total needs updated".  How can I force the order to hit the DB
>  again to find all of its (freshly) related objects?
I believe the only way is how you are doing it. now let me ask a
question why you need that? can't this be done in the controller? are
you updating the price total many times per call? why not do it all in
memory and then save ones? if you take all that out of the model and
into the controller (maybe even a function) you could do something
like this.
new_order = Order()
new_order.total = sum(new_order.items.all())
order.save()

or I'm missing something?
>
>
> >
>

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Announcing the Django Dash!

2008-04-23 Thread Jorge Vargas

I'm a bit concern about that. my main development team is composed of
3 people one back one designer and one that takes care the the first
two not killing each other. looking at the ratings it seems that if we
take one of our 3 people out then we'll lose many points. and chance
to get 3? maybe by popular demand?

On Wed, Apr 23, 2008 at 11:25 AM, Eric <[EMAIL PROTECTED]> wrote:
>
>  I see that you can have a team of two, does that include a designer?
>
>
>
>  On Apr 14, 2:31 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
>  > Jonathan,
>  >
>  > I consider those to be utility libraries (unlikely to comprise your
>  > entire app) and should be fine for use.  You may want to document what
>  > versions you will be using to package with your project/application so
>  > that the judges can replicate.
>  >
>  > Daniel
>  >
>  > On Apr 13, 7:46 pm, Jonathan Lukens <[EMAIL PROTECTED]> wrote:
>  >
>  > > What about Python libraries like PIL or ReportLab?
>  >
>  > > On Apr 11, 10:42 pm, "Daniel Lindsley" <[EMAIL PROTECTED]> wrote:
>  >
>  > > > We'd like to announce the firstDjangoDash
>  > > > (http://www.djangodash.com/) to the community.DjangoDashis a web
>  > > > application building competition forDjangodevelopers. The gist is
>  > > > that you and (optionally) one other person can form a team and have 48
>  > > > hours to crank out a fullDjangoapplication. Your application will
>  > > > then be pitted against others for bragging rights (and hopefully some
>  > > > prizes).
>  >
>  > > > ==
>  >
>  > > > What IsDjangoDash?
>  > > > A 48 hour, start-to-finish race to produce the bestDjango-based web
>  > > > application you can. Mostly for fun/bragging rights but we're working
>  > > > on upping the ante.
>  >
>  > > > Who Can Compete?
>  > > > Anyone but myself and (hopefully) three other judges, though this is
>  > > > subject to change depending on popularity.
>  >
>  > > > When Is It?
>  > > > We'll be hosting theDashon May 31 - June 1, 2008.
>  >
>  > > > Where?
>  > > > We're running this over the web, so you can be anywhere you like.
>  > > > Coffee shop, work (though we're not responsible for the ramifications
>  > > > of that one), at home, wherever you can find internet access and
>  > > > power.
>  >
>  > > > How Can I Compete?
>  > > > First, please peruse the rules and judging information 
> athttp://www.djangodash.com/. We will be opening registration for teams
>  > > > on May 3, 2008. You're not allowed to start anything but ideas and
>  > > > paper mockups until the competition begins on May 31, 2008.
>  >
>  > > > Why?
>  > > > It's a chance to test yourself and push your limits. A chance to show
>  > > > people what you're capable of. Maybe some exposure. But mostly because
>  > > > we've found competitions like this to be a lot of fun.
>  >
>  > > > ==
>  >
>  > > > More details can be found athttp://www.djangodash.com/. We will keep
>  > > > it updated as things develop. If you're interested in competing in 
> theDash, we'd appreciate if you'd fill out the mini-email form on the
>  > > > front page so we can get an idea of how many people are interested.
>  >
>  > > > How can I help out?
>  > > > TheDashis really missing two things right now. First, we'd like to
>  > > > have three fair judges signed on to help judge the apps once the
>  > > > competition is over. Second, we're looking for sponsors who can
>  > > > provide prizes as awards. No minimum/maximum dollar value is
>  > > > required/requested. More details on this can be found 
> athttp://www.djangodash.com/sponsors/.
>  >
>  > > > Thanks and hope to see some of you competing!
>  >
>  > > > Daniel Lindsley
>  > > > Toast Drivenhttp://www.toastdriven.com/
>  >
>

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: How to get ':' in address?

2008-04-22 Thread Jorge Vargas

On Tue, Apr 22, 2008 at 12:01 PM, James Aylett
<[EMAIL PROTECTED]> wrote:
>
>  On Tue, Apr 22, 2008 at 05:36:35PM +0200, Thomas Guettler wrote:
>
>  > AFAIK ':' is not allowed in a URL path.
>
>  RFC 2396 section 3.3 ("Path Component") suggests otherwise. ":" is a
>  "reserved" character in the URI spec, but that doesn't mean it must be
>  escaped in *all* components of a URI, and in particular path segments
>  (the bits between '/') may contain unescaped colons.

yes please lets keep the standards, also I see no reason for wikipedia
for using that : it's meaning is portal/arts which is give me the
portal which refers to arts.

http://en.wikipedia.org/wiki/Colon_(punctuation)

>
>  HTH,
>  James
>
>  --
>  /--\
>   James Aylett  xapian.org
>   [EMAIL PROTECTED]   uncertaintydivision.org
>
>
>
>  >
>

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Calling self.related_object.save() from self.save() ???

2008-04-22 Thread Jorge Vargas

On Tue, Apr 22, 2008 at 4:47 PM, Don Spaulding <[EMAIL PROTECTED]> wrote:
>
>  I think I must have fallen through the cracks of "nobody will ever
>  want to do *this*" when building this app.  Given the following two
>  models (simplified for clarity):
>
>  class Order(models.Model):
> total = models.DecimalField(...)
>
> def save(self):
> tmp_total = Decimal()
> for item in self.items.all():
> tmp_total += item.price
> self.total = tmp_total
> super(Order, self).save()
>
>  class Item(models.Model):
> order = models.ForeignKey(Order, related_name='items')
> price = models.DecimalField(...)
>
> def save(self):
> super(Item, self).save()
> self.order.save()
>
>  I try to do something like this:
>
>  order = Order()
>  order.save()
>  order.items.create(price=Decimal("5.00"))
>  order.total #gives me 0
>  order.save()
>  order.total #gives me the correct order.total
>
>  My guess is that even though I've saved the item before calling
>  order.save(), the order objects still doesn't know that the new item
>  is related to it.  Anybody know if this is expected behavior?
>
well you have a clean error of separation of the MVC layers, I believe
that operation should be done on the controller instead of when saving
the object.
also you may want to look at the sum() function in python, I'm sure
you can do better than that for, that cycle is so unpythonic.

the reason for the value not being updated is that your model objects
are proxy object, the real data is in the db. and it's only updated,
when needed. when you do Order() order.total = 0 (as that's the
default) after you call safe, the changes are reflected in the db, and
the order.total value is updated with it's new value. This is the
correct behavior to emulate the transactional nature of the db.

>  Thanks,
>  Don
>  >
>

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: how do designers create content

2008-04-22 Thread Jorge Vargas

On Sun, Apr 20, 2008 at 2:33 AM, lee <[EMAIL PROTECTED]> wrote:
>
>  I am new to django, but I think it is really cool. I have used other
>  web dev systems before like zope/plone and php. I am a little new to
>  the template type system of django and I was wondering how most web
>  designer create therir content when there are seperate programmers and
>  designers. Do the designers use text base editting like ultraedit or
>  or graphics based software like dreamweaver? Most of the artist I know
>  don't do much coding and are into photoshop, illustrator and
>  dreamweaver. On sites like lawrence.com where there are lots of
>  content developers do they create pages in web forms, or editors or
>  graphic packages?
>
This is what I do. it's not efficient but honestly there is no clean way.

split the site into a master/slave layout. (sorry is this sounds dumb
but some people still don't)
developer (me) starts working on the site outputting plain simple
html, h1,h2, div,etc and forms. not worrying about the master.
designer starts working on the master either photoshop or whatever.
then I sit down with the designer and start translating his stuff into
CSS/html , this is the really annoying part.
then we integrate the slave's and finish working the CSS by his/her directions.

it's really annoying and I'll love to find someone that is good with
design and can output clean xhtml + CSS but so far I haven't. :(



>
>  Lee
>  >
>

--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---