Re: regex problem in urls.py in Django 1.1/mod_wsgi

2009-09-05 Thread Jim Myers
Thanks, but that doesn't do it either. I changed the regex to: ^portal/student/(?P\S+)/profile_edit/$ and it still doesn't match :( On Sep 5, 9:44 pm, Karen Tracey wrote: > On Sat, Sep 5, 2009 at 11:32 PM, Jim Myers wrote: > > > Hi, I'm using this regex

Template tag for getting CSS/scripts/images

2009-09-05 Thread Wiiboy
I'm considering making a custom template tag that returns a url to a css file or image file. In your opinion, is it a waste of time? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to

Re: regex problem in urls.py in Django 1.1/mod_wsgi

2009-09-05 Thread Karen Tracey
On Sat, Sep 5, 2009 at 11:32 PM, Jim Myers wrote: > > Hi, I'm using this regex in urls.py: > > r'^portal/student/(?P\S+)/profile_edit$' > > There's no trailing slash on this regex, but there is an end of string marker ($). So a match will have to end with 'profile_edit', no

Re: Image Location

2009-09-05 Thread Karen Tracey
On Sat, Sep 5, 2009 at 7:37 PM, A. Rossi wrote: > > I am suffering a similar problem, but I think the problem is that my > URLConf is improperly configured to display the images. > Could somebody direct me to the proper documentation for displaying > static images with the

Re: django pagination

2009-09-05 Thread Karen Tracey
On Sat, Sep 5, 2009 at 4:52 PM, Michael Ralan wrote: > > Hi, > > Apologies if this question has been asked before but I was not able to > find a satisfactory answer. > > In the django admin app there is a capability to have a pagination > object that lists the number of pages

Re: PostgreSQL or MySQL, What are the +'s and -'s?

2009-09-05 Thread Joshua Russo
Thanks, that is a good example. Back to the original point of the post. It looks like I'm going to be doing a lot more work with PgSQL. I see they are working to put replication in the core in the next major subversion (which honestly I rarely need). The real kicker for me is that PgSQL seems to

Re: Django remove value from field with attrs disabled="disabled"

2009-09-05 Thread Karen Tracey
On Sat, Sep 5, 2009 at 1:52 PM, eli wrote: > > Hi, > > I have problem with Django Forms and field with set attrs to > disabled="disabled" > > [snip] > And now, Django remove values form field with attrs 'disabled': > 'disabled' ("readonly" without "disabled" works fine,

regex problem in urls.py in Django 1.1/mod_wsgi

2009-09-05 Thread Jim Myers
Hi, I'm using this regex in urls.py: r'^portal/student/(?P\S+)/profile_edit$' to try to match this url: http://dd..org/portal/student/xx.yy/profile_edit/ It's supposed to put "xx.yy" into userid parameter and match and use the associated view. But it doesn't match. I've banged my head

Re: PostgreSQL or MySQL, What are the +'s and -'s?

2009-09-05 Thread Siemster
++ Zberteoc for the link to the comparison. w.r.t. using triggers/procedures. If a database is getting updated by multiple applications then using triggers/procedures to move duplicated business rules into the database starts to make some sense-- even more so if you don't have good control over

Re: Image Location

2009-09-05 Thread A. Rossi
I am suffering a similar problem, but I think the problem is that my URLConf is improperly configured to display the images. Could somebody direct me to the proper documentation for displaying static images with the dev server? On Aug 23, 9:18 am, "J. Cliff Dyer" wrote:

Re: Parsing / Deserializing a JSON String

2009-09-05 Thread Eric
Thank you for your input. I tried what you suggested by first just trying to loop through the data like so: " test_output = 0 for obj in serializers.deserialize('json', gantt_data)['ganttgroups']: test_output = test_output + 1 " This generated the following error: "'generator' object

Re: Pytz time conversion issue

2009-09-05 Thread zweb
I figured it out. I should be using pytz localize function and not passing tzinfo to datetime. WRONG: local_dt = datetime (dt.year,dt.month,dt.day,dt.hour,dt.minute,dt.second,tzinfo=local_timezone) RIGHT:local_dt = local_timezone.localize(datetime

Re: DST or not

2009-09-05 Thread Brian Neal
On Sep 5, 4:03 pm, zweb wrote: > Is there any way to know if for a timezone , on a praticular date > time, is DST active or not? > it is required by localize command of pytz. How to find it > programatically? > > >>> est_dt = eastern.localize(loc_dt, is_dst=True) > >>>

Pytz time conversion issue

2009-09-05 Thread zweb
Converting from local to utc: local Timzone: America/Los_Angeles local_dt 2009-09-17 00:00:00-08:00 utc_dt 2009-09-17 08:00:00+00:00 ( after converting from local to utc) when I convert back from UTC to America/Los_Angeles, I get back local_dt 2009-09-24 01:00:00 which is one hour from where I

DST or not

2009-09-05 Thread zweb
Is there any way to know if for a timezone , on a praticular date time, is DST active or not? it is required by localize command of pytz. How to find it programatically? >>> est_dt = eastern.localize(loc_dt, is_dst=True) >>> edt_dt = eastern.localize(loc_dt, is_dst=False)

django pagination

2009-09-05 Thread Michael Ralan
Hi, Apologies if this question has been asked before but I was not able to find a satisfactory answer. In the django admin app there is a capability to have a pagination object that lists the number of pages that can be paged. I have found code that uses the django Paginator object which

Pytz time conversion issue

2009-09-05 Thread zweb
When I convert from Pacific time to UTC to db local Timzone: America/Los_Angeles to db local_dt 2009-09-07 00:00:00-08:00 to db utc_dt 2009-09-07 08:00:00+00:00 when convert from UTC to Pacific time utc_dt 2009-09-07 08:00:00+00:00 local_tz America/Los_Angeles local_dt 2009-09-07 01:00:00

iceweasel 3.0.6 create unser cache problem

2009-09-05 Thread Manuel Ignacio
Hi, when i store my password on icewasel 3.0.6 private data, and i want to create a new user, the new user form is preloaded with the current user's username and password regards --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

TIME_ZONE = 'UTC' how does it work?

2009-09-05 Thread zweb
I am on mac os x and linux. I use mysql How does the TIME_ZONE='UTC" in django settings.py work? If i enter date time from web page and store it in mysql db. And no timezone is associated with the datetime, does django assumes datetime is in UTC and saves it without changing or does it assume

Django remove value from field with attrs disabled="disabled"

2009-09-05 Thread eli
Hi, I have problem with Django Forms and field with set attrs to disabled="disabled" # forms.py class EditForm(forms.ModelForm): def __init__(self, *args, **kwargs): super(EditForm, self).__init__(*args, **kwargs) self.fields['title'].widget.attrs.update({'readonly':

when browser store user password, create user fail s

2009-09-05 Thread Manuel Ignacio
hi, when i loggin for first time in django admin interface, the browser ask me if i want to store the password, if i say yes, later when i want create a new user, the form is preloaded whit the logged user info any ideas? regards --~--~-~--~~~---~--~~ You received

Re: webcam in a web page

2009-09-05 Thread bittin
Webcam XP or Stickam On Fri, Aug 21, 2009 at 2:02 AM, Lic. José M. Rodriguez Bacallao < jmr...@gmail.com> wrote: > > hi folks, I need to show a live web cam in my site, does anyone know > how to do that? > > -- > Lic. José M. Rodriguez Bacallao > Centro de Biofisica Medica >

Re: ReST and path issues

2009-09-05 Thread TiNo
On Thu, Sep 3, 2009 at 00:38, TiNo wrote: > Hi, > I am trying to set up a sort of smal CMS where the input is > RestructuredText. The restructured text is parsed by a templatetag with the > following code (taken from the PyCon rst project): > > @register.filter > def

Re: django unicode user name

2009-09-05 Thread joymax
You have to create custom authentication backend (more about it here http://docs.djangoproject.com/en/dev/topics/auth/#writing-an-authentication-backend). On Sep 5, 12:42 pm, Казбек wrote: > Good day. How can i make django to register and use unicode usernames? > When i try

Re: PostgreSQL or MySQL, What are the +'s and -'s?

2009-09-05 Thread Joshua Russo
Great site! thanks With my SQL experience, your comment about database coding seems to ring true. The database is a much different environment, with different paradigms, than a standard application environment. When you really need database coding you know it (kind of like meta programming). So

Re: PostgreSQL or MySQL, What are the +'s and -'s?

2009-09-05 Thread Zberteoc
This is a common mistake almost all non SQL developers make thinking in procedural/programming language terms in regards wit SQL and database coding. If you're asking me there is nothing cool in the feature of creating stored procedures in other than the SQL language. MS-SQL introduced that with

Re: Same application with different URLs

2009-09-05 Thread Graham Dumpleton
On Sep 5, 6:54 am, Petr Tuma wrote: > One more note, just if somebody else runs into this. > > Apparently, the problem with this solution is that under certain > conditions, SetEnv from one virtual host can be visible inside the > Python interpreter associated with another

Re: xgettext under osx

2009-09-05 Thread Hinnack
gettext should come with apples developer tools - otherwise install them using fink or port -- Hinnack 2009/9/2 Ramiro Morales > > On Wed, Sep 2, 2009 at 12:32 PM, arbi wrote: > > > > As for the PATH I thought it was for compilation and not for make > >

Re: Django, Blueprintcss and a data array

2009-09-05 Thread Antoni Aloy
2009/9/5 adelaide_mike : > > I (newbie) am looking at using Blueprintcss to display a 7 column > array of data. The data is passed to the template in "dataarray".  I > have tested the code below without the section and the column > headings display correctly. > >