Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Lamacq
Jun 15, 2001

Breezeblock RIP

Doh004 posted:

What am I doing wrong? I just want to select stuff after a certain date:

code:
last = request.POST['lastUpdate'];
l_datetime = time.strptime(last, "%H:%M %m/%d/%Y")
newMessages = Message.objects.filter('when' >= l_datetime)
I get a "TypeError: unpack non-sequence". I tried Googling selecting stuff after a certain date, and it all looked convoluted. This isn't that difficult to do :(

*edit*

Found the __lte functionality. Trying to get my time in that format... Hopefully it works :smith:

You should just be able to pass in a datetime object. And in fact it will be much easier if you use the forms library. Create a form with a DateTimeField, and in either the form's save() method or in your view code you can pass that DateTimeField's value directly into the queryset.filter().

The below code isn't tested but it should help you get where you're going:

in myapp/forms.py:
code:
from django import forms

class DateTimeForm(forms.Form):
	last_date = forms.DateTimeField()

in myapp/views.py:
code:

from myapp.forms import DateTimeForm
from myapp.models import Message
from django.http import HttpResponseRedirect
from django.shortcuts import render_to_response

def do_form_stuff(request):
	if request.method == 'POST':
		date_time_form = DateTimeForm(request.POST)
		if date_time_form.is_valid():
			new_messages = Message.objects.filter(when__gte=date_time_form.cleaned_data['last_date'])
			# do stuff with new_messages
			return HttpResponseRedirect('somewhere')
	else:
		date_time_form = DateTimeForm()
	
	return render_to_response('sometemplate.html', 
	  {'form': date_time_form},
	  context_instance=RequestContext(request)
	)

Lamacq fucked around with this message at 20:06 on Oct 13, 2010

Adbot
ADBOT LOVES YOU

Doh004
Apr 22, 2007

Mmmmm Donuts...

Lamacq posted:

You should just be able to pass in a datetime object. And in fact it will be much easier if you use the forms library. Create a form with a DateTimeField, and in either the form's save() method or in your view code you can pass that DateTimeField's value directly into the queryset.filter().

The below code isn't tested but it should help you get where you're going:

in myapp/forms.py:
code:
from django import forms

class DateTimeForm(forms.Form):
	last_date = forms.DateTimeField()

in myapp/views.py:
code:

from myapp.forms import DateTimeForm
from myapp.models import Message
from django.http import HttpResponseRedirect
from django.shortcuts import render_to_response

def do_form_stuff(request):
	if request.method == 'POST':
		date_time_form = DateTimeForm(request.POST)
		if date_time_form.is_valid():
			new_messages = Message.objects.filter(when__gte=date_time_form.cleaned_data['last_date'])
			# do stuff with new_messages
			return HttpResponseRedirect('somewhere')
	else:
		date_time_form = DateTimeForm()
	
	return render_to_response('sometemplate.html', 
	  {'form': date_time_form},
	  context_instance=RequestContext(request)
	)
"DateTimeForm object has no attribute "cleaned_data" :(

*edit* Nevermind, server_plus hadn't refreshed itself yet.

Hanpan
Dec 5, 2004

Can anyone recommend me a decent UK Django host which is fairly affordable? We just need some cheap, reliable and fast.

I know a lot of the time it's a case of getting a virtual dedicated but we can't really afford anything like that for this project.

Typh
Apr 18, 2003

LAY EGG IS TRUE!!!

Hanpan posted:

Can anyone recommend me a decent UK Django host which is fairly affordable? We just need some cheap, reliable and fast.
http://www.webfaction.com/

They are my go-to host for anything that doesn't need a VPS.

SlightlyMadman
Jan 14, 2005

I need help with a pretty serious problem. I've got some social networking integration code that's pretty simple: I get a token from the third party, save it in the session, then redirect them away to the third party website, which then comes back to me and I use that token in my session to complete the authentication.

Most of the time, this works fine, but if I click through the third party website very fast, sometimes by the time it gets back to my site, the session variable seems to not have written yet. It's very confusing because everything I've seen indicates that Django sessions should write pretty much instantaneously.

I've eliminated everything else I can think of as the problem. The session cookie is set, and works seemingly fine elsewhere. If the problem happens on the first time through, the session value will come back empty. On subsequent attempts, sometimes it will still have the old value. The crazy thing is that if I refresh the page, it will seemingly have had enough time to write properly and will suddenly work.

Is it possibly that my database is the problem? I've run test inserts on the session table in the database in it works in milliseconds just as it should, but it is a relatively slow database with a relatively large amount of data.

Is there some way I can flush out any pending session requests or something like that? If it really is taking a few seconds for the sessions to save, I have no problem halting the page load until it's been given enough time if there's a way for me to do that.

edit: Nevermind, I figured it out. I was using the "cache_db" session engine for performance. When I switched it to just the "db" engine the problem went away.

SlightlyMadman fucked around with this message at 16:59 on Oct 19, 2010

alistair
Feb 17, 2007

Look behind you.
I've made a website in Django. I'd love to get some feedback about what you think works, and doesn't. It's for musicians who have trouble keeping track of the songs in their repertoire and who don't want to have to visit and revisit lovely tab websites.

It's called Geektar.

Tell me what you think!

Mulozon Empuri
Jan 23, 2006

alistair posted:

I've made a website in Django. I'd love to get some feedback about what you think works, and doesn't. It's for musicians who have trouble keeping track of the songs in their repertoire and who don't want to have to visit and revisit lovely tab websites.

It's called Geektar.

Tell me what you think!

How about a demo account?

Stabby McDamage
Dec 11, 2005

Doctor Rope

alistair posted:

I've made a website in Django. I'd love to get some feedback about what you think works, and doesn't. It's for musicians who have trouble keeping track of the songs in their repertoire and who don't want to have to visit and revisit lovely tab websites.

It's called Geektar.

Tell me what you think!

Geektar posted:

Internal Server Error

duck monster
Dec 15, 2004

Any thoughts on good strategies for doing partial log ins.

The site Im working on has to take someones details, do an email confirm, THEN get their credit card details. Once the balance is positive, they can log in.

So I want to log them in partially, but not fully. If that makes any sense.

Theres already a pretty large site existing, and I dont want to change 100+ methods to be "aware" of this.

Jonnty
Aug 2, 2007

The enemy has become a flaming star!

duck monster posted:

Any thoughts on good strategies for doing partial log ins.

The site Im working on has to take someones details, do an email confirm, THEN get their credit card details. Once the balance is positive, they can log in.

So I want to log them in partially, but not fully. If that makes any sense.

Theres already a pretty large site existing, and I dont want to change 100+ methods to be "aware" of this.

This sounds like something for permissions and groups - add them to "partial" group first, then move them to the "full" when their balance is positive.

duck monster
Dec 15, 2004

Jonnty posted:

This sounds like something for permissions and groups - add them to "partial" group first, then move them to the "full" when their balance is positive.

Hmm. At the moment I'm using the 'active' flag (That triggers after the initial email confirmation). Maybe the trick might be to not use the usual @decorator to enforce log-in, and just match the username and password for the credit-card screen.

Sort of seems funky to me, but I think it'll work. I think.

The big catch is I might need to manually stuff the user/customer objects. In the command line util I wrote I'm creating a "bogo-request" that can emulate the request structure for certain functions and poo poo.

Profane Obituary!
May 19, 2009

This Motherfucker is Dead
I agree with Jonnty. Both partial and full login's are actually full login's to Django. Just make either a "partial" group, or a "full" group, and lock down permissions so that when you are in the partial group you can only access the pages to enter your CC info and pay.

Jonnty
Aug 2, 2007

The enemy has become a flaming star!

duck monster posted:

Hmm. At the moment I'm using the 'active' flag (That triggers after the initial email confirmation). Maybe the trick might be to not use the usual @decorator to enforce log-in, and just match the username and password for the credit-card screen.

Sort of seems funky to me, but I think it'll work. I think.

The big catch is I might need to manually stuff the user/customer objects. In the command line util I wrote I'm creating a "bogo-request" that can emulate the request structure for certain functions and poo poo.

Everything you're doing sounds horrendously hacky. What do you think is wrong with using permissions and groups as they're meant to be used?

Mulozon Empuri
Jan 23, 2006

So, I'm thinking about using this InheritanceCastModel as I'd like to be able to go from Product -> Ebook or from Product -> DigitalProduct.

Is there any way query across the subclasses and get a queryset containing the all the models that inherit from Product?

duck monster
Dec 15, 2004

Jonnty posted:

Everything you're doing sounds horrendously hacky. What do you think is wrong with using permissions and groups as they're meant to be used?

not rewriting a about 5-10K+ lines of horribly complicated pre-existing voip provider code because the boss had a brain-fart about login sequences. Theres a few hundred pages of configurator in this loving thing and its servicing tens thousands of customers. Not loving with that code is a high priority for me.

duck monster fucked around with this message at 01:45 on Nov 2, 2010

Jonnty
Aug 2, 2007

The enemy has become a flaming star!

duck monster posted:

not rewriting a about 5-10K+ lines of horribly complicated pre-existing voip provider code because the boss had a brain-fart about login sequences. Theres a few hundred pages of configurator in this loving thing and its servicing tens thousands of customers. Not loving with that code is a high priority for me.

But surely you're writing the django code on top of all this?

duck monster
Dec 15, 2004

Jonnty posted:

But surely you're writing the django code on top of all this?

No thats the django. Theres literally hundreds of pages of dynamic content in this site, poo poo, just in the administration alone, let alone the reseller sites, user pages and more, and it uses django's libraries under the hood for a bunch of configuration scripts and all the various mechanics hooking a VOIP website and the underlying mechanics of the provider.

Jonnty
Aug 2, 2007

The enemy has become a flaming star!

duck monster posted:

No thats the django. Theres literally hundreds of pages of dynamic content in this site, poo poo, just in the administration alone, let alone the reseller sites, user pages and more, and it uses django's libraries under the hood for a bunch of configuration scripts and all the various mechanics hooking a VOIP website and the underlying mechanics of the provider.

Oh. Well, I guess we can't help you given that it sounds like an unusual setup. Just make sure that if you can use groups and permissions in the place of horrible hacks, you do.

Hughlander
May 11, 2005

I'm using Eclipse + Aptana 3 ßeta as a plugin to develop a Django app, the project is registered as Django and debug as Django starts the dev server and I can debug calls as they come in and that is good. I can also from a terminal window, start a python interpreter instance, and from appname.models import ModelName and test code that way.

However, what I can't seem to do is combine the two. Is there a way to get a debug console in pydev that I can import my models and have it apply breakpoints to the code? I've tried to right click the model and debug python instance on it, however that fails due to:

File "/home/wyntersoft/server/external-src/django/db/models/base.py", line 50, in __new__
kwargs = {"app_label": model_module.__name__.split('.')[-2]}
IndexError: list index out of range
Exception AttributeError: "'NoneType' object has no attribute 'print_exc'" in <bound method Popen.__del__ of <subprocess.Popen object at 0x1d33490>> ignored

(It's trying to convert __main__ to a 3 dotted 'apps.appname.model')

I'm pretty sure I've done something like this before but I don't remember what I had done at the time.

Surface
May 5, 2007
<3 boomstick

alistair posted:

I've made a website in Django. I'd love to get some feedback about what you think works, and doesn't. It's for musicians who have trouble keeping track of the songs in their repertoire and who don't want to have to visit and revisit lovely tab websites.

It's called Geektar.

Tell me what you think!

I like the name, dual meaning intended? 1) It's for geeks who play guitar. 2) its a place for geeks to TAR their guitar resources.

nbv4
Aug 21, 2002

by Duchess Gummybuns
My company is looking for kick rear end django developers. If I refer someone I get a fat rear end bonus. We are a startup based in South Beach (our office is two blocks from the beach). The pay is pretty darn good, even for this area. You need to know Django, jQuery, and having experience with automatic deployment, celery, or orbited is a huge plus. If you're interested, send your cover letters and resume's and stuff to nbvfour@gmail.com

Ferg
May 6, 2007

Lipstick Apathy
So I'm trying to use a stored procedure via a cursor and callproc() but I always get the error:
code:
OperationalError: (1305, 'PROCEDURE myapp.LatLonDistance does not exist')
Here's the chunk of code that throws the error in my app:
code:
cursor = connection.cursor()
result = cursor.callproc("myapp.LatLonDistance", (lat1, lon1, lat2, lon2))
cursor.close()
And here's a direct query that I can run on the DB that works just fine:
code:
SELECT id,myapp.LatLonDistance(lat1, lon1, lat2, lon2) AS distance FROM myapp.users_userprofile;
And here's the script I use to write the stored procedure to the DB:
code:
delimiter //
CREATE FUNCTION airrun.LatLonDistance (lat1 double, lon1 double, lat2 double, lon2 double)
RETURNS double
DETERMINISTIC
READS SQL DATA
BEGIN
	
		DECLARE theta double;
		DECLARE dist double;
		DECLARE miles double;
		SET theta = lon1 - lon2; 
		SET dist = SIN(RADIANS(lat1)) * SIN(RADIANS(lat2)) + COS(RADIANS(lat1)) * COS(RADIANS(lat2)) * COS(RADIANS(theta)); 
		SET dist = ACOS(dist); 
		SET dist = DEGREES(dist); 
		SET miles = dist * 60 * 1.1515;
	
		
		RETURN miles;
END
//
delimiter ;
Any thoughts?

Edit: Using a MySQL database

Ferg fucked around with this message at 21:24 on Nov 17, 2010

MonkeyMaker
May 22, 2006

What's your poison, sir?
Has anyone implemented their own AdminSite? How easy/hard was the basic implementation?

I'm in the midst of building a "cms" that's going to be quite large and decently complex in some areas and I'm wondering if using something like AdminSite would save some time. I'd rather not have to make my own implementation for admin actions and inlines and the like (I know I can just use inline forms but that's not as simple as inlines = [Foo]).

When using a custom AdminSite, is further customization equivalent to customizing the standard Django admin?

ATLbeer
Sep 26, 2004
Über nerd

MonkeyMaker posted:

Has anyone implemented their own AdminSite? How easy/hard was the basic implementation?

I'm in the midst of building a "cms" that's going to be quite large and decently complex in some areas and I'm wondering if using something like AdminSite would save some time. I'd rather not have to make my own implementation for admin actions and inlines and the like (I know I can just use inline forms but that's not as simple as inlines = [Foo]).

When using a custom AdminSite, is further customization equivalent to customizing the standard Django admin?

Two questions

1) Have you looked into some of the existing django CMS options (including Ellington?)
2) Why reinvent the wheel. Just build, chop and modify the existing admin site to your needs. I can't imagine something you wouldn't be able to do within the existing admin system.

CliffyBMine!
Oct 2, 2006

Epic Megagames? I'm Epic MegaGAY!
Hey guys, I need a little help! I'm working on a website for a client and there's a weird bug that only happens:
-on the prod server
-when Debug=False

Basically, when I try to click on an instance of a very specific model in the admin (the model is events.event) when Debug is set to False in the settings, django throws a 500 internal server error.

Here is the traceback:
code:
Traceback (most recent call last):

 File "/sites/Gardape/envs/prod/lib/python2.6/site-packages/django/core/handlers/base.py", line 100, in get_response
   response = callback(request, *callback_args, **callback_kwargs)

 File "/sites/Gardape/envs/prod/lib/python2.6/site-packages/django/contrib/admin/options.py", line 239, in wrapper
   return self.admin_site.admin_view(view)(*args, **kwargs)

 File "/sites/Gardape/envs/prod/lib/python2.6/site-packages/django/utils/decorators.py", line 76, in _wrapped_view
   response = view_func(request, *args, **kwargs)

 File "/sites/Gardape/envs/prod/lib/python2.6/site-packages/django/views/decorators/cache.py", line 69, in _wrapped_view_func
   response = view_func(request, *args, **kwargs)

 File "/sites/Gardape/envs/prod/lib/python2.6/site-packages/django/contrib/admin/sites.py", line 190, in inner
   return view(request, *args, **kwargs)

 File "/sites/Gardape/envs/prod/lib/python2.6/site-packages/django/utils/decorators.py", line 21, in _wrapper
   return decorator(bound_func)(*args, **kwargs)

 File "/sites/Gardape/envs/prod/lib/python2.6/site-packages/django/utils/decorators.py", line 76, in _wrapped_view
   response = view_func(request, *args, **kwargs)

 File "/sites/Gardape/envs/prod/lib/python2.6/site-packages/django/utils/decorators.py", line 17, in bound_func
   return func(self, *args2, **kwargs2)

 File "/sites/Gardape/envs/prod/lib/python2.6/site-packages/django/db/transaction.py", line 299, in _commit_on_success
   res = func(*args, **kw)

 File "/sites/Gardape/envs/prod/lib/python2.6/site-packages/django/contrib/admin/options.py", line 905, in change_view
   form = ModelForm(instance=obj)

 File "/sites/Gardape/envs/prod/lib/python2.6/site-packages/django/forms/models.py", line 245, in __init__
   object_data = model_to_dict(instance, opts.fields, opts.exclude)

 File "/sites/Gardape/envs/prod/lib/python2.6/site-packages/django/forms/models.py", line 148, in model_to_dict
   data[f.name] = [obj.pk for obj in f.value_from_object(instance)]

 File "/sites/Gardape/envs/prod/lib/python2.6/site-packages/django/db/models/fields/related.py", line 1137, in value_from_object
   return getattr(obj, self.attname).all()

 File "/sites/Gardape/envs/prod/lib/python2.6/site-packages/django/db/models/manager.py", line 117, in all
   return self.get_query_set()

 File "/sites/Gardape/envs/prod/lib/python2.6/site-packages/django/db/models/fields/related.py", line 484, in get_query_set
   return superclass.get_query_set(self).using(db)._next_is_sticky().filter(**(self.core_filters))

 File "/sites/Gardape/envs/prod/lib/python2.6/site-packages/django/db/models/query.py", line 550, in filter
   return self._filter_or_exclude(False, *args, **kwargs)

 File "/sites/Gardape/envs/prod/lib/python2.6/site-packages/django/db/models/query.py", line 568, in _filter_or_exclude
   clone.query.add_q(Q(*args, **kwargs))

 File "/sites/Gardape/envs/prod/lib/python2.6/site-packages/django/db/models/sql/query.py", line 1131, in add_q
   can_reuse=used_aliases)

 File "/sites/Gardape/envs/prod/lib/python2.6/site-packages/django/db/models/sql/query.py", line 1026, in add_filter
   negate=negate, process_extras=process_extras)

 File "/sites/Gardape/envs/prod/lib/python2.6/site-packages/django/db/models/sql/query.py", line 1194, in setup_joins
   "Choices are: %s" % (name, ", ".join(names)))

FieldError: Cannot resolve keyword 'event' into field. Choices are: domain, flatpage, id, name, newsitem, person
I found this: A similar situation but it doesn't really apply in my case because admin registration is already in admin.py (same thing for admin.autodiscover() in urls.py)

admin.py
code:
from django.contrib import admin
from clientname.events.models import Event, EventTranslation
from clientname.events.forms import EventForm, EventTranslationForm

class EventInline(admin.StackedInline):
    model = EventTranslation
    form = EventTranslationForm
    extra = 2

class EventAdmin(admin.ModelAdmin):
    form = EventForm
    inlines = [EventInline]

admin.site.register(Event, EventAdmin)
Any idea?

MonkeyMaker
May 22, 2006

What's your poison, sir?
Can you show the Event and EventTranslation forms and models?

hitze
Aug 28, 2007
Give me a dollar. No, the twenty. This is gonna blow your mind...

Are custom django-admin commands considered the best way to execute commands that feed data into the applications database? (automatically pulling data from an API) I got it working fine for what I needed, I'm just wondering if this was a good idea or bad idea.

Lamacq
Jun 15, 2001

Breezeblock RIP

hitze posted:

Are custom django-admin commands considered the best way to execute commands that feed data into the applications database? (automatically pulling data from an API) I got it working fine for what I needed, I'm just wondering if this was a good idea or bad idea.

That is how I pretty much always do it. For example I have a course management app for my school that uses a management command (run via cron) that pulls in course descriptions from the central university course management system via SOAP. I'd be curious to hear what other people do in that situation though.

SlightlyMadman
Jan 14, 2005

I do the same, although instead of creating one specific admin command per task, I just have a single command that and call through my cron, which can delegate and run tasks as needed. I do it this way so I can mark the various tasks in the database and perform checks to make sure the previous tasks were finished before running the next ones.

duck monster
Dec 15, 2004

code:
#!/usr/bin/python
from django.core.management import setup_environ
import settings

setup_environ(settings)

from yourapp.daemon import *

rundaemon()

I put all my code in the daemon.py file, stuff it in cron and go from there. Its a handy way of doing regular tasks with the benefits of all your models etc.

I'd love to see someone put together a good ncurses (for headless boxes) templatey-menuey-inputy type library for django. Something like "Edit up your screens on this package, load em in your view, and capture the output in some controllers.

It'd make writing code for sysadmin stuff *really* easy

bitprophet
Jul 22, 2004
Taco Defender
You can also use Fabric and its Django support for this.

It's been a while since I used Django so I don't remember if setup_environ is effectively the same as setting DJANGO_SETTINGS_MODULE, but either way, assuming your project is in the PYTHONPATH, you could do something like:
code:
from fabric.contrib import django
django.project('yourapp')
from yourapp.models import SomeModel

def import():
    # Use SomeModel to import data somehow
This will IIRC be less boilerplatey than a real management command, but is obviously about the same amount of effort as what duck monster is doing above (though you'd have the other stuff in Fabric at your disposal, e.g. ready-made args/kwargs without doing your own optparsing, etc -- which may or may not matter to you).

Hanpan
Dec 5, 2004

I'm curious how people see the future of Django. Personally, it's my go to framework these days over various PHP alternatives. At the company I work at, I managed to convince them to give it a try for a few CMS powered websites and they loved it, although frustratingly moved back to PHP because "it's what everyone uses".

When I'm developing web applications, I always like to think I am using the right tool for the job (although granted in this case there isn't really a right or wrong tool) and I do worry that Django may begin to phase out in the next few years, leaving the sites I have programmed stranded with technology no one supports anymore.

A friend of mine who went to Djangocon this year disagrees, telling me that Django is still in it's very early youth and expects it to explode with popularity soon... I kinda wish I could share in his optimism.

Ferg
May 6, 2007

Lipstick Apathy

Hanpan posted:

A friend of mine who went to Djangocon this year disagrees, telling me that Django is still in it's very early youth and expects it to explode with popularity soon... I kinda wish I could share in his optimism.

I tend to agree with this. Django got somewhat lost under the Rails explosion (which seems to be dying out now), but I've noticed the name pop up more and more from layman and random job postings that I come across. The only shops that I've personally encountered that want to hang onto PHP are shops that don't really "get" development in the first place. Chop shops basically, which I've been through 2 in the past 4 years.

The shops I've worked for (current company included) that do want to use Django realize it's value in both speed of development and maintainability. At my current company, my project managers love that I can both churn out a CMS (leveraging the admin site) as well as custom admin site tools in virtually no time, as well as the fact that the code is simple enough that they can read without knowing much Python.

king_kilr
May 25, 2007
I've got a pretty strong bias (being a core-developer), but I think we're doing alright. The people who matter (IMO) know what Django can do, we've got solid growth, forward development, what's not to love.

Surface
May 5, 2007
<3 boomstick

Ferg posted:

I tend to agree with this. Django got somewhat lost under the Rails explosion (which seems to be dying out now), but I've noticed the name pop up more and more from layman and random job postings that I come across.

Google trends supports that Django was somewhat lost under Rails, but also suggests that Django over-came Rails and is growing healthily. Either that or everyone just refers to it as 'Rails' now, which would make it impossible to compare with Django on google trends because 'Rails' is such a common word.

http://www.google.com/trends?q=django,+ruby+on+rails&ctab=0&geo=all&date=all&sort=0

Ferg
May 6, 2007

Lipstick Apathy

Surface posted:

Google trends supports that Django was somewhat lost under Rails, but also suggests that Django over-came Rails and is growing healthily. Either that or everyone just refers to it as 'Rails' now, which would make it impossible to compare with Django on google trends because 'Rails' is such a common word.

http://www.google.com/trends?q=django,+ruby+on+rails&ctab=0&geo=all&date=all&sort=0

Has anybody noticed a ramp up in popularity of Google App Engine lately? Maybe it's just be, but I feel like I've been noticing more chatter about it in the last few months. That would also be a big plus for Django, especially since it seems like nobody actually uses the GAE API. Factor in that the App Engine team has reached out to the Django team to get better integration, that's just more wood on the fire.

SlightlyMadman
Jan 14, 2005

Surface posted:

Google trends supports that Django was somewhat lost under Rails, but also suggests that Django over-came Rails and is growing healthily. Either that or everyone just refers to it as 'Rails' now, which would make it impossible to compare with Django on google trends because 'Rails' is such a common word.

http://www.google.com/trends?q=django,+ruby+on+rails&ctab=0&geo=all&date=all&sort=0

Uh, not to disparage the framework, as I really do think it's the best out there and will soon become industry standard, but "Django" is probably still more frequently used in reference to the person than the project.

Ferg
May 6, 2007

Lipstick Apathy
What's everybody's favorite deployment tool? Right now our production setup consists of just 4 web servers (Ubuntu), so it's still manageable to do via ftp but I want to automate.

And am I correct in that simply updating the .py files on the webserver doesn't make the changes go live immediately? I've always done a quick restart on Apache on each server, otherwise the changes seem to take several hours to kick in.

SlightlyMadman
Jan 14, 2005

Yeah, a graceful apache restart is generally needed, or in some environments you can pkill python and that'll take care of it.

Adbot
ADBOT LOVES YOU

king_kilr
May 25, 2007
fabric!

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply