Re: template designer needed

2011-10-05 Thread David Koblas

Have you considered 99designs?

--david

On 10/5/11 7:38 AM, ApogeeGMail wrote:

Good Morning:

I am looking for a Django template designer for a very short project. 
I will need 5 pages, the design is done( using Photoshop).


I will need a set of templates to implement the layouts. I will 
provide the graphic elements.


Please contact me off list.

Thanks.

Richard Smith

mailto:apogeedevelopm...@gmail.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 
django-users+unsubscr...@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.



Re: Chat application in Django

2010-09-01 Thread David Koblas

 Two challenges with long polling and Apache/mod_python -

* First is that you'll need to have N-user connections open at a minimum 
based on the number of users you have using the system simultaneously.  
Thus your memory footprint and performance is going to suffer as the 
number of users increases.


* Second - the demo app I have assumes a single process model for 
handling communications (e.g. all notification is done via callbacks).  
So you would need to build some kind of server who maintains state if 
you ran things under apache (multi-process dispatch model).


--david


On 8/31/10 10:33 PM, Shamail Tayyab wrote:

Hi,

@Jeff, Erlang! Pretty surprised to see that.
@Alexander, doesn't work :( - or might be I am not able to get it..
@David, cool I'll try this, but will this work using mod_python / Apache?
@ebry1,
Imagine 1 people live chatting, that means 1 requests per
second, but in real world, only 3000 messages might have been
delivered. (as example). Polling will bring your net throughput of the
server to almost one tenth.

@all,
Can you suggest me the side effects of using Sockets via 1x1px flash
applet embedded on the page? Apart from the fact that flash is
required.

Thanks

On Wed, Sep 1, 2010 at 5:23 AM, ebry1  wrote:

I am interested in this problem too, I need to pass some additional
data along side chat messages.

Why did you decide to abandon polling?  I was thinking of thinking of
using it and updating about twice a second.



On Aug 31, 6:34 am, Shamail Tayyab  wrote:

Hi,

I am working on a chat application in Django, how can I ensure that I
do not have to poll the server for any chat data.

Possible approaches that I've been to:

1. BAD - use polling.

2. Use long polling - bad approach afa browser support is concerned.

3. Using sockets in flash - makes the application flash dependent.

Is there some good way to do this? Or if there is something Django
specific? Something like HTTPBinding or any 3rd party tested libraries?
I am expected to provide support till IE6. :-(

Correct me if I am wrong, flash is available on 95% of the systems, this
approach looks like safest bet, is it good to go?

Btw, how does Gmail and FB chat works?

Thanks

--
Shamail Tayyab
Blog:http://shamail.in/blog

--
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.







--
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.



Re: Chat application in Django

2010-08-31 Thread David Koblas

 Funny you should ask --

The basic challenge with any chat application is the long polling bit, 
django by default isn't really designed to handle that.  Other servers 
(Tornado, etc.) are much better at handling the long polling cycle that 
typical web chat applications require.


I was just finishing an exploration of Django+Tornado -- building a chat 
application -- which I've now pushed up to github.


http://github.com/koblas/django-on-tornado

The only "trick" at the moment is that a response that is returned via 
the async Tornado handler isn't passed back up the middleware stack, 
pondering good ways to deal with that.  But in the mean time, here's a 
functional chat application to play with if you're interested.


--koblas

On 8/31/10 4:34 AM, Shamail Tayyab wrote:

Hi,

  I am working on a chat application in Django, how can I ensure that 
I do not have to poll the server for any chat data.


Possible approaches that I've been to:

1. BAD - use polling.

2. Use long polling - bad approach afa browser support is concerned.

3. Using sockets in flash - makes the application flash dependent.

Is there some good way to do this? Or if there is something Django 
specific? Something like HTTPBinding or any 3rd party tested libraries?

I am expected to provide support till IE6. :-(

Correct me if I am wrong, flash is available on 95% of the systems, 
this approach looks like safest bet, is it good to go?


Btw, how does Gmail and FB chat works?

Thanks

--
Shamail Tayyab
Blog: http://shamail.in/blog



--
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.



fcgi vs. manage.py runserver and URI handling

2010-08-24 Thread David Koblas
 I've got a production and a dev instance of my system, what I'm seeing 
is the following.


For the URL:
/tags/Cell%20Tower
and the urls.py rule of:
 url(r'^tags/(?P.*)', 'tags', name='tags'),

In the lighttpd proxying to a port on ./manage.py runserver  I get
tag = Cell Tower
When I run this in "production" [lighttpd fcgi] I get:
tag = Cell%20Tower

Is this a bug in how I've got lighttpd configured or a bug in the fcgi 
handling, or a bug in the django interface to fcgi?  Or something 
completely different?


Or maybe something completely different.

--
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.



Re: Is {% cycle ... as ... %} supposed to output a value?

2010-07-07 Thread David Koblas
 As somebody who ran across this bug a few weeks ago (using comment to 
capture the output).  I _really_ wish the behavior would die.


Personally I would be in favor of dropping output when there is an "as" 
attribute, if somebody depends on it in the 1.3 timeframe there could be 
a setting that was enabled to support the legacy behavior.


from django.template.defaulttags import cycle
cycle.ALWAYS_OUTPUT = True

Or some other evil bit, to allow the "few" people who depend on the 
legacy behavior to have access and the rest of us to move forward.



On 7/7/10 9:51 AM, David De La Harpe Golden wrote:

On 07/07/10 17:27, Bill Freeman wrote:

I agree that the "as" clause makes me expect it to render nothing, but it
has worked this way at least back to 1.0, so I guess changing it is not
an option.

hypothetical, could add an "only" clause maybe to preserve backward compat?

{% cycle 'odd' 'even' as somevar only %}

Though that breaks regularity of "as"-using tags. Up to the django guys
I suppose. Ho hum.



--
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.



proposal: subclass generation of forms

2010-05-07 Thread David Koblas

[Not quite sure where the right place is to post this]

The general problem is that I would like to change the default output of 
forms across my site to have a consistent presentation that isn't of one 
as_p(), as_table(), or as_ul().   What I wanted to do was to add a quick 
function as_div() as a mixin helper class that would give me standard 
output across all of the forms on my site.


The challenge - Forms allow for some level of customization, but only 
via the self._html_output(...) operation, turns out that when you dig 
into this you run into two problems.


  1. The only way to create forms is with formatted print specifiers,
 which don't allow for "optional" tag generation based on
 information availability (e.g. errors, help)
  2. If you wanted to create your own _html_output() method -- via
 cut-n-paste -- you quickly discover that class BoundForm() is not
 exported from django.forms.  Which means that you now need to
 cut-n-paste that out as well.

Proposal -  Allow for the extension (mixin) of the forms via the 
following methods:


def _gen_normal(self, normal_row, **kwargs) :
return normal_row % kwargs
def _gen_error(self, error_row, toperrors) :
return error_row % force_unicode(toperrors))

.. inside _html_output(...) change the formated prints to things like ..

  output.append(self._gen_normal(errors=force_unicode(bf_errors),
   label= force_unicode(label),
   field= unicode(bf),
   help_text= help_text,
   html_class_attr= 
html_class_attr))


  output.insert(0, self._gen_error(error_row,  top_errors))

That way if you wanted to have custom output for a form you could write 
something like:


def _gen_normal(self, **kwargs) :
parts = [
u'' % kwargs,
 u'%(label)s%(errors)s%(field)s' % kwargs,
]
if kwargs['help_text'] :
parts.append('%s' % 
kwargs['help_text'])

parts.append('')
return ''.join(parts)

--
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.



Re: propagating values up the template chain

2010-04-21 Thread David Koblas
I'm doing that in a few other place (setting the page title, for 
example).  The problem is that I would like to have the extended inside 
of a block and potentially conditionally (e.g. only include this 
JavaScript if you're not logged in).


--koblas

On 4/21/10 4:29 PM, Tim Shaffer wrote:

Can you put the whole script tag in a block?

= template.html =

{% block extra-js %}


{% endblock %}

= base.html =

{% block extra-js %}{% endblock %}

   


--
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.



propagating values up the template chain

2010-04-21 Thread David Koblas
I ask this question knowing that it's almost anti-django template 
patterns, but I ask after spending the last few hours trying to figure a 
way to shoe horn this functionality in.   The basic idea is that I would 
like to say something like this:


{% extends "base.html" %}
{% block content %}
{% extendgroup javascript "foo.js" %}
{% extendgroup javascript "bar.js" %}
... more block content ...
{% endblock %}

=== base.html
...
  {% extendgroup javascript %}

  {% endextendgroup %}

I've attempted to attache the list of javascript files to
 Node -- cant' since there is no Signal for begin template rendering
parser -- wrong lifecycle
context -- the extend block is rendered with some local variables.

The only thing left is to promote "extendgroup" to be the parallel to 
"extends" and render it's children... Though this really isn't my goal.


Any suggestions or other thoughts of how a template can append to a list 
of resources to be used.


--koblas

--
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.



Blocking services in django

2009-12-09 Thread David Koblas
I'm trying to get a better understanding of django performance in a 
production setting.

Specifically I've seen notes that say that operations like sending mail 
will block all production traffic to your server for the duration of the 
send.  That got me thinking about other backend calls, like sending 
email call external URLs etc?   Just to make it very specific:

Is there any difference in the performance in a django application between:

* A MySQL call that takes 0.1 seconds
* Sending email to your local server that takes 0.1 seconds to complete
* Making a urllib.open() call that takes 0.1 seconds

My general understanding is that all three are equal in terms of the 
performance impact on your site yielding a theortical performance of 10 
pages / second.

Is this right, or is there some magic that makes MySQL "better" than 
just a urllib call.

--koblas

--

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.




App/Project naming - best practices

2009-09-30 Thread David Koblas

Just currious what people are doing for "best practices" in the realm of 
building apps.

Specifically I have a tendency to create a lot of "one-off" websites 
(e.g. Django App) and use a few standard apps across all of them.  What 
catches me up all of the time is naming systems.

If I was to create a new website "flow" my general tendency would be to 
end up with an directory structure like this:
   

.../app
   /flow/
   /registration/
   /etc../
.../lib/
   ...


Also, while I'm asking, though I've not yet done it this way, in the top 
level urls.py file, is there any reason not to do something like:

(r'^registration/', include('registration.urls')),
(r'^', include('flow.urls')),


To move everything up to the top level?

Thanks,
--koblas


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: Using email instead of username in extended "User" model?

2009-08-02 Thread David Koblas

Just to add my $0.02 cents to this, I too would like a better way to 
extend django.contrib.auth.models.User than the current approach.  The 
two biggest "problems" that I have are:

* Everything depends on django.contrib.auth.models.User -- which means 
that while you could swap out your authenticator you still basically 
have to go and rip apart everybody's applications to support your user 
object.
* To the above point, it also means that to construct your own User 
object means you can't use contrib.admin since it depends on the User 
object.

What would be really nice is to have something like:
django.auth.interface.User

Which in turn would instantiate something from settings.USER_MODEL 
(default contrib.auth.modes) this might mean you could subsume 
AUTH_PROFILE_MODULE into the USER_INSTANCE for most developers.  Up shot 
is that I can now still use public applications and the admin system, 
but now somebody can just create a "facebook.models.User" class that 
mirrors using facebook as the authenticator and get everything for free...

--koblas

Dana wrote:
> Hello All,
>
> I am looking to create a user model that extends the Auth "User"
> model, like how James Bennett outlines in his article "Extending the
> User Model" [1] by creating a FK to the "User" model and everything is
> going fine other than one issue.
>
> I would like to make "email" become the unique field and not need
> "username" when creating user accounts. Now, I don't mind using
> username for the Django admin, but for my own user section on the
> front end I want people creating accounts/logging in using an email. I
> am wondering if there is any clear way of doing this without having to
> roll my own auth app?
>
> I played with the idea of having my "save()" function create a random
> username when saving but that is obviously an ugly solution. Is there
> an easier way to do this that I am overlooking?
>
> Thanks for all your time!
> Dana W
>
> [1] http://www.b-list.org/weblog/2006/jun/06/django-tips-extending-user-model/
> >
>   

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



FormWizard and ChoiceFields

2008-10-28 Thread David koblas

I've recently discovered FormWizard -- trying to replace my own "Wizard" 
in some code.

I've got the following flow -- roughly :
1) authentication info (username/password)
2) use auth info to get a list of things -- present list in choice 
field...
3) given that choice, present another list -- technically optionally 
[there might be only one choice]

The problem is that FormWizard creates a new object everytime you call 
get_form(), so the ability to populate the choices field in step #2 is 
defeated. 

has anybody worked around this problem,  or did I miss something?

--koblas

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Recursively rendering in template

2008-09-24 Thread David Koblas

I'm not sure if this is possible to do without writing a templatetag 
(ok, that's my theory).

Basic idea is that I have a tree structure that I want to render into a 
template, the one example that I found pre-rendered a template into a 
template variable and then rendered it into the page.

What I would really like to be able to do is something akin to:
...html...
{% render node %}

{% render children %}

html...

Any quick answers, before I spend the afternoon figuring out if a 
template tag is going to work?

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---