DateTimeFields not showing up in Admin page

2008-09-06 Thread Guillermo
Hi! I have this model with two `DateTimeField`s that aren't showing up in the Admin page. According to the documentation, the default value for `editable` is "True". I can't figure out what I'm missing... (I'm using version 1.0.) Here's the relevant admin.py code: class PostAdmin(admin.ModelA

Re: DateTimeFields not showing up in Admin page

2008-09-06 Thread Guillermo
I was using the "auto_now" and "auto_now_add" options. That seems to be the cause and to my knowledge there's no way to override this. Regards, Guillermo On Sep 6, 10:17 am, Guillermo <[EMAIL PROTECTED]> wrote: > Hi! > > I have this model with two `D

Re: DateTimeFields not showing up in Admin page

2008-09-10 Thread Guillermo
y of doing this elegantly. Cheers, Guillermo On Sep 7, 2:07 pm, Steve Holden <[EMAIL PROTECTED]> wrote: > Since the whole point of those options is to ensure that the datetime > values are inserted automatically it would seem a little perverse to > want to make manual entries in t

Development server starting two processes

2009-03-14 Thread Guillermo
tirely reliably (the Powershell script might stop another random Python process). Should I be seeing only one process instead of two when I start the dev server? I'm on Windows XP Home, Django svn trunk. Cheers, Guillermo --~--~-~--~~~---~--~~ You received thi

Re: Type 'django-admin.py help. For usage.

2009-03-14 Thread Guillermo
ows.html#executing-scripts > My Computer\HKEY_CLASSES_ROOT\.py registry entry contains "C: > \Python26\python.exe" "%1" %* with the double quotes. I have this value here instead, with the same OS and Python version (ActiveState): HKEY_CLASSES_ROOT\Applicatio

Re: Development server starting two processes

2009-03-14 Thread Guillermo
ll script because I had this problem. I need to investigate this further. > To disable this, see the `--noreload` > option:http://docs.djangoproject.com/en/dev/ref/django-admin/#noreload Good. This should do the trick for me. Thanks! Guillermo --~--~-~--~~~---~-

How to establish foreign key contraints across models living in different applications

2009-09-26 Thread Guillermo
Hi all, I have one app with a Project model and another app with a TodoItem model. How can I declare Project to be the foreign key of TodoItem? Or, rather, how can I make TodoItem accept an arbitrary model as foreign key? Regards, Guillermo

Exception while rendering after installing contrib.comments

2009-10-03 Thread Guillermo
Hi, After installing the comments framework, I get the following error: The included urlconf django.contrib.comments.urls doesn't have any patterns in it I can't find any information about it. What could be causing it? I'm developing on Windows XP, Django trunk. Rega

How to customize the default comments form from contrib.comments

2009-10-03 Thread Guillermo
Hi, Specifically, I don't want to require users to enter their email addresses or an url. Regards, Guillermo --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this gr

How to restrict True value to only one row in table column

2009-10-18 Thread Guillermo
to make a sencond Thing master by mistake through the admin site. As far as I can tell, I have to override my model's save() method, but I'm not sure how well that will play with the automatic admin site... Regards, Guillermo --~--~-~--~~~---~--~~ You r

How to enforce uniqueness based on two model fields

2009-10-18 Thread Guillermo
Hi all, I want my records to be unique for field A and B together, so that no two records can share the same values for those particular fields. How can this be declared in the model? Regards, Guillermo --~--~-~--~~~---~--~~ You received this message because you

Re: How to enforce uniqueness based on two model fields

2009-10-18 Thread Guillermo
admin interface so that I know what's happened? Regards, Guillermo On Oct 18, 8:04 pm, Guillermo wrote: > Hi all, > > I want my records to be unique for field A and B together, so that no > two records can share the same values for those particular fields. How > can this be declared

Re: How to enforce uniqueness based on two model fields

2009-10-18 Thread Guillermo
ing! > > 2009/10/18 Guillermo > > > > > > > > > Ok I've done the following: > > > def save(self): > >        r = TargetMessage.objects.filter(src_fk=self.src_fk, > >                                        lang_fk=self.lang_fk) > >  

virtualenvwrapper for Windows (Powershell)

2010-05-09 Thread Guillermo
Hi, If you've ever missed it on Windows and you can use Powershell, you might want to take a look at this port of virtualenvwrapper: http://bitbucket.org/guillermooo/virtualenvwrapper/wiki/Home Regards, Guillermo -- You received this message because you are subscribed to the Google G

How to share settings file in multiprogrammer project

2010-03-28 Thread Guillermo
same settings during development? Cheers, Guillermo -- 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...@goog

TemplateDoesNotExist at /admin/

2008-01-15 Thread Guillermo
27;s out of the question for me now --can't use Subversion. I've gone through the tutorial twice step by step, so I don't think I forgot any instructions explained there. Does anyone know how to fix this? I'm dying to start developing website

Re: TemplateDoesNotExist at /admin/

2008-01-16 Thread Guillermo
code. Regards, Guillermo On Jan 16, 1:37 am, 1234 <[EMAIL PROTECTED]> wrote: > settings.py > > TEMPLATE_DIRS = ( > # Put strings here, like "/home/html/django_templates" or > "C:/www/django/templates". > # Always use forward slashes, even on Windows

Re: TemplateDoesNotExist at /admin/

2008-01-16 Thread Guillermo
ur > site-packages directory. I thought of that as soon as I saw J. Cliff Dyer's post. I'll give it a try and post back with the results. Thanks, Guillermo --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Grou

Re: TemplateDoesNotExist at /admin/

2008-01-16 Thread Guillermo
Now it worked! :-) These two folders were missing in my install: python/libs/site_packges/django/contrib/admin/templates python/libs/site_packges/django/contrib/admin/media Copying them from the downloaded django installation files does the trick. Cheers, Guillermo

Re: Problem in installing Django on Windows XP

2008-01-18 Thread Guillermo
Hakan, Assuming you are using Django 0.96.1, make sure you're installing from a top folder in your drive. E.g.: d:\django Not something like: d:\django\django\ That worked for me. Regards, Guillermo --~--~-~--~~~---~--~~ You received this message becaus

Re: Ruby on Rails vs Django

2008-12-06 Thread Guillermo C.
Hi. - Scaffolding: I prefer it over django admin in many situations. I mean, when you're doing something complex you'll need to drop out the django admin and write your own code, so it's cool to have the basic CRUD code and develop from that. - Database ORM: Both orm (rail's ActiveRecord and Djan

Re: Show HTML in Labels for Model Choice Fields

2013-05-22 Thread Guillermo Siliceo
Hey Adi your answer saved me lots of work, but i want to elaborate on it, i had this use case but i didnt have to subclass the field all i did was defined a new label_from_instance def Option_with_specie(self): return mark_safe(" %s "%(self.species.name, self.pk, self.name)) And then on t

Jinja templates structure

2017-02-24 Thread Guillermo Gonzalez
Hi guys! I'm involved in a big Django project and I'm trying to propose a way to organize the big amount of jinja templates that we have in our project. The way I'm proposing to oganize them is following a BEM methodology, where all the pages used by a DjangoView being in a *pages* folder, an

Re: published permission

2007-02-28 Thread Guillermo Fernandez Castellanos
Hi, As far as I know, you can not do it. You are better using the generic views and crafting an add/update view of your own. Hope it helps, G On 2/28/07, Mary <[EMAIL PROTECTED]> wrote: > > Please any help will be appreciated i have a very soon deadline :( > > Thank you in advance; > Mary Ade

Re: URL config, patterns

2006-09-30 Thread Guillermo Fernandez Castellanos
Hi, > urlpatterns = patterns('probob.app1.views', > (r'^$', 'index'), > (r'^test/', 'XXX'), > ) > where XXX I want to refer to 'probob.app2.views.foo'; however django is > going to make it refer to 'probob.app.views.probob.app2.views.foo'. Is > there a way to get around this? Yes

Re: Mile-high view of Django (was "Re: Cannot get Many to Many Relationship To work...")

2006-10-03 Thread Guillermo Fernandez Castellanos
Hi, This might help: http://simon.incutio.com/archive/2005/08/15/request Enjoy, G On 10/3/06, Tim Chase <[EMAIL PROTECTED]> wrote: > > >> Jay, I did read the documentation before jumping in - but > >> it's not all necessarily clear for someone who hasn't alot > >> of experience in Python of D

Re: what about example of project ?

2006-10-07 Thread Guillermo Fernandez Castellanos
Hi, Some examples here: http://groups.google.com/group/django-users/browse_thread/thread/5615ffe5707d9b92/de7eb2cd4060bad5?lnk=gst&q=code+examples&rnum=5#de7eb2cd4060bad5 Enjoy, G On 10/7/06, Marco Amato <[EMAIL PROTECTED]> wrote: > > Hi ! > > I am not a big programmer , and I will found usefu

Re: Django Project Manager for Vim

2006-10-10 Thread Guillermo Fernandez Castellanos
> * Filter out __init__.py files and any other files not needed. But take care. Some __init__.py files have actually code inside (like the /django/contrib/auth/__init__.py one) G --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Goo

Birthday

2006-10-12 Thread Guillermo Fernandez Castellanos
Hi, I am trying to keep a birthday field in the database. But i am only interested in the day and month. Is there a way of using a DateField but only with day and month fields? Or should I use another solution? Thanks, G --~--~-~--~~~---~--~~ You received this m

Re: Birthday

2006-10-13 Thread Guillermo Fernandez Castellanos
<[EMAIL PROTECTED]> wrote: > > On 13 Oct 2006, at 0:24, Guillermo Fernandez Castellanos wrote: > > I am trying to keep a birthday field in the database. But i am only > > interested in the day and month. Is there a way of using a DateField > > but only with day and month f

Re: email_user with text/html type

2006-10-13 Thread Guillermo Fernandez Castellanos
Hi, This might help you get going (see at the end). I modified a bit the function that sends the mail in Django. It is probably very far from as good as it could be. I am actually surprised as well that there's no function for that. Hope it helps, G # Use this module for e-mailing. from djan

Re: ImageField

2006-10-16 Thread Guillermo Fernandez Castellanos
I had a similar problem. I havent found any definitive solution, but there is some solutions that might help: Create a new model: class Image(models): image = models.ImageField(...) Add to your post model: images = models.ForeignKey(Image) Then, create a special view to create posts, wh

Todo application -- where it is?

2006-10-18 Thread Guillermo Fernandez Castellanos
Hi, I remember seing in the Django website, in the examples section, a nice TODO application, developped with Django 0.91, with nice images (cartoon faces in different colors) and a nice model. There was a sandbox in the homepage to play with it. I was looking for it recently and it seems to hav

Re: Todo application -- where it is?

2006-10-18 Thread Guillermo Fernandez Castellanos
That's it, thanks! G On 10/19/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Here is a link to the Django Powered Sites: > > > http://code.djangoproject.com/wiki/DjangoPoweredSites#Variousapplications > > Look for WorkStyle. The project page is still up, but the sandbox was > broken last

Re: ImageField

2006-10-18 Thread Guillermo Fernandez Castellanos
Indeed... I made a mistake. I was thinking of: class Image(models): image = models.ImageField(...) post = models.ForeignKey(Post) That way you can have all images of a post like p.image_set.all() and you can construct the copy-and-paste URL. Sorry for the confusion, G On 10/19/06, berto

Comments and karma tutorial

2006-10-24 Thread Guillermo Fernandez Castellanos
Hi, I've written a tutorial (well... actually two in one) about how to use the Comment (not FreeComment) and Karma parts of Django: http://www.guindilla.eu/blog/2006/10/21/comment-and-karma-functions-django-framework/ It involves some changes to the code, as I've found what seems to be a bug. Th

Re: Comments and karma tutorial

2006-10-25 Thread Guillermo Fernandez Castellanos
Sorry, back from a trip. Happy to see that some people tried it and that it works. Thanks! > I've been looking at this as well. It appears that the ratings and > comments are tied together and must be submitted together. Is this > true? I'd like a user to submit a comment along OR rate it OR

Re: directed graph in default admin

2006-10-26 Thread Guillermo Fernandez Castellanos
Cheers, have a look at the Meta options order_with_respect_to and ordering: http://www.djangoproject.com/documentation/model_api/#order-with-respect-to Hope it helps, G On 10/24/06, John Lenton <[EMAIL PROTECTED]> wrote: > > Hi all. > I've got an app where I have a table of nodes, and a table

Re: Yet another karma/comment question

2006-10-26 Thread Guillermo Fernandez Castellanos
Hi, Looking at the model, you can see that: class KarmaScore(models.Model): user = models.ForeignKey(User) comment = models.ForeignKey(Comment) [...] So I would think that, if there's a comment of a given user, you can know if he voted or not by doing a template tag that takes a comm

Re: Sharing models between apps

2006-10-30 Thread Guillermo Fernandez Castellanos
Cheers, The nice thing is, you can import your models to any application. For instance, you have app1/gallery with models.py inside that defines Photo and Gallery, and you have app2/photorating with models.py inside. You need for your Rating model in app2 to use the Photo model of app1. No worr

Re: Combining apps?

2006-10-30 Thread Guillermo Fernandez Castellanos
You can find the actual code here. For the template tag: http://svn.guindilla.eu:8000/guindilla/trunk/guindilla/polls/templatetags/guindilla_polls.py Fo the html: http://svn.guindilla.eu:8000/www_guindilla_eu/templates/guindilla/polls/open_polls.html And for how to use it: http://svn.guindilla.e

Re: Just when I think I've got Karma working

2006-10-30 Thread Guillermo Fernandez Castellanos
to this object (self.karmascore_set.all()) and calculate the total karma by iterating over those. Hope it helps, G On 10/30/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > With help from Malcolm, Guillermo and others, I thought I had this > karma thing working. Apparently I do not.

Re: Just when I think I've got Karma working

2006-10-31 Thread Guillermo Fernandez Castellanos
/ and is sometimes difficult to answer such questions without the whole code and some testing. Hope it helps, G On 10/31/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Guillermo Fernandez Castellanos wrote: > > Hi, > > > > Just guessing, but if I understood we

Re: django for non-web apps?

2006-10-31 Thread Guillermo Fernandez Castellanos
It's something I've often though about. I've used databases in many projects, both web and not-web based. And I am now sure that Django would have been a great help in those non-web applications as well. The problem would then be to strip Django of all those web-specific libraries it's bundled w

Re: django for non-web apps?

2006-10-31 Thread Guillermo Fernandez Castellanos
e ago that there's a function that allows to automagically do this by adding it at the beginning of a program. Hope it helps, G On 10/31/06, Rob Hudson <[EMAIL PROTECTED]> wrote: > > I think the tricky part is what Guillermo is saying. All views take a > request object a

Using admin js in template code

2006-11-01 Thread Guillermo Fernandez Castellanos
Hi, I've a model with a DateTimeField in it, and I'm creating a form to add objects. So, I create the form for the DateTimeField. Up to here, everything ok, it works. Now I would like to add the js helpers we can find when we use the admin to create an object (the little calendar and watch with

Re: Does Django have convenient multilevel access?

2006-11-01 Thread Guillermo Fernandez Castellanos
Hi, I have a system with 3 levels of permissions in an app at work, and it has been relatively easy to do. You have three things that will help you: - The ability of creating "groups" with different permissions. - The @login_required and @permission_required, that will allow you a per-view restr

Re: wrong hashed pw for web admin interface

2006-11-03 Thread Guillermo Fernandez Castellanos
It seems to me that you might have created the user but you did not give him the privileges to enter the admin interface. Enter the admin with your... admin user :-) Go to Users, select the user and check the 'Is staff' option to allow him to enter the admin site. Then, logout and try to enter wi

Re: Template Apply

2006-11-04 Thread Guillermo Fernandez Castellanos
Hi, I use the include tag: {% for object in object_list %} {% include "myapp/object.html" %} {% endfor %} The nice things is that include renders the template with the current context, that is automagically passed to the myapp/object.html template: http://www.djangoproject.com/documentation/

Re: inclusion tag for login screen.

2006-11-05 Thread Guillermo Fernandez Castellanos
Check this: http://brehaut.net/blog/2006/08/21/django-user-logins/ If you want a complete and working example, tell me and I'll send you one. Hope it helps, G On 11/1/06, MerMer <[EMAIL PROTECTED]> wrote: > > I am thinking about creating a small login form as an inclusion tag, to > display wit

Re: Brasilian fellow with charcode problem...

2006-11-05 Thread Guillermo Fernandez Castellanos
Hi, I had the same problem in Spanish. You must save your templates as UTF-8. For example, in Windows Notepad you can do a save-as and choose UTF- as encoding, instead of ASCII. Hope it helps, G On 11/1/06, Italo Maia <[EMAIL PROTECTED]> wrote: > > Well, here's the problem, in portuguese(my id

Re: Generic Views

2006-11-06 Thread Guillermo Fernandez Castellanos
Hi, Try adding the option allow_empty=True in your urls: http://www.djangoproject.com/documentation/generic_views/#django-views-generic-date-based-archive-index It is false by default, and when there's nothing to show, it throws a 404 error :-) Hope it helps, G On 11/6/06, [EMAIL PROTECTED] <

Re: Generic Views

2006-11-06 Thread Guillermo Fernandez Castellanos
Hi, Sorry... I might have written too fast, it does not seem to be your answer... x Please, send the models.py and the urls.py and we'll try to have a look. G On 11/6/06, Guillermo Fernandez Castellanos <[EMAIL PROTECTED]> wrote: > Hi, > > Try adding the option allow_emp

Re: Re: Generic Views

2006-11-06 Thread Guillermo Fernandez Castellanos
Got it!! I tried the code at home, and it did not work for me neither. I then tried object_list instead of archive_index and it worked well. So i tried archive_index again with the allow_future=True option and it worked. My guess: You are not on the America/Seattle time zone, and for the syste

Re: moving django applications

2006-11-10 Thread Guillermo Fernandez Castellanos
Hi, Maybe this will help you: http://www.djangoproject.com/documentation/sites/ G On 11/10/06, sandro.dentella <[EMAIL PROTECTED]> wrote: > > hi all, > > how should I organize my configuration so that it's easy to have > several django applications in the same apache (not as virtual > domains

Re: moving django applications

2006-11-10 Thread Guillermo Fernandez Castellanos
.. G On 11/10/06, Sandro Dentella <[EMAIL PROTECTED]> wrote: > > On Fri, Nov 10, 2006 at 05:43:28PM +0100, Guillermo Fernandez Castellanos > wrote: > > > > Hi, > > > > Maybe this will help you: > > http://www.djangoproject.com/documentation/sites/ >

Re: Add to Favourites type feature?

2006-11-11 Thread Guillermo Fernandez Castellanos
Hi, You have the UserFlag option in the django.contrib.comments code as an example of flagging applied to Comments. It might be easier to take the code and make it general with Generic relations: http://www.djangoproject.com/documentation/models/generic_relations/ or take it as an example for you

Re: datetime in template not displaying

2006-11-13 Thread Guillermo Fernandez Castellanos
Check this: http://www.djangoproject.com/documentation/forms/#c1576 I had the same error a few weeks ago :-) Hope it helps, G On 11/13/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Hi! > > I have "models.DateTimeField defined in my model as "date_today". > > date_today

Re: Blog engine

2006-11-16 Thread Guillermo Fernandez Castellanos
There is a few examples if you look in the mailing list: http://code.djangoproject.com/browser/djangoproject.com/django_website/apps/blog http://www.fallingbullets.com/blog/2006/nov/02/falling-bullets-source-code-you-ninnies/ http://www.rossp.org/blog/2006/may/15/django-magic-removal-upgrade/ http

Re: Template for a calendar?

2006-11-17 Thread Guillermo Fernandez Castellanos
I've just implemented this for a web page: http://svn.guindilla.eu:8000/guindilla/trunk/guindilla/events/ It's probably not the most optimized solution, but it works for me. I use a context processor to pass all the information I need to create the calendar to all my views. I keep my events in t

Re: Template for a calendar?

2006-11-18 Thread Guillermo Fernandez Castellanos
> One question though: Could you explain what GUINDILLA_CALENDAR_BASE > refers to? When you put an app somewhere it always comes with an urls.py that you include in your main urls.py. When you include that urls.py, you can include it under whatever name you want: (r'^events/', include('g

Re: Template for a calendar?

2006-11-18 Thread Guillermo Fernandez Castellanos
aner'. Another option would be to extract automatically my GUINDILLA_CALENDAR_BASE from the views with a urlresolvers, but it's even messier. Thanks, G On 11/18/06, Ivan Sagalaev <[EMAIL PROTECTED]> wrote: > > Guillermo Fernandez Castellanos wrote: > > In that case, pe

Re: Template for a calendar?

2006-11-18 Thread Guillermo Fernandez Castellanos
And what about the admin "view on site" and the feeds? They both depend on the get_absolute_url. How could this be 'integrated' as well into your solution? G On 11/18/06, Ivan Sagalaev <[EMAIL PROTECTED]> wrote: > > Guillermo Fernandez Castellanos wrote: > &g

Re: Combining apps?

2006-11-19 Thread Guillermo Fernandez Castellanos
I use: return HttpResponseRedirect(request.META['HTTP_REFERER']) But maybe is this considered as bad practice? I am not familiar with such things and I've to improvise more often than not on such problems. it works perfectly for me in any case. Hope it helps, G On 11/19/06, ringemup <

Re: auto total field

2006-11-19 Thread Guillermo Fernandez Castellanos
Did you put the Stock model before the OrderItem model? Sometimes this makes problems. If you did, what about this as an alternate solution? class Stock(models.Model): price = models.FloatField(max_digits=10, decimal_places=2) class OrderItem(models.Model): quantity = models.SmallIntegerF

Re: Combining apps?

2006-11-19 Thread Guillermo Fernandez Castellanos
> The problem is that if I'm putting polls on every page of the blog, > then I have to change each URL in the urlconf to optionally include a > has_voted variable, right (since I'm returning people to their > originating page via a redirect, not via the POST request itself)? In this case, you can

Re: manage.py webserver

2006-11-29 Thread Guillermo Fernandez Castellanos
Hi, > > I suspect you hit one small Django controversy. The generic view > > object_list would give you 404 error when the list it tries to show is > > empty. The view is there, it works, finds the list -- all is Ok. It just > > has this strange behavior by default. To overcome it you can add > >

Re: General File Upload Questions.

2006-12-01 Thread Guillermo Fernandez Castellanos
This might help you: http://code.djangoproject.com/ticket/2070 G On 12/1/06, Paul Childs <[EMAIL PROTECTED]> wrote: > > > Paul Childs wrote: > > > > 1. Is there an upper limit to the size of files that one can upload to > > Django? I am able to upload files of about 5 MB or less with no > > prob

Re: Database question

2006-12-01 Thread Guillermo Fernandez Castellanos
Cheers, I would do it in a single table. Maybe i would add a field to the Post like: MINISTRY_CHOICES = ( ('MUS', 'music'), ('SIN', 'singles'), ('STU', 'students'), ) ministry = models.CharField(ma

Re: manage.py can't see project

2006-12-01 Thread Guillermo Fernandez Castellanos
Ok... blind try. If your my_project is in /path/to/my_project, and you have your manage.py in that directory, tr adding those lines: import sys sys.path.append('/path/to) I have to manually add the parent directory to the sys.path in order to use my applications. G On 12/1/06, [EMAIL PROTECTE

Re: Database question

2006-12-01 Thread Guillermo Fernandez Castellanos
> Thank you. That is what I was thinking but I wanted to get others > opinions first. This will also help stay with the DRY ideals. I guess > the real difficult part would be if a new ministry is added to the > list. If I understand how it works I would have to make changes in the > model and then

Re: manage.py can't see project

2006-12-01 Thread Guillermo Fernandez Castellanos
; and using nesh.thumbnail with no problem, it's just that manage.py > isn't recognizing it. > > I'm pretty sure I have a pythonpath and/or sys.path issue, but don't > know how to resolve it. When I output sys.path (as above), I don't see > any django stuff in th

Re: manage.py can't see project

2006-12-01 Thread Guillermo Fernandez Castellanos
ok... Try to do a ln -s (or simply move) of your django directory to the /usr/local/lib/python2.4/site-packages directory, so you have: /usr/local/lib/python2.4/site-packages/django/ Usually it's the place to put it. Maybe it's that... G On 12/1/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

Re: Database question

2006-12-01 Thread Guillermo Fernandez Castellanos
> It almost seems that I could do away with the MINISTRY_CHOICES piece > and just use the tags because if a tag name does not already exist the > admin interface will allow one to be created from the Entries page. If > that is the case then if I want a page to only display the posts for > music (a

Re: using a global login form

2006-12-05 Thread Guillermo Fernandez Castellanos
Hi, For every page login form, check: http://brehaut.net/blog/2006/08/21/django-user-logins/ No need to use the login view. Use the authenticate function instead. Hope it helps, G On 12/4/06, Milan Andric <[EMAIL PROTECTED]> wrote: > > Hello, > > I'm having the same problem as this thread: >

Re: variables within the skeleton template

2006-12-11 Thread Guillermo Fernandez Castellanos
Maybe middleware is what you are thinking of: http://www.djangoproject.com/documentation/middleware/ G On 12/11/06, Sigurdur Einarsson <[EMAIL PROTECTED]> wrote: > > Hello group, > > How can a call variables, objects, attributes within the skeleton > template. > > For example if I would like a d

Re: restricting comments to registration/login using django.contrib.comments

2006-12-16 Thread Guillermo Fernandez Castellanos
If you want only registered people to use comments use Comments instead of FreeComments. G On 12/15/06, Milan Andric <[EMAIL PROTECTED]> wrote: > > In my urls.py, following the wiki docs on FreeComment, I'm using > (r'^comments/', include('django.contrib.comments.urls.comments')), > > But th

Re: Running Django on OpenBSD...best practices?

2007-01-09 Thread Guillermo Fernandez Castellanos
Hi, Another option that has been considered by more and more people is Nginx. This page it's in polish, but the configuration files are pretty understandable: http://www.python.rk.edu.pl/w/p/django-pod-serwerem-nginx/ A podcast is here: http://mx.bw.rulez-forever.com/Django-Nginx-FastCGI-screenca

Django's FastCGI init.d script for Linux

2007-01-12 Thread Guillermo Fernandez Castellanos
must be started #in a very specific way with manage.py. This must be done #for each DJango web server that has to run. ### END INIT INFO # # Author: Guillermo Fernandez Castellanos # <[EMAIL PROTECTED]>. # # Version: @(#)fastcgi 0.1 11-Jan-2007 [EMAIL PROT

Re: A calendar-like view in Django/Python...

2007-01-14 Thread Guillermo Fernandez Castellanos
Hi, I've done something very similar myself and I've found the python module 'calendar' very useful, specially the monthcalendar function. If you're using the 2.5 version, they have the HTMLCalendar class, that looks also very promising :-) If you are interested in the specific code, send me a

Re: Django's FastCGI init.d script for Linux

2007-01-14 Thread Guillermo Fernandez Castellanos
Hi, I added it to the wiki, in a page linked to: http://code.djangoproject.com/wiki/ServerArrangements in a new index called "FastCGI init scripts" as you proposed. Thanks, G On 1/12/07, Michael Radziej <[EMAIL PROTECTED]> wrote: Hi, could you put this into the wiki? This type of stuff is

Re: mod_python/sqlite status

2007-01-17 Thread Guillermo Fernandez Castellanos
Hi, I use SQlite with Apache mod_python for my (low traffic) web sites. I find it really easy to manage, and it works just great up to now. It has never crashed in 3 months, can accept several users concurrently, is fast and has minimum configuration. I would recommend it for development and lim

Re: Project organization and decoupling

2007-01-17 Thread Guillermo Fernandez Castellanos
I place my templates inside the "app_name/templates/app_name" directory. It seems template search path look for the template on this directory first. So, to decouple the app, templates should be inside it I think. But what would happen in this case if two sites use very different templates for

Re: Multiple applications and conflicting admin privileges ...

2007-01-17 Thread Guillermo Fernandez Castellanos
Mmm... it's a bit confusing. If I get you, you have 2 projects. Project1 has 2 apps that you would like to reuse in Project 2. And you have 2 different DB, one for each. And you are wondering how the projects will differenciate them? There is right now a thread about project and application dif

Re: newbie question

2007-01-18 Thread Guillermo Fernandez Castellanos
Hi, You are simply supposed to run Apache (/etc/init.d/apache2 start) and, if well configured, mod_python will take care of everything. With Apache, you're not supposed to use manage.py in any way. The thing you must think about is to add a web server to, well... serve the /media files. For tha

Re: newbie question

2007-01-18 Thread Guillermo Fernandez Castellanos
In that case, the problem seems to be in your urls.py file. The fact is, the name of yur app does not have to be the name of the url to access your app. I mean, you can have an app called 'fun' and access it as /fun/, /now/, /whatever/,... this will be defined in urls.py. Now, did you try to a

Re: Generic Views - problem with template missing

2007-01-20 Thread Guillermo Fernandez Castellanos
Maybe you need the allow_empty=True option in your urls.py. G On 1/20/07, Panos Laganakos <[EMAIL PROTECTED]> wrote: > > I'm using Django 0.95 release. > > I've got a simple blog, which I wanna move to generic views. > > in settings.py: > TEMPLATE_DIRS = ( > '/home/panos/projects/panos/templ

Re: How to set "REMEMBER ME"

2007-01-21 Thread Guillermo Fernandez Castellanos
Hi, I have some web sites where some identification is needed. In those, when I log in and do not explicitelly log out, I keep logged for days and days, and when I go back to the page I'm still logged in. i guess (and it's only a guess) that, because the authentification work with sessions, you'

Re: making session var available to all templates?

2007-02-08 Thread Guillermo Fernandez Castellanos
Hi, > This has been asked several times, but I am not clear on how people > are solving it. From what I understand so far, a setting called > "TEMPLATE_CONTEXT_PROCESSORS" can be tweaked to make this possible. > However, I'm not seeing a clear way to do that. A context processor is nothing more

Re: sqlite problems

2007-02-14 Thread Guillermo Fernandez Castellanos
Hi, Try this (http://code.djangoproject.com/wiki/NewbieMistakes): Django says "Unable to Open Database File" when using SQLite3 ¶ Problem ¶ You're using SQLite3, your DATABASE_NAME is set to the database file's full path, the database file is writeable by Apache, but you still get the above erro

Problems with list_filter

2006-05-17 Thread Guillermo Fernandez Castellanos
Hi, I'm very new to Django, and I'm a bit overhelmed with doc, so I might have missed something. Thanks for redirecting me then :-) I've this model (simplified): class Department(models.Model): name = models.CharField(maxlength=10,primary_key=True) class Admin: pass class Job(m

Re: Problems with list_filter

2006-05-17 Thread Guillermo Fernandez Castellanos
> > My problem is that 'department' in list_display works just great, > > while in list_filter in makes an error: > > Request Method: GET > > Request URL: http://127.0.0.1:8000/admin/unitmanager/unit/ > > Exception Type: FieldDoesNotExist > > Exception Value: name=branch > > Exce

order_by in different tables

2006-05-30 Thread Guillermo Fernandez Castellanos
Hi, I've been reading the documentation about order_by(). They say, amont others, that: """ To order by a field in a different table, add the other table's name and a dot, like so: Entry.objects.order_by('blogs_blog.name', 'headline') """ Unfortunately, I do not quite get the example, and I've n

Re: Wiki or Blogs done with django

2006-06-01 Thread Guillermo Fernandez Castellanos
Hi, I've been following the discussion with interest. I've seen that many of you have concentrated on the actual code. But something I would find also helpful/interesting is a "standard" model of blog. Or, to push the idea further, a djangoforge of models. Often, the model is one of the parts th

Re: Django models question

2006-06-02 Thread Guillermo Fernandez Castellanos
I'm a beginner, but I would do like this: class Reservation(models.Model): properties=model.CharField(maxlength=7,primary_key=True) class Restaurant(models.Model): name=models.CharField(maxlength=30,primary_key=True) reservations=models.ForeignKey(Reservation) class Theater(models.M

Re: order_by in different tables

2006-06-04 Thread Guillermo Fernandez Castellanos
ady happen with other commands as the get() or the filter(). In deed, you can find in those commands arguments like table1__table2__name__exact. I'll follow this thread with interest anyway. Thanks again for your answers. G On 6/4/06, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: >

Development web server not serving css and admin files?

2006-06-09 Thread Guillermo Fernandez Castellanos
Hi, I'm developping an (several?) applications with Django, and I use the development webserver. It works great, besides a tiny problem: the django dev webserver doesn't seem to serve static files (i.e. js, images, css etc..), except for urls in the built-in admin server. Is it the intended way

Re: Development web server not serving css and admin files?

2006-06-10 Thread Guillermo Fernandez Castellanos
Oh! Actually, I had read some about the static files, but had not made the relation between that and serving css and images in development server. How silly of me! Thanks for the (boring and not so boring ;-) explanation, both were as useful. G On 6/10/06, Frankie Robertson <[EMAIL PROTECTED]>

No such column error + tag question

2006-06-14 Thread Guillermo Fernandez Castellanos
Hi, I've been developping a link model (see at the end of the post, kind of personal delicious) , and when I try to use the admin interface to add a url, I obtain the following error: Request Method: GET Request URL:http://127.0.0.1:8000/admin/links/link/ Exception Type: Opera

Re: No such column error + tag question

2006-06-15 Thread Guillermo Fernandez Castellanos
Hi, Thanks for the answer. > > It is really curious because the table seems to exist. > Does the column exist too? Mmm... I'm afraid I do not really get the difference between the two... Let's say that I've checked the tables with sqlite3 (.table and .schema) and that I'm able to enter data into

  1   2   >