Re: Django ExtraField

2012-02-24 Thread Marcos Moyano
You can set a hidden input widget to the form field. Rgds, Marcos On Fri, Feb 24, 2012 at 11:26 AM, coded kid wrote: > Hi guys, How can I get rid of the field that's beside django comment > textarea? (the field, if users fill the field[honeypot] the users > comment

Re: Is there such a open source django project?

2012-04-17 Thread Marcos Moyano
If there is, this is a good place to look for it: http://djangopackages.com/ Marcos On Tue, Apr 17, 2012 at 7:12 AM, James Deng wrote: > Hi all, > > I have a case to manage my staff for customer support, basically I need a > time based schedule table. the point is that we

Re: Markers on geodjango

2012-09-14 Thread Marcos Moyano
http://invisibleroads.com/tutorials/geodjango-googlemaps-build.html Like that? Marcos On Fri, Sep 14, 2012 at 6:30 AM, Coulson Thabo Kgathi wrote: > can i place markers on geodjango maps, cant figure out how to do that > > -- > You received this message because you are

Re: Good tutorials on celeryd as a daemon needed?

2013-04-08 Thread Marcos Moyano
http://ask.github.io/celery/cookbook/daemonizing.html On Mon, Apr 8, 2013 at 6:01 AM, sparky wrote: > Hi Django people, > > I'm finding it difficult to get my head around running celeryd as a daemon > from the docs on Ubuntu. Does anyone know of any good tutorials or

Re: Republish Static Files

2013-05-07 Thread Marcos Moyano
Did you run collectstatic ? https://docs.djangoproject.com/en/dev/ref/contrib/staticfiles/#collectstatic On Tue, May 7, 2013 at 9:41 PM, wrote: > Hello, > > I have site that renders a chart using HighCharts with data from static > csv files, as well as a link to download

Re: Django Development environment

2011-08-25 Thread Marcos Moyano
Dev. Arch Linux, python2.7, django-1.3, virtualenv, postgresql (if possible), south, django-extensions, Emacs Dep. Ubuntu Server, fabric, Nginx, supervisord, uwsgi Rgds, Marcos On Mon, Aug 22, 2011 at 7:07 PM, Stephen Jackson < jackson.stephe...@gmail.com> wrote: > I am new to the world of

Form for inline formset

2011-08-27 Thread Marcos Moyano
Can someone please tell me how can I specify a form to be used by every form inside an inline formset (if possible)? Thanks in advance! Marcos -- Some people, when confronted with a problem, think “I know, I'll use regular expressions.” Now they have two problems. Jamie Zawinski, in

Re: Which IDE should I use for Django?

2011-12-19 Thread Marcos Moyano
emacs +1 On Mon, Dec 19, 2011 at 1:46 PM, george wrote: > emacs +1 > > On Dec 19, 3:42 pm, Masklinn wrote: > > On 2011-12-19, at 16:30 , Andre Terra wrote: > > > > > > > > > What do you mean by embedded Django interpreter? An instance of python > >

Re: django help

2011-04-30 Thread Marcos Moyano
Read the static-files docs On Sat, Apr 30, 2011 at 4:14 AM, Sunil Chugh wrote: > how can i used static_root > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to

Re: signals pre_save vs model's save()

2011-05-28 Thread Marcos Moyano
You can set more than 1 [pre,post]_save signal per-model, no problem. I generally, and I'm not saying this is the django way, do it like this: app_name/ __init__.py modes.py views.py signals.py Inside my signals.py I have all my signal declarations and connections. And inside

Re: django models: two foreignky for "User"

2010-11-09 Thread Marcos Moyano
Use related_name (http://docs.djangoproject.com/en/dev/ref/models/fields/#django.db.models.ForeignKey.related_name) Rgds, Marcos At Tue, 9 Nov 2010 07:20:45 -0800 (PST), luckrill wrote: > > I write following models: > > class article(models.Model): > created_by = models.ForeignKey('User')

Re: how to hide a field on

2010-11-18 Thread Marcos Moyano
class PostForm(forms.ModelForm): registered_date = forms.DateTimeField(widget=forms.HiddenInput) class Meta: model = Post class PostAdmin(admin.ModelAdmin): form = PostForm admin.register(Post, PostAdmin) Rgds, Marcos On Thu, Nov 18, 2010 at 5:11 PM, Anderson Goulart

Re: Display ForeignKey label rather than ID in a CharField

2010-11-20 Thread Marcos Moyano
You need to specify the __unicode__ method of the model holding the Fish object. ie: class FishHolder(models.Model): name = models.CharField(...) . def __unicode__(self): return self.name That should display the names instead of the ids. Rgds, Marcos On Fri, Nov 19, 2010

Re: Removing title from each admin page

2010-11-26 Thread Marcos Moyano
Sure there is. You have to override the template: django/contrib/admin/templates/admin/base.html Create an admin folder within your templates folder, copy that template over that admin folder and remove the "{{ title }}" statement. Hope it helps. Marcos On Fri, Nov 26, 2010 at 7:37 AM, Luca

Re: Newbie question: many-to-many model creation

2010-12-10 Thread Marcos Moyano
http://www.djangoproject.com/documentation/models/many_to_many/ Rgds, Marcos On Fri, Dec 10, 2010 at 8:54 AM, girish shabadimath < girishmss.1...@gmail.com> wrote: > Thanks for the reply,, > Here are my models > > class Checkers(models.Model): >name = models.CharField(max_length = 100) >

Re: Extending AdminSite for custom views

2010-12-12 Thread Marcos Moyano
Add your custom urls before the admin include urls directive: urlpatterns += patterns('', (r'^admin/myview/$', 'your_admin_view'), (r'^admin/', include(admin.site.urls)), ... and continue working as usual. Django will go through the urls in descending order matching your custom url

Re: Display related field in queryset

2010-12-13 Thread Marcos Moyano
You can use field lookups: http://docs.djangoproject.com/en/dev/topics/db/queries/#field-lookups-intro ie: Travels.objects.values('date', 'destination__name') Rgds, Marcos On Mon, Dec 13, 2010 at 6:51 AM, nsbk wrote: > Hello, > > I'm using

Re: simple.direct_to_template and query objects

2010-12-16 Thread Marcos Moyano
I think you are looking for object_detail, not direct_to_template. http://docs.djangoproject.com/en/dev/ref/generic-views/#django-views-generic-list-detail-object-detail Rgds, Marcos On Thu, Dec 16, 2010 at 9:32 AM, MarcoS wrote: > Hi people, I want to define a generic

Re: Date Error in Admin Form

2010-12-29 Thread Marcos Moyano
Take a look at the docs on how to set up valid input formats http://docs.djangoproject.com/en/dev/ref/settings/?from=olddocs#date-format Rgds, Marcos On Wed, Dec 29, 2010 at 1:39 PM, ckar...@googlemail.com < ckar...@googlemail.com> wrote: > Hi everybody, > > I'm getting a strange error with a

Re: i18n django models

2011-01-07 Thread Marcos Moyano
I've worked on/with this app https://github.com/Anue/django-polyglot/ Hope it helps. Rgds, Marcos On Fri, Jan 7, 2011 at 12:20 PM, Mo Mughrabi wrote: > Hello, > > in my design there are some models where I need to store certain fields in > different languages. I was

Re: Change null representation when you're using choices widget.

2011-02-04 Thread Marcos Moyano
Remove (None, "No Period") from your choices and left the required=False on your form field. That should work. Rgds, Marcos On Fri, Feb 4, 2011 at 11:31 AM, Marc Aymerich wrote: > On Fri, Feb 4, 2011 at 12:12 PM, Tom Evans > wrote: > > On Fri,

Re: Change null representation when you're using choices widget.

2011-02-04 Thread Marcos Moyano
s/left/leave/ sorry fot the double post. On Fri, Feb 4, 2011 at 11:37 AM, Marcos Moyano <marcosmoy...@gmail.com>wrote: > Remove (None, "No Period") from your choices and left the required=False on > your form field. That should work. > > Rgds, > Marcos > > &g

Re: Looking for IDE + FTP

2011-02-08 Thread Marcos Moyano
On Tue, Feb 8, 2011 at 5:43 PM, Daniel Roseman wrote: > On Tuesday, February 8, 2011 8:30:54 PM UTC, Karen McNeil wrote: >> >> I have three Django sites that I've been working on recently and I've >> been doing most of the development work in Dreamweaver. I don't use >>

Re: imported tuples/variables don't get translated

2011-02-08 Thread Marcos Moyano
Are you doing: from django.utils.translation import ugettext_lazy as _ ? or: from django.utils.translation import ugettext as _ ? The first one shoud work. Rgds, Marcos On Tue, Feb 8, 2011 at 7:11 PM, Ivo Brodien wrote: > If I import some tuple which is used for choices in a

Re: site styling works with development server but not apache

2011-02-17 Thread Marcos Moyano
This is the relevant VirtualHost configuration for admin media WSGI Alias /media "/usr/local/www/static/media/" Order allow,deny Allow from all MOD_PYTHON SetHandler None If this doesn't work perhaps you shoud could paste your VirtualHost

Re: External Javascript Files

2011-02-17 Thread Marcos Moyano
you need to put it in your media folder. http://docs.djangoproject.com/en/1.2/howto/static-files/ Rgds, Marcos On Thu, Feb 17, 2011 at 2:44 PM, hank23 wrote: > Is it possible to use external javascript files with a django app? If > so what folder does the javascript file

Re: Where can I find the admin/base_site.html

2011-02-23 Thread Marcos Moyano
It depends on what you are using. For me is /usr/lib/python2.7/site-packages/django/contrib/admin/templates/admin/ Hope it helps. On Wed, Feb 23, 2011 at 6:06 AM, DJ Chung wrote: > I am going through the tutorial on Djangoproject.com. I'm trying to > work on templates and

Re: values_list of ordered annotated QuerySet

2011-03-22 Thread Marcos Moyano
This should work without grabbing the entire table: [x[0] for x in Wizard.objects.filter(**filterargs).annotate(wpower=Sum('creatures__power')).order_by('- wpower').values_list('id', 'wpower')] Rgds, Marcos On Tue, Mar 22, 2011 at 5:25 PM, Andreas Pfrengle wrote: > just

Re: fixtures with updated timestamps

2011-03-30 Thread Marcos Moyano
You can write a pre_save signal http://docs.djangoproject.com/en/dev/ref/signals/#django.db.models.signals.pre_save Hope it helps, Marcos On Wed, Mar 30, 2011 at 8:09 AM, Robert Šmol wrote: > Hi, > > is it possible to load fixtures of models that have a datetime field

Re: how to setup apache server for django?

2011-04-06 Thread Marcos Moyano
You need to create a VirtualHost for each one of your projects. http://httpd.apache.org/docs/2.0/vhosts/ Marcos On Wed, Apr 6, 2011 at 5:24 AM, ug Charlie wrote: > I have tried whole day. And I just got a new django project works. > > But I want my old project works too.

Re: Any Tutorials on Django similar to Web2py ????????????????

2013-08-20 Thread Marcos Moyano
There are several ways to manage sessions, or cache. That's up to you according to your needs. You can find documentation about sessions, caching and much more here: https://docs.djangoproject.com/en/1.5/ Rgds On Tue, Aug 20, 2013 at 1:12 PM, JAI PRAKASH SINGH < jaiprakashsingh...@gmail.com>