Feature Flipping with Gargoyle and Waffle

2011-11-30 Thread Adam Nelson
We just put out a post about feature flipping using Gargoyle or Waffle:

http://tech.yipit.com/2011/11/30/getting-to-continuous-deployment-in-django-feature-flipping/
---
Adam Nelson
CTO, Yipit
Join the Yipit Team and work with Python, Django, MongoDB, jQuery,
Backbone.js and Sass @ http://yipit.com/jobs/ <http://yipit.com/about/jobs/>

-- 
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: Boolean test on queryset

2011-11-28 Thread Adam Nelson
Jirka,

That doesn't solve the problem.  That will still do a very expensive
count() operation on the queryset.  In fact, examples.count() is what
happens when you do bool(examples) anyway.

Thanks,
Adam

On Mon, Nov 28, 2011 at 8:11 PM, Jirka Vejrazka wrote:

> Hi Adam,
>
>  I tend to use:
>
>  if examples.count():
>
>...something...
>
>  HTH
>
>Jirka
>
> --
> 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.



Boolean test on queryset

2011-11-28 Thread Adam Nelson
When one tests for the boolean value of a queryset in the following way:

examples = Example.objects.all()

if examples:
. do something


You might think (I did) that Django will call a __nonzero__ special 
attribute that would either execute an EXISTS SQL STATEMENT or a SELECT 
statement with a LIMIT of 1.  Instead, the ORM evaluates the entire 
queryset through the __len__ attribute.

Is there a best practice for working around this?

Thanks,
Adam

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/G_V4jwWVh4MJ.
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.



Python pre-commit hook for git

2011-11-16 Thread Adam Nelson
Hey all,

We just put out a blog post on our Python pre-commit hook for git in case 
anybody is interested:

http://tech.yipit.com/2011/11/16/183772396/

Cheers,
Adam
---
Adam Nelson
CTO, Yipit
Join the Yipit Team and work with Python, Django, MongoDB, jQuery, 
Backbone.js and Sass @ http://yipit.com/jobs/ <http://yipit.com/about/jobs/>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/QZ2LxPVEFLgJ.
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.



Deploying Django with Chef

2011-11-09 Thread Adam Nelson
All,

We just put out a new blog post on how to use Chef to deploy a Django 
environment on Amazon ec2 (although any remote Python deployment will 
benefit from the article, not just Django):

http://tech.yipit.com/2011/11/09/how-yipit-deploys-django/

Cheers,
Adam

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/jY0PkvLq668J.
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: Serve a tracking pixel via Django

2011-04-01 Thread Adam Nelson

On Thursday, March 31, 2011 10:56:44 PM UTC-4, Javier Guerra wrote:
>
> On Thu, Mar 31, 2011 at 7:18 PM, Russell Keith-Magee
>  wrote:
> > Sure. Write a view that returns the content. It's 3 lines of code (a
> > couple more if you count imports and whitespace). Added bonus -- it's
> > actually more efficient than serve(), because it doesn't impose a disk
> > access overhead every time it gets called.
>
> even better, use nginx empty_gif and get the tracking data from the logs.
>
>
> I should have been more exact.  This is an actual image even though it 
serves the purpose of being our tracking pixel.  It looks like the three 
options are:

1. Use serve() with insecure=True 
2. Open the file and return via HttpResponse() - effectively the same as 
serve() with insecure=True.
3. Use nginx and parse the logs
4. Use nginx with Drizzle 
to 
log to MySQL in real time
5. Use Amazon CloudFront and parse the logs

We currently do #1 - but will probably move to #2.  Another option is an 
extension of RKM's suggestion of using a string representation of the image. 
 For us that would be a 30KB string.  I have the sense that Linux optimizes 
away any cost of opening a static file repeatedly so I'm not so concerned 
about this.  serve() is implicitly doing this and we're serving that file 
100k+ times a day with minimal effort. #5 seems like the best solution for 
1MM+ requests/day.
 
Thanks,
Adam

>

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



Serve a tracking pixel via Django

2011-03-31 Thread Adam Nelson
We have one static file that needs to be served after business logic has run 
(i.e. log a view on a specific url based on a unique code).  We used to use 
serve() in production.  This has always been frowned upon but with Django 
1.3, the errors are worse.  Can one return an image in any other way?

-- 
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: Django Web Application Cost So Many memory

2011-03-30 Thread Adam Nelson
I think 60M is fine.  For us, with nginx in front of gunicorn, we can get 
many simultaneous connections per process.

-Adam

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



Darpa challenge

2009-10-29 Thread Adam Nelson

All,

In case people hadn't heard, DARPA just announced what I think is the
coolest competition ever:

http://networkchallenge.darpa.mil/

On December 5, DARPA will raise 10 red weather balloons somewhere in
the US.  The first person to get the location of all 10 balloons and
submit them will be given $40k.

I'm proposing that if "I" win, half the money ($20k) will be given to
the Django Software Foundation.  The other half ($20k) will go to the
Python Software Foundation.

I've set up a StackOverflow site for coordination for anybody who
would like to join:

http://darpa.stackexchange.com/

I think the first thing that needs to happen is to get a critical mass
of users on the site and to use the Q capabilities of the site to
figure out what tools we should use next.

Cheers,
Adam Nelson
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Populating ChoiceField values in Form

2009-09-11 Thread Adam Nelson

I'm trying to limit the ChoiceField values of a given Form with a
queryset:

class TestForm(forms.ModelForm):
category = forms.ModelChoiceField(queryset=TestModel.objects.filter
(filtercriterion__id=1))

class Meta:
model = TestModel


In this example, TestModel.objects.filter(filtercriterion__id=1) will
return a QuerySet of what I want to end up on the select list.  How
can I send the numeral '1' as a variable to the TestForm class?

Thanks,
Adam
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Using admin to update inherited models

2009-08-20 Thread Adam Nelson

I have 3 models:

class Place(models.Model):
name = models.CharField(max_length=255)

class PizzaPlace(Place):
pass

class BurgerPlace(Place):
pass

Does anybody know how to:

1. Make the admin let me take a Pizza place and make it into a burger
place as well?
2. Make the admin let me take a Pizza place and change it to a burger place?

Is this not the best structure for this situation?  I previously was
using boolean fields and one model (is_pizza_place) but I'm starting
to put alot of logic on the child models - and would prefer to have
that logic in the model.

Thanks,
Adam

-- 
Adam Nelson

http://unhub.com/varud

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



Multiple Sites with minimal configuration

2009-07-10 Thread Adam Nelson

I'm creating a new project with pretty simple requirements:

1. A core set of methods for validating data which I will build.
2. The ability for a person with minimal skills to drop HTML form
pages (2 or 3) for a given hostname (www.example1.com, www.example2.com,
www.example3.com) that accept these variables.  There will be dozens
of hosts created every year.

I'm presuming I will use the sites app.  However, I don't see how I
can create and set the SITE_ID through the admin (which is necessary
for number 2).

Would people suggest that I use the RequestSite class from the sites
app which uses the HttpRequest variables?  If so, does anybody know of
any best practice examples in urls.py (I'm presuming).

Thanks,
Adam
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Ignore Fixtures or Skip Fixtures

2009-04-08 Thread Adam Nelson

Is there any way to ignore fixtures when running syncdb?  I'm using
django-command-extensions and when using runscript from a previous
datadump, I get a unique index violation.  I'd like to be able to
ignore fixture imports.

Thanks for any help,
Adam
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Best Practices - Model Changes on Production servers

2009-04-07 Thread Adam Nelson

Is there a page that has any sort of list of Django rollout
methodologies and best practices with regards to that issue?

I'm trying to deploy some major model changes and although I'm fine
doing everything manually, it would be nice to have some help (even
just an ALTER TABLE generator).

I've found Fabric (http://www.nongnu.org/fab/) which is geared more
towards large deployments where scripting is more time-efficient than
just doing things 'in real time'.  My biggest need right now is to get
an ALTER TABLE generator.

Please let me know if one exists.

Thanks,
Adam
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Fixtures for django.contrib.sites.Site

2009-04-01 Thread Adam Nelson
How do I do a fixture for the Site model?  I've tried all sorts of different
model names
[
  {
"model": "sites.site",
"pk": 1,
"fields": {
  "domain": "example.com",
  "name": "Example"
}
  },
]

And I get this error:
...
  File
"/Library/Python/2.5/site-packages/django/utils/simplejson/decoder.py", line
221, in JSONArray
raise ValueError(errmsg("Expecting object", s, end))
ValueError: Expecting object: line 10 column 1 (char 124)

Any ideas for the correct model name?  I've tried every possibility I can
think of.

Regards,
Adam
-- 
Adam Nelson

http://unhub.com/varud

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



Getting multiple values from a QuerySet

2009-03-13 Thread Adam Nelson

If I have a QuerySet like this:

>>> o1 = Store.objects.all()
>>> for o2 in o1:
...o2.employees.all()
...
[, ...]


Is there any way to get all employees for all stores without having to
do the for (in other words some sort of one line solution)?  I seem to
need to do this frequently and it seems wasteful  Something like
o1.employees.all() would be ideal but if o1 is a QuerySet, that won't
work.

Thanks for any help, even if I can just get a definitive 'no - that's
the best way to do it'.

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



Values from Reverse Generic Relations on multiple objects

2009-03-10 Thread Adam Nelson

http://docs.djangoproject.com/en/dev/ref/contrib/contenttypes/#reverse-generic-relations

I'm working with Reverse Generic Relations and I was wondering if
there is a way to get the related objects for multiple objects in a
simple way.  For instance, based on the bookmark example of that link,
I'd like to do the following:

>>> b.objects.filter(pk__in=[1,2])
>>> b.tags.all()
*** AttributeError: 'QuerySet' object has no attribute 'tags'

First off, it's an annoying error because it should say something like
'more than one object b'.  Anyway, I can iterate through each b and
then get the tags for that b and then put them back together again.
Is there a simpler way to do this (i.e. get all tags for more than one
bookmark)?

Thanks.

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



Self Join using QuerySet

2009-03-05 Thread Adam Nelson

Is it possible to do a self join using QuerySet?

I'm looking to simulate a query like this:

SELECT b.created_on, SUM(a.vote)
FROM votes a JOIN votes b ON a.created_on <= b.created_on
WHERE a.object_id = 1
GROUP BY 1

Which finds the sums for votes before the datetime of each vote.
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Best way to deal with dictionaries of lists (equivalent of SQL GROUP BY)

2009-02-10 Thread Adam Nelson

I'm looking at the documentation here:

http://docs.djangoproject.com/en/dev/ref/templates/builtins/#regroup

And am looking for the best practices way to deal with doing that from
within the manager.  This seems like a common issue:

1. I have two models, one foreign keys to the other (comments ->
bookmarks)
2. I want, for each bookmark, to list each comment_description.

This would be the dictionary (or I could use a queryset, or a list, or
ideally a dictionary of lists, or whatever is considered best
practice)

[{'comment_id': 1, 'bookmark_id': 1, 'comment_description':
u'Bookmark1 Description'}, {'comment_id': 2, 'bookmark_id': 1,
'comment_description': u'Bookmark1 Another Description'}, {'id': 3,
'comment_id': 2, 'comment_description': u'Bookmark2 Description'}]

I want:

bookmark_id 1, comment_descriptions "Bookmark1 Description","Bookmark1
Another Description"
bookmark_id 2, comment_descriptions "Bookmark2 Description"

The Python docs are really tough to navigate and while the Django docs
are excellent, I can't find the standard solution for this.  I know it
must come up all the time (as it would with PHP).

Thanks,
Adam

--~--~-~--~~~---~--~~
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: A Very Puzzling MySQL Issue Performance...

2009-02-06 Thread Adam Nelson

On Feb 5, 12:36 pm, dan0  wrote:
> Hello,
>
> I am having an issue with my msyqld process responding to a query
> after a moderate period of inactivity. I'll issue a simple query such
> as "Person.objects.filter(name__icontains='Dan')", which would map to
> about 5000 entries in a table of roughly 200,000 rows, and see the
> mysqld process stall at 100% cpu load for upwards of 10 seconds.
>

Can you send in the table definition (usually DESCRIBE person_person;
in the database) and also the SQL that is being run (SELECT id FROM
person_person WHERE name like '%something%';)  as well as that SQL
with EXPLAIN put in front of it?

I presume there's a full text index on a text field and it's
rebuilding it on the fly when you do the icontains.

The correct solution is to make sure you need icontains instead of
istartswith.  Then, tighten up the column to be a CharField of 255
characters or less (if it's not already).  Then, start playing around
with getting more memory dedicated to the caches so that the 10 second
spinup happens less frequently.  Finally, you could consider
redesigning the models so that there is a Name lookup model for
finding the correct Person model (i.e. a model with just the name
field that is a foreign key to that).

Oh, once you drop into MySQL for testing, use "SELECT
SQL_NO_CACHE ..." so that you don't hit the cache.
--~--~-~--~~~---~--~~
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: A Very Puzzling MySQL Issue Performance...

2009-02-06 Thread Adam Nelson

Also, you could limit the result set to the number of records you
actually need.  5k seems like an absurdly large result set.

One final thing would be if you could pre-cull the Person data by
narrowing it down to active users or something.  The active_user field
(if there is one), could quickly knock the result set in half before
you have to run icontains.
--~--~-~--~~~---~--~~
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: Installing Django to a newer version of python

2009-02-06 Thread Adam Nelson

> > how can I get mod_python, which is needed by apache, to load in the
> > python 25 directoty and not in the 24 directory?
>
> If no prebuilt binary of mod_python is available that was compiled
> against Python 2.5 then you must build mod_python from source code
> yourself against Python 2.5.
>
> This is because you cannot dynamically switch which version of Python
> mod_python uses at run time, it is dictated at compile time.
>
> If having to recompile, you might want to look at mod_wsgi instead,
> which will give a better experience.
>

I would recommend:

A) Use wsgi instead of mod_python.  This is the way of the future and
probably is the best option for new installations (particularly when
the operator doesn't want to be compiling software).
B) Use Fedora (or CentOS) if you want 'easy' package installation.  I
did major battle with the Ubuntu/Debian apt system and in the end had
to give up and just do everything the old fashioned way.  Fedora 'just
works' - at least in my experience with Django/Python.
C) Is there a reason you're not using a host like MediaTemple so you
don't have to worry about this stuff?  It sounds like you'd rather be
doing something else - in which case that's a great option and their
services will be much more efficient and appropriate than running your
own server.
--~--~-~--~~~---~--~~
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: Which Python are people using on OSX?

2009-02-06 Thread Adam Nelson

> 4. Use the macpython .dmg

I've been using the app from http://wiki.python.org/moin/MacPython/Leopard
and it works great.  That's a nice clean 2.5.4 install.  All my libs/
apps I get using pip and virtualenv which is a recent thing.

On a recent install I did with a friend, we left the stock 2.5.1 and
it has worked fine.  I would consider that next time.

I've been under the impression that 2.6 can't be used with Django
yet.  At the least, I would only use it for helping with Django
development, not for anything else - it hasn't been out long enough to
be depended on IMHO.

-Adam

P.S. - I haven't bothered with Apache/MySQL on the Mac.  My theory is
that for testing and production, everything should be done on Linux
anyway, so why bother messing around with it on the Mac - which I only
use for development.  FWIW, I use Fedora 8 on Amazon Web Services for
that.
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Best Practices for debugging URL problems

2009-01-21 Thread Adam Nelson

I recently had what is a common issue for many Django developers:

"No module named urls"

What turned out to be the issue is that I had deleted one of the
urls.py files accidentally because I deleted an app that I thought I
was no longer being used but was in fact being called by the top level
urls.py.

Is there any good way to diagnose this class of problems?  There is
nowhere either through the interactive debugger or the debugging page
that would have shown this issue because the url error is thrown with
the first call to {{ url }}.  In the end I had to revert to previous
revisions and just find out which one caused the problem by trial and
error.

Thanks,
Adam
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



TextMate Django Bundle

2008-12-17 Thread Adam Nelson

Does anybody have this working in TextMate?

"Python Django Templates.tmbundle"

>From http://macromates.com/svn/Bundles/trunk/Bundles/

I've installed other bundles and the Python Django.tmbundle, but the
Templates one simply doesn't appear in the Bundles menu.

Thanks,
Adam
--~--~-~--~~~---~--~~
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: Django Suitability

2008-10-23 Thread Adam Nelson

Matt,

I feel your pain.  It's probably not best on the Django forum to say
this but:

1. Any modern framework is fine (Cake/PHP, Django/Python, Merb/Ruby,
etc...)
2. Use a framework of some sort (don't just roll with 'Java' without
some sort of web-specific framework for your needs)
3. Any real database will work (i.e. Access will not do and should not
be used for any web application ever - SQL Server is an amazing
database if you're stuck in a Windows only environment and there is
cash to throw around).

What really matters is:

1. Comfort level of the developers who will be working on the product
with whatever framework
2. Comfort level of the systems administrators and the rest of the
organization who will be supporting it after you leave

Finally:

1. Django is just a front end for Python.  Places using Python include
Nasa.  It is also a standard language in all modern UNIX systems -
which says alot about how solid it is and how it's here to stay.

-Adam

On Oct 23, 6:21 am, "Matthew Talbert" <[EMAIL PROTECTED]> wrote:
> Thanks, Dj, that is helpful.
>
> > A project I worked on over the summer used a Database that was 130
> > tables, and getting 1gb updates every 2 minutes. I was witting a new
> > web app to do calculations on the data and the company wanted to use
> > Java since thats what they knew best and had spend huge amounts of
> > money (1 mil +) to support with Sun Servers, and such. But I knew
> > python and django would be a better fit for this particular app, but
> > the boss wouldnt listen. So we had 10 Developers working on the Java
> > version (Including me) and over 3 months we got it about 85% done,
> > though it had no unit tests. During the same three months, I worked on
> > my own time after work and basically had no life for the whole time, I
> > was able to get the web app 100% complete with unit tests. That
> > convinced my boss that Django was a good fit.
>
> > The site is an internal app that I cannot give access to (And I
> > actually had to get permission to give what info I have), but I can
> > say that Django is a suitable framework for what you are looking for.
--~--~-~--~~~---~--~~
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: Setting up Django on CentOS5 with flup and fastcgi

2008-10-21 Thread Adam Nelson

I've had great luck with wsgi.

http://code.djangoproject.com/wiki/django_apache_and_mod_wsgi
http://code.google.com/p/modwsgi/wiki/IntegrationWithDjango

This article relates how to reverse proxy that with Nginx if you're
interested (for speed, isolation):

http://vizualbod.com/articles/nginx-fastcgiwsgi-django-deployment

I haven't put any real load on this stuff yet but it sounds like wsgi
is a champ and it's certainly been great for me so far.

-Adam


On Oct 21, 1:55 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> yes i have read that..
>
> it seems that the .fcgi file does not read correctly. it just returns
> the actual text in the fcgi file. and when i try and run a development
> server you just get a timeout.
>
> On Oct 21, 5:05 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote:
>
> > On Tue, Oct 21, 2008 at 11:50 AM, [EMAIL PROTECTED] <[EMAIL 
> > PROTECTED]>wrote:
>
> > > Hello,
>
> > > I am a webhosting provider that is trying to set up django on my
> > > server so that my clients can utilise it for their own programs.
>
> > > Although we do not allow ssh access our only ability to allow them
> > > access is to use fastcgi
>
> > > Although i am having trouble with doing so. Is there any tutorials
> > > that anyone knows of that will aid me to successfully setting up
> > > django to allow for shared hosting accounts to use it.
>
> > > I run on CentOS 5 and have python 2.4 with django 1.0 stable.
>
> > I assume you have read this page:
>
> >http://docs.djangoproject.com/en/dev/howto/deployment/fastcgi/
>
> > ?
>
> > Specifics of the trouble you are running into would help people provide
> > guidance, without specifics it's hard to say what might be going wrong.
>
> > Karen
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---