Hi,
I'm trying to run multiples sites using the sites-framework, and
gunicorn.
I'm using the same project, same databases, only I try to use
different settings.py files with different names.
The idea is that in each gunicorn instance I set the
DJANGO_SETTINGS_MODULE to a different settings.py fi
what I mean is that each supervisor thread calls a separate gunicorn
process. Sorry I'm getting the terms confused.
Anyway, I tried it, but I'm still having trouble.
Here is my supervisor.conf
[program:gunicorn-blog-HE-development]
directory=/var/www/blog.development/private/blog
command=/var/
I have to make a blog application in multiple languages, to do this, I
decided to use zinnia and create to separate urls blogfrench.com and
blog.com (this is an example). I also used the multisite ability of
django to have a single admin interface for both blogs.
It works great, now I have a non-
Ignore the rest of these guys, and go here:
http://south.aeracode.org/docs/tutorial/part1.html#tutorial-part-1
It's called django-south, all the cool kids are using it.
Enjoy. :D
-ron
On Mar 8, 7:34 am, pankaj sharma wrote:
> same as categories i have to add affiliation to every college.
> s
val, field2=val)
You can even chain filters together to achieve the same effect:
http://docs.djangoproject.com/en/dev/topics/db/queries/#id1
If you want to OR them together, have a look at Q objects:
http://docs.djangoproject.com/en/dev/topics/db/queries/#complex-lookups-with-q-objects
Ronny
--
it loosely coupled probably should not) know anything about http
requests.
Have a look at INTERNAL_IPS setting to achieve what you want:
http://docs.djangoproject.com/en/dev/ref/settings/#internal-ips
Ronny
--~--~-~--~~~---~--~~
You received this message because you ar
lle', department]).order_by('-created')[:2]
> Later on my plan is to make the archive so the messages again is
> filtered or sorted in month, so the user can see that e.g. in November
> month this and this message was posted and in Oc
if this has any relation to your problem, but shouldn't the
verbose_plural_name value be in lowercase (i.e 'countries' not
'Countries')?
Ronny
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
&
nd out, they could inspect the generated SQL queries to check.
I only use the slice filter if it's not possible for me to know in the
view beforehand how I'm going to slice my list, or if I know for sure
the size of my list is relatively small.
Ronny
--~--~-~--~~~-
USE_I18N = True in your settings.
Ronny
--~--~-~--~~~---~--~~
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, s
not too
sure about this though). Once you get the subtotal you can display it
using custom admin template.
Hope that gives you a starting point.
Ronny
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django
e update_info() in the opener template to do whatever's
necessary.
This is similar to what django's admin is doing (see
django/contrib/admin/options.py around line 427 under response_add()).
Hope I'm still making sense. It's 1am here.
Ronny
--~--~-~--~~~-
However it's the
> logic behind that gets me. Suggestions?
James Bennett just recently wrote a (excellent) blog post about dynamic forms:
http://www.b-list.org/weblog/2008/nov/09/dynamic-forms/
Ronny
--~--~-~--~~~---~--~~
You received this message because
evs is stretching it a bit, don't you think?
>
> Have you looked at the license under which that book was released?
> http://www.djangobook.com/license/
Malcolm, I think the previously mentioned book was Practical Django
Project
t;.
That exception will always be raised if the view is called via GET
method instead of POST.
If you're sending it via POST, then the information you provided was
not sufficient. We need to see template code that renders the form (or
the html form if you're not using templates) and probably
ly saw from the exceptions that
there was an infinite recursion. It turned out that I defined a custom
Manager's get_query_set() in a very wrong way causing an infinite loop
(I stupidly returned self.filter(...) instead of calling super like
the doc says).
I don't know if this would help i
j.myapp.models import UserProfile
class UserProfileAdminInline(admin.TabularInline):
model = UserProfile
class NewUserAdmin(UserAdmin):
inlines = [UserProfileAdminInline]
admin.site.unregister(User)
admin.site.register(User, NewUserAdmin)
Ronny
--~--~-~--~~~--
e, I
> have my IP address listed in INTERNAL_IPS.
>
> Any ideas?
Do you have 'django.contrib.admindocs' in your INSTALLED_APPS?
Ronny
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django u
rticular issue first,
but if the bigger picture makes any difference: my WikiPage model is
actually an abstract model, and I wanted to provide this feature for
all of its subclasses.
I would appreciate any help.
Cheers,
Ronny
--~--~-~--~~~---~--~~
You received
filter Students with no absences?
>
> something like Student.objects.filter(absence_set__count=0)
CMIIW, but I think something like this should work:
Student.objects.filter(absence__isnull=False)
Ronny
--~--~-~--~~~---~--~~
You received this message because you are s
On Mon, Jan 5, 2009 at 11:52 PM, Bluemilkshake
wrote:
> for category in category_list:
>results = results.filter(categories__slug = category.slug)
How about results.filter(category__in=category_list)?
Ronny
--~--~-~--~~~---~--~~
You received this m
On Mon, Jan 5, 2009 at 11:59 PM, Ronny Haryanto wrote:
> On Mon, Jan 5, 2009 at 11:52 PM, Bluemilkshake
> wrote:
>> for category in category_list:
>>results = results.filter(categories__slug = category.slug)
>
> How about results.filter(category__in=category_li
an error
>
>
> {{ data.0 }} should do the trick.
Or {{ data|first }}.
http://www.djangoproject.com/documentation/templates/#first
Ronny
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django us
plenty of info regarding cron on the web:
http://www.google.com/search?q=cron
Ronny
--~--~-~--~~~---~--~~
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@googleg
x27;repeatedly' to see the progress or completion of
> the job.
There is at least one such project that is specific to Django:
http://code.google.com/p/django-queue-service/
Ronny
--~--~-~--~~~---~--~~
You received this message because you are subscribed t
7;) or 0)
half = int(m.group('half') == u'\xbd')
return (30.48 * feet) + (2.54 * inch) + (1.27 * half)
I save the length in centimeters in database, then I can reformat it
as needed in the template or admin using a custom filter.
Ronny
--~--~-~--~~
explain how this variable is assigned?
It's already set probably because INSTALLED_APPS includes
'django.contrib.sites' by default.
More info:
http://docs.djangoproject.com/en/dev/ref/contrib/sites/
Ronny
--~--~-~--~~~---~--~~
You received this message b
On Fri, Aug 29, 2008 at 2:54 AM, bkev <[EMAIL PROTECTED]> wrote:
>
> Ronny,
>
> This is fabulous...thank you so very much. If you don't mind me
> asking, can you give me an example of how you implemented this method
> in your Class? In my case, I've defined the f
#x27;admin' is not defined
This probably sounds silly, but since you don't give any code snippets
then I can't be sure. Have you uncommented the import line:
from django.contrib import admin
in urls.py?
Ronny
--~--~-~--~~~---~--~~
You receiv
On Fri, Sep 5, 2008 at 1:53 AM, bkev <[EMAIL PROTECTED]> wrote:
>
> Ronny,
>
> Thank you so very much for your input; it has helped this newbie user
> a great deal. The one outstanding problem I'm having here (and it's
> the last field in my model...)
goCon videos will be made available on the djangocon.org site.
I will make a loud announcement when they're available."
Ronny
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" gro
get the
> correct comparison. It always return true. Any idea how to fix this ?
Leon,
Any reason why {{ field.as_widget }} wouldn't work in your case?
Ronny
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
On Tue, Oct 7, 2008 at 7:31 PM, Leon Yeh | New Avenue.net
<[EMAIL PROTECTED]> wrote:
> Hi Ronny, terima kasih... :-)
Sama-sama :-)
> I am trying to generate different output for css styling purpose.
>
> For example for select widget I need to generate
>
>
> and fo
mplates supports inheritance and a way to include
other templates that should make it easier:
http://docs.djangoproject.com/en/dev/topics/templates/#id1
http://docs.djangoproject.com/en/dev/ref/templates/builtins/#include
For static blocks, there's also a 3r
]
>>>> b.filter(name__icontains='saff')
> []
Could you do:
from django.db import connection
connection.queries
to see the raw SQL queries?
Ronny
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Gro
x27;t need to) have any knowledge of that.
Ronny
--~--~-~--~~~---~--~~
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 t
Try:
r'^test/fullpath/(?P[\w/]+)
Ronny
On Mon, Mar 31, 2008 at 4:08 PM, Rishabh Manocha <[EMAIL PROTECTED]> wrote:
>
> Hey guys,
>
> I'm trying to setup my urls.py file and am having trouble getting the
> args to be passed correctly to my view. I basica
atabase directly. Other developers
would need to pay attention for additions in the SQL changes directory
and update their database accordingly whenever there's a new file
there.
Ronny
--~--~-~--~~~---~--~~
You received this message because you are subscribed t
ase template, and have all the other inherited templates
> get the forms too? the default forms are all static - no dynamic
> values.
Would a custom context processor work for you?
http://www.djangoproject.com/documentation/templates_python/#subclassing-context-requestcontext
Ronny
m.user_name.errors as a python list
(e.g. iterate with for, join, etc).
Ronny
--~--~-~--~~~---~--~~
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@googl
t;
> Anyone has some sample code?
The documentation clearly says that it's not currently possible (that
is if you're using django's auth system).
http://www.djangoproject.com/documentation/authentication/#permissions
Ronny
--~--~-~--~~~---~--~~
Yo
On Wed, May 7, 2008 at 4:21 PM, Alessandro Ronchi
<[EMAIL PROTECTED]> wrote:
> I want to make the change of the password possible only for administrators
> and
> not the whole staff. Is it possible? How I can do that?
How do you currently allow staff to change p
, you could probably record the user's trail or view
history in the database, then show it somewhere in the page, so the
user can decide themselves which page they want to go back to.
Ronny
--~--~-~--~~~---~--~~
You received this message because you are subscribed
hon kwargs (keyword arguments). You can do this:
dictionary = {field1: val1, field2: val2}
model.objects.filter(**dictionary)
Ronny
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" grou
ed to HTML only. You can do
something like this in the view:
render_to_response('style.css', {'bgcol': '#fff', })
Then in style.css you can have:
background-color: {{ bgcol }}
You might need to set the correct mime type when ser
r a different strategy completely, I
> would love to hear those as well.
You might be interested in this:
http://code.djangoproject.com/wiki/CookBookThreadlocalsAndUser
You could extend/replace the middleware to capture the domain (instead
of the user) from the
xception.
from django.db import models
try:
AnyModel.objects.get(pk=nonexistant)
except (models.ObjectDoesNotExist):
do whatever
It should work as long as AnyModel is a subclass of models.Model.
Ronny
--~--~-~--~~~---~--~~
You received this message because
s-based form, it requires that I select an author from a
> list of existing users. What I'd prefer is to leave out the author
> field entirely from the add form and have that field automatically set
> to the current user. How can I do that?
This is one way to do it:
(which I personally prefer because it's more explicit and
clear), is to do it in the view. Don't show the author field in the
form, because we want to automatically add it before saving.
def add_item(request):
...
item.author = request.u
t there doesn't seem to be a place for other SQL (like trigger
declerations).
thanks,
ronny
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to dj
Thanks a lot.
I do the following steps:
aggregate an alias to the virtual host of my site:
Alias /media /var/www/fourweb/media/
and modified:
settings.MEDIA_ROOT = '/var/www/fourweb/media/'
settings.MEDIA_URL = 'http://fourweb.com/media/'
it works!.
Cheers
Ronny
El martes
settings.MEDIA_URL, for use the imageField.
Regards,
Ronny
El jueves, 23 de mayo de 2013 03:57:02 UTC-4, Federico Erbea escribió:
>
> I'm not sure this is the correct method to use, so I'm open to suggestions.
> Practically I want to display the image retrieving the path where they ar
52 matches
Mail list logo