Re: are migrations the same regardless of database type?

2021-12-28 Thread Lars Liedtke
res docker container, if my memory is wrong. Cheers Lars Am 28.12.21 um 16:02 schrieb Anil Felipe Duggirala: hello, I running an app locally using an SQlite database (I have not been able to set up postgresql locally). I am running the same app in Heroku, using Postgresql. If I run "makemigr

Re: Creating dynamic chart / graphs with Django

2021-04-12 Thread Lars Liedtke
Hey, this is quite good https://bokeh.org it can create dynamic html/js as well, but I don't know how the interagion into django is. Cheers Lars Am 12.04.21 um 15:32 schrieb Walter Randazzo: > Hi Tristan, > > i have used this one just once.  > > > https://www.hig

Re: Form.has_changed() == False and Form.changed_data empty

2021-04-11 Thread Lars Liedtke
7;customer')) and this test fails because company still has got the customer attribute. Am 12.04.21 um 16:12 schrieb Gabriel Araya Garcia: > I have checkboxes in my css grid and there is name, type=chekbox", > etc. In may view django I have captured the value of the > check tem

Form.has_changed() == False and Form.changed_data empty

2021-04-11 Thread Lars Liedtke
database is myself? I am happy to show the code. But I thought I'd ask about it in general before posting lots of code. --- punkt.de GmbH Lars Liedtke .infrastructure Kaiserallee 13a 76133 Karlsruhe Tel. +49 721 9109 500 https://infrastructure.punkt.de i...@punkt.de AG Mannheim 1

Re: Django asychronous for millions of users

2021-03-31 Thread Lars Liedtke
not wish to disrespect anyone and I know I am a beginner > but I know this can be done Ive only be programming since October of > last year and I have made leaps and bounds > > > Sent from my iPhone > >> On Mar 31, 2021, at 10:05 AM, Derek wrote: >> >> I a

Re: Django asychronous for millions of users

2021-03-31 Thread Lars Liedtke
choices that will be right for you and your usecase. Cheers Lars Am 31.03.21 um 01:28 schrieb Josh moten: > I am trying to implement the right infrastructure, so that I can be > able to support all the users. I am in no way trying to deceive > anyone. I am asking because I truly want to ma

Re: Django asychronous for millions of users

2021-03-30 Thread Lars Liedtke
redis and/or elasticsearch, most propably load balancers and multiple application servers (which could be run with django). But simply sending a question like you did will not solve the prpably appearing problems you'll be facing, if you really will that many users. Cheers Lars Am 30.03.21 u

Re: AssertionError: database connection isn't set to UTC

2016-09-11 Thread Lars Olafsson
it would be great if someone could explain to me, where the offset in the function utc_tzinfo_factory comes from. My python skills apparently are not sufficient to be able to trace this in the code. /Lars On Sunday, September 11, 2016 at 4:59:56 PM UTC+2, Lars Olafsson wrote: > > Dear

AssertionError: database connection isn't set to UTC

2016-09-11 Thread Lars Olafsson
Dear Reader, I hope someone here can help me, resolve this issue. I have installed a new server and even though i have the same exact setup running, and I have even cloned the database from my other server. I get this error when i try to connect to Django on the web. And I cannot figure out w

Re: Simple way to find the amount of years between two dates?

2015-07-12 Thread lars van Gemerden
question is a bit vague, but look at python datetime.datetime and datetime.timedelta On Sunday, July 12, 2015 at 1:02:55 PM UTC+2, Brandon Keith Biggs wrote: > > Hello, > using the django.utils.timezone.now() function, how can I find the > difference from another date in years? > For example,

clear database (drop all tables)

2015-04-29 Thread lars van Gemerden
Hi all, Is there a simple programmatic way to drop all tables in the database (e.g. for testing purposes), also without input prompts? Cheers, Lars -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this grou

Anyone using PyScripter to debug their Django apps?

2012-09-22 Thread Lars Ruoff
Hi, The PyScripter FAQ has an entry about how to debug Django applications: https://code.google.com/p/pyscripter/wiki/FAQ#How_can_I_debug_Django_applications? Has anybody tried this out? It doesn't work for me. I can run my Django app but it ignores my breakpoints. See my post on the PyScripter

Re: Where/how to load global static data?

2012-04-05 Thread Lars Ruoff
Thanks a lot, Tom. That magnificantly answers my question. :-) One last thing: "... a function which loads, parses and returns the data, and memoize the result." That (and the first option also) means that we stay within the same Python interpreter environment even for different requests to the

Re: Where/how to load global static data?

2012-04-05 Thread Lars Ruoff
On Apr 5, 2:31 pm, kenneth gonsalves wrote: > On Thu, 2012-04-05 at 05:25 -0700, Lars Ruoff wrote: > > the question is not about serving static data (like HTML, images > > etc.), but having global python variables initialized once, for all > > instances of the site, that is

Re: Where/how to load global static data?

2012-04-05 Thread Lars Ruoff
On Apr 5, 9:05 am, kenneth gonsalves wrote: > I may be wrong, but AFAIK django is not a server - it is a framework > that runs on a web server, so every new request starts a new instance of > your site. You could use cacheing to serve static data - but this is not > like pre-loading data like one

Re: Where to load global static data?

2012-04-05 Thread Lars Ruoff
On Apr 5, 9:43 am, Mike Dewhirst wrote: > On 5/04/2012 4:53pm, Lars Ruoff wrote: > > > Sorry, that message went off (twice!) while i was in the middle of > > typing :-) > > > The question is: > > How do i load static global data once and for all at server start

Re: Port Django to Javascript

2012-04-05 Thread Lars Ruoff
you re-invent a server-side application framework on client- side?? regards, Lars -- 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, send

Where/how to load global static data?

2012-04-04 Thread Lars Ruoff
emory and accessible from any view during the lifetime of the server, so that it needs NOT to be loaded for any access to the site/view. Hope the question is clear. Regards, Lars -- You received this message because you are subscribed to the Google Groups "Django users" group. To pos

Re: Where to load global static data?

2012-04-04 Thread Lars Ruoff
to be loaded for any access to the site/view. Hope the question is clear. Regards, Lars -- 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

Where to load global static data?

2012-04-04 Thread Lars Ruoff
Hi, i'm using Django the first time for a browser game project. I will need to have some globally accessible, static data like string tables for every view. These would be loaded from XML files. For the moment all i have figured out with Django is that my code will be called via callbacks for the v

Where to load global static data?

2012-04-04 Thread Lars Ruoff
Hi, i'm using Django the first time for a browser game project. I will need to have some globally accessible, static data like string tables for every view. These would be loaded from XML files. For the moment all i have figured out with Django is that my code will be called via callbacks for the v

Re: Have different databases using SQLite

2011-10-07 Thread Lars Ruoff
Many thanks, Tom! Didn't notice this was covered in the docs. -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/Mue4TVMYw_0J. To post to this group, send emai

Have different databases using SQLite

2011-10-06 Thread Lars Ruoff
Hi, i'm having the Django database set up like so: DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'D:\Users\Max\Projects\my4x\data\my4x.db', 'USER': '', # Not used with sqlite3. 'PASSWORD': '', #

Re: 2D map application: performance and design question

2010-11-04 Thread Lars Ruoff
Excellent advice! With this I'm down to less than 0.02 secs for the 13x13 map rendering! Regards, Lars On Nov 2, 9:45 pm, Knut Ivar Nesheim wrote: > I would suggest rewriting the loop in your template as a templatetag. > Something like this > > @register.simple_tag >

Re: 2D map application: performance and design question

2010-11-02 Thread Lars Ruoff
that have been passed in the context. I then made tests to reduce this number. Here is the result of time spent for the query and render() as a function of the grid size: 3*3: 0.03s, 0.1s 5*5: 0.04s, 0.25s 7*7: 0.08s, 0.45s 9*9: 0.13s, 0.72s 11*11: 0.17s, 1.1s 13*13: 0.2s, 1.5s Lars On Nov 2, 4:

Re: 2D map application: performance and design question

2010-11-02 Thread Lars Ruoff
Ok, so having excluded SQLite and the static served files, I'd like to test if the server matters. What would be a minimum Apache install and config to run Django locally (on Windows)? On Nov 1, 7:30 pm, Lars Ruoff wrote: > Ok, thanks all, > > So following Bill's advice, i di

Re: 2D map application: performance and design question

2010-11-01 Thread Lars Ruoff
Ok, thanks all, So following Bill's advice, i did: >python manage.py shell >>> import game.models >>> list(game.models.Location.objects.filter( \ ... x__gte=34, \ ... x__lte=46, \ ... y__gte=24, \ ... y__lte=36)) ...and the result showed up instantly! So it seems DB is not the issue. Will

Re: 2D map application: performance and design question

2010-11-01 Thread Lars Ruoff
On 1 November 2010 10:59, Lars Ruoff wrote: > > > > > Hello, > > > first of all, these are my first steps with Django, and i only have > > limited experience with Python, so please be patient. > > > I'm using it for what is intended to be a browser game in

Re: 2D map application: performance and design question

2010-11-01 Thread Lars Ruoff
Hi Daniel, you are right that images are being loaded. But i gave it a try and replaced the images by text. Still the page takes about 3 seconds to load. Lars On Nov 1, 12:30 pm, Daniel Roseman wrote: > It's a bit hard to tell without knowing how the slowness appears. What > exac

Re: 2D map application: performance and design question

2010-11-01 Thread Lars Ruoff
x__lte=center_location.x+half_x, \ y__gte=center_location.y-half_y, \ y__lte=center_location.y+half_y) that might be non-optimal? How to improve it? Lars On Nov 1, 11:55 am, "Cal Leeming [Simplicity Media Ltd]" wrote: > Hi Lars, > > Unless you are doing some *r

2D map application: performance and design question

2010-11-01 Thread Lars Ruoff
d the main part of the template renders these items: {% for l in locs %} {% endfor %} Do you see any issues with this approach? Any paths to performance improvements? Since i'm at the beginning of this project i would like to avoid going the wrong way. best regards, La

Re: Collapsible fields

2009-11-09 Thread Lars Stavholm
Daniel Roseman wrote: > On Nov 9, 8:47 am, Lars Stavholm wrote: >> Hi All, >> >> I'm looking to implement collapsible fields in a django powered >> page, so far with no luck. >> >> Any hints on the best way of doing it? >> >> In the mean

Collapsible fields

2009-11-09 Thread Lars Stavholm
r some reason, it does not work. The collapsed field shows up (I guess) by ways of the Job Details showing up, but nothing else. Any hints? I admit, I'm a newbie at these things, but still. Any advice appreciated. R /Lars --~--~-~--~~~---~--~~ You rece

django + mod_python + apache2 config problem

2009-10-19 Thread Lars Stavholm
Bit of an annoying problem with apache2 + mod_python configuration. I've got my django site setup and working. When adding a directive in the apache config which then includes authentication, the SetHandler None directive doesn't seem to work, i.e. I get a "Page not found" error in my django sit

Re: Flatpage on first page of a website

2009-10-16 Thread Lars Stavholm
Alessandro Ronchi wrote: > I need to put a flatpage on / > and make www.example.com > return the flatpage. > > Is it possible? What url must I put in flatpage admin? No flatpages in admin as far as I know. At the frontend (your web site www.example.com) however: 1. Create a flatpage for with U

Re: How to server static media secured by Django authentication

2009-09-13 Thread Lars Holm Nielsen
in apache, you just use a htaccess file to protect your resources. Other more complicated things you can look at is single sign-on solutions for your webserver and django, but it usually starts to get really complicated. Cheers, Lars On Sep 11, 11:03 pm, Jim Myers wrote: > I have a requireme

Re: Very bad experience in Django...

2009-06-25 Thread Lars Stavholm
Chris Withers wrote: > steveneo wrote: >> I try to use Django in a new project. Honestly, it is very bad >> experience. It looks not boosting my development speed. Today, I >> almost give up and begin to look up another Python framework > > Go for it :-) +1 /L --~--~-~--~~--

django-navbar

2009-06-18 Thread Lars Stavholm
Has anyone been able to use django-navbar successfully in latest Django 1.1 (from trunk)? Any ideas on how to use it appreciated. Or maybe there's a better navigation bar plugin? /Lars Stavholm --~--~-~--~~~---~--~~ You received this message because yo

Re: Weird URL problem

2009-06-12 Thread Lars Stavholm
Lars Stavholm wrote: > Hi All, > > got a problem that's slowly driving me crazy: > > http://mbf takes me to my apache+mod_python+django application. > > However, if I click a link, e.g. http://mbf/jobs, I get the > following exception: > > TypeError

Weird URL problem

2009-06-12 Thread Lars Stavholm
GET Request URL: http://mbfjobs/ [snip] Notice the Request URL, there's a slash missing, something along the way removed the slash. If I try http://mbf//jobs, I end up at the right place. Can anyone tell me what it is that is removing that slash? Any input apprec

Re: Displaying rows as columns

2009-05-01 Thread Lars Stavholm
model you defined is slightly askew from your presentation, if you want to look at a week at a time, maybe you'd be better of defining the model/record as being a week. Simply make things easier on yourself. Just my 2c /Lars Stavholm --~--~-~--~~~---~--~~ Yo

graph tools

2009-04-23 Thread Lars Stavholm
Hi All, looking to produce graphs within a django application, preferably within the admin site. django-graphs might be a contender, but it seems to be not fully completed yet. Anyone using it? Other django graph app's? Any advice appreciated /Lars Sta

Re: django-grappelli setup problem

2009-04-17 Thread Lars Stavholm
li google-group in the near future. until that, > use either this list or the google-code issue tracker. Good enough for me. I'm happy you were reading this list when helping me out. Thanks! /Lars > On Apr 17, 8:18 am, Lars Stavholm wrote: >> patrickk wrote: >>> I´m work

Re: django-grappelli setup problem

2009-04-16 Thread Lars Stavholm
pported at some point in time? o is this mailing list the proper place for this conversation? Thanks! /L > however, I´ll take another look at that in order to simplify. > > thanks, > patrick > > > On 16 Apr., 21:44, Lars Stavholm wrote: >> patrickk wrote: >&g

Re: django-grappelli setup problem

2009-04-16 Thread Lars Stavholm
t? Or maybe there's a mismatch of versions here. I use django-1.0.2 and I was led to believe that django-grappelli was developed towards the latest release of django, i.e. 1.0.2. /L > On 16 Apr., 18:44, Lars Stavholm wrote: >> So that all went well. Now all I need now is the bookmarks >

Re: django-grappelli setup problem

2009-04-16 Thread Lars Stavholm
So that all went well. Now all I need now is the bookmarks and the sidebar navigation box. They're not visible as of right now and I'm not sure what to do about it. The recommended fixtures are loaded. Any ideas anyone? /L Lars Stavholm wrote: > patrickk wrote: >> line

Re: django-grappelli setup problem

2009-04-15 Thread Lars Stavholm
d the instructions by Chris Scott, and after a bit of fiddling, presto, I can see the light:) It looks brilliant! /L > On 15 Apr., 20:14, Lars Stavholm wrote: >> patrickk wrote: >>> in order to use the admin, just use /admin/ (grappelli doesn´t change >>

Re: django-grappelli setup problem

2009-04-15 Thread Lars Stavholm
k2-unicode'] Server time:Wed, 15 Apr 2009 20:07:53 +0200 Template error In template /home/stava/proj/bfact/templates/admin/base.html, error at line 53 My ursl.py looks like this: from django.conf.urls.defaults import * from django.contrib import admin admin.autodiscover() urlpatterns = pa

Re: django-grappelli setup problem

2009-04-15 Thread Lars Stavholm
be mentioned in the docs, but I guess it´s pretty > obvious. I guess it is, admin up and running nicely without grappelli. /L > On Apr 14, 8:36 pm, Lars Stavholm wrote: >> Hi All, >> >> I'm trying to get django-grappelli running, but after following >> the inst

django-grappelli setup problem

2009-04-14 Thread Lars Stavholm
out there using django-grappelli? Any ideas as to what causes this? I'm using django-1.0.2 on Linux with latest grappelli from trunk. Any ideas appreciated /Lars --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: db API where ...or...

2008-12-15 Thread Lars Stavholm
Thanks Tim, works like a charm. /L Tim Chase wrote: >> when combining Django ORM criteria you get >> the "...WHERE...AND..." clauses. >> >> How do I get the "...WHERE...OR..." clauses? >> >> Resorting to raw SQL? > > > Use Q objects and OR them together: > > http://www.djangoproject.com/docume

Re: db API where ...or...

2008-12-15 Thread Lars Stavholm
Alex Koshelev wrote: > http://docs.djangoproject.com/en/dev/topics/db/queries/#complex-lookups-with-q-objects That's the one I'm looking for. Thanks! /L > On Mon, Dec 15, 2008 at 18:35, Lars Stavholm <mailto:st...@telcotec.se>> wrote: > > > Hi all,

Re: Django Forms Date Format

2008-12-15 Thread Lars Stavholm
Aldo wrote: > Yes I have tried that but still nothing - thats what lead me to > looking at this! Try with "USE_I18N = False" in settings.py. Some sort of known issue, I do believe there's a ticket somewhere confirming this. /L > On Dec 15, 3:28 pm, Lars Stavholm wrote:

db API where ...or...

2008-12-15 Thread Lars Stavholm
Hi all, when combining Django ORM criteria you get the "...WHERE...AND..." clauses. How do I get the "...WHERE...OR..." clauses? Resorting to raw SQL? Kinda' lost, any input appreciated /Lars --~--~-~--~~~---~--~~ You received thi

Re: Django Forms Date Format

2008-12-15 Thread Lars Stavholm
Otherwise it will not see the form as valid - and not save. > > How can i change this I want the date in the format DD/MM/ Maybe setting DATE_FORMAT in settings.py could help. http://docs.djangoproject.com/en/dev/ref/settings/?from=olddocs#date-format /Lars --~--~-~--~--

Re: Overriding admin templates

2008-11-27 Thread Lars Stavholm
but I just checked my settings.py, and batchadmin is last in the list of installed app's, and now it works. /L > On Nov 3, 5:02 am, Lars Stavholm <[EMAIL PROTECTED]> wrote: >> Lars Stavholm wrote: >>> Karen Tracey wrote: >>>> On Sat, Nov 1, 2008 at 5:54 PM,

Re: mark_safe() not working for me

2008-11-25 Thread Lars Stavholm
Right you are Daniel, works like a charm, thank you! /L Daniel Roseman wrote: > On Nov 25, 4:50 pm, Lars Stavholm <[EMAIL PROTECTED]> wrote: >> I'm trying to influence one of the admin interface change list >> fields by using the below get_progress() method in

mark_safe() not working for me

2008-11-25 Thread Lars Stavholm
iously not right. Is there another way to tell django not to escape the output? Any ideas appreciated /Lars --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send

Progress bar widget

2008-11-24 Thread Lars Stavholm
something visually similar) in the admin change list. The progress bar needs no Ajax, the change list gets refreshed every now and then (it visualizes a queue). Failing that, is a custom widget the right way to go? Any input appreciated /Lars --~--~-~--~~~---~--~~ Yo

Re: Keeping fields out of the Admin

2008-11-20 Thread Lars Stavholm
Epinephrine wrote: > I have a field that should never be edited by hand. It is basically > date_letter_sent, and it should be filled in by a view function when > it sends a letter. > > How can I keep the field from being editable in the Admin edit page > for that class? editable = False in the

Re: admin site problem

2008-11-17 Thread Lars Stavholm
Vicky wrote: > I tried to add some values to my table from admin site. Table has 3 > columns one of integer type and other two of string type. When i tried > to save my entries it giving an error as: > > "coercing to Unicode: need string or buffer, int found" > > How to solve it? T

Re: Date Field question -

2008-11-16 Thread Lars Stavholm
Mahesh Vaidya wrote: > Hi, > I am going to used "DateField" in my model. Which format does date > field user is it DD/MM/ (European) or MM/DD/ (American) style > ? and is it customizable ? Have a look at... http://docs.djangoproject.com/en/dev/ref/settings/?from=olddocs#date-format But

Re: Overriding admin templates

2008-11-03 Thread Lars Stavholm
Lars Stavholm wrote: > Karen Tracey wrote: >> On Sat, Nov 1, 2008 at 5:54 PM, Lars Stavholm <[EMAIL PROTECTED] >> <mailto:[EMAIL PROTECTED]>> wrote: >> >> Low Kian Seong wrote: >> > http://www.djangobook.com/en/1.0/chapter17/ >> >&g

Re: Overriding admin templates

2008-11-03 Thread Lars Stavholm
Karen Tracey wrote: > On Sat, Nov 1, 2008 at 5:54 PM, Lars Stavholm <[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> wrote: > > > Low Kian Seong wrote: > > http://www.djangobook.com/en/1.0/chapter17/ > > Yes, thank you, that's it. >

Re: Overriding admin templates

2008-11-01 Thread Lars Stavholm
L > On Sat, Nov 1, 2008 at 6:20 PM, Lars Stavholm <[EMAIL PROTECTED]> wrote: >> Low Kian Seong wrote: >>> You are supposed to put the admin template you want to override in >>> your own template directory definition in settings.py >>> >>> So, if y

Re: Overriding admin templates

2008-11-01 Thread Lars Stavholm
Low Kian Seong wrote: > You are supposed to put the admin template you want to override in > your own template directory definition in settings.py > > So, if you defined it as /home/stava/ name>/template/admin/change_list.html Huh? /L > On Sat, Nov 1, 2008 at 5:32 PM, Lar

Overriding admin templates

2008-11-01 Thread Lars Stavholm
change_list.html in my app's templates/admin directory, which doesn't feel right. Any input appreciated /Lars Stavholm --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post

Re: customize TimeField

2008-10-27 Thread Lars Stavholm
Arash wrote: > Hi Everybody, > Could you tell me please how can I customize TimeField. I need to get > ride of the seconds. I don't want seconds to appear on admin interface settings.py: TIME_FORMAT maybe. /L --~--~-~--~~~---~--~~ You received this message becau

Re: admin DATE_FORMAT not working?

2008-10-24 Thread Lars Stavholm
Low Kian Seong wrote: > Maybe this would shed some light: > http://code.djangoproject.com/ticket/2203 Yup, that explains it, thanks. /L > On Fri, Oct 24, 2008 at 4:57 PM, Lars Stavholm <[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> wrote: > > I've

admin DATE_FORMAT not working?

2008-10-24 Thread Lars Stavholm
opment server. Instead I get the US format or whatever it is, something like "Oct. 24, 2008, 10:51 a.m.". Any hints on what I am doing wrong here? Maybe there's more settings needed that I'm not aware off? Any input appreciated /Lars --~--~-~--~~~

Re: Foreign key with tons of items

2008-10-23 Thread Lars Stavholm
Fabio Natali wrote: > Fabio Natali wrote: > [...] >> class Prod2(models.Model): >> name = models.CharField(max_length=30) >> >> class Prod1(models.Model): >> name = models.CharField(max_length=30) >> belongs_to = models.ForeignKey(Prod2) >> >> class Prod0(models.Model): >> name = m

Newbie help with limit_choices_to on ManyToMany

2008-10-06 Thread Lars Stavholm
s Configuration, i.e. when I've used up all hosts, the "Available hosts" form table should be empty. What's the best way to solve this? By using limit_choices_to somehow I guess. Any ideas appreciated /Lars --~--~-~--~~~---~--~~ You received this m

disable help_text

2008-10-05 Thread Lars Stavholm
Hi All, does anyone know of a way to turn off (disable/replace) the rather long help text message for ManyToManyField's, starting with "Hold down..."? Any input appreciated /Lars --~--~-~--~~~---~--~~ You received this message because you are su

Re: UserProfile problem

2008-09-25 Thread Lars Stavholm
that, of course, worked just fine:) Thanks /Lars > On Sep 24, 7:03 pm, Lars Stavholm <[EMAIL PROTECTED]> wrote: >> Running django-1.0 out of svn trunk, just updated today (9084). >> >> I've defined my UserProfile according to the latest documentation: >

UserProfile problem

2008-09-24 Thread Lars Stavholm
rue) phone = models.CharField(max_length=20, blank=True) notes = models.TextField(blank=True) I've added the following to my settings.py: AUTH_PROFILE_MODULE = 'app.userprofile' But I still don't get any extra fields in the admin. What am I mi

Re: object.filter and accessing items

2008-04-29 Thread lars
http://code.djangoproject.com/ticket/7121 :-) --~--~-~--~~~---~--~~ 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, se

Re: object.filter and accessing items

2008-04-29 Thread lars
cts.filter(id__lte=article_id).order_by('-id') [0:2] ) and again for accessing the concrete entry by index (result[1]). Yours, Lars --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users"

object.filter and accessing items

2008-04-28 Thread lars
quot;."body", "blog_article"."body_rendered", "blog_article"."text_more", "blog_article"."text_more_rendered", "blog_article"."num_reads", "blog_article"."num_comments", "blog_article&q

Re: remove ^M: project moved from window to linux

2008-01-12 Thread Lars Stavholm
crybaby wrote: > What is the fastest way to remove ^M from every files in main project > folder and apps folders. Doing it by hand seems time consuming. Is > there a simple script take care of this? if I just leave the ^M in > python code, would it cause problems? If you're on a Linux box (yo

Re: #! ??

2008-01-11 Thread Lars Stavholm
kbochert wrote: > I must be blind!! > > I have 2 files (screen capture from pico) > > > GNU nano 1.3.12 File: tmp2 > > #!/usr/local/bin/python2.5 > > print "Hello" > > > > > GNU nano 1.3.12 File: tmp3 > > #!/usr/local/bin/python2.5 > > print "Hi!" > >

Re: spam

2007-11-06 Thread Lars Stavholm
Michael Best wrote: > Jay Klehr wrote: >> Are the other lists powered by Google Groups? Are they as active as >> Django's list? >> >> Perhaps you should direct your complaints to Google, as I don't think >> the people on this list (or even the owners of the list) can do much >> about it (aside

Re: spam

2007-11-06 Thread Lars Stavholm
Jeffrey Johnson wrote: > This is the ONE list where I consistently get porn spam in gmail. What gives? The format of these porn spam's is new, I do believe the filtering will take care of it soon enough. Takes a few of these to train the spam filter(s). /L > On Nov 6, 2007 9:

Re: spam

2007-11-06 Thread Lars Stavholm
Derek Anderson wrote: > ok, seriously, is there not something we can do about the porn spam? > some of us read this list at work on machine's we don't own. the image > stuff is becoming a serious problem. I do believe that Google groups are filtering out close to 99% of all spam (sign up for a

Re: problem with svn checkout

2007-10-27 Thread Lars Stavholm
Kenneth Gonsalves wrote: > hi, > > I am having problems checking out the latest head (it could be due to > my present flaky internet connection). The failure message is: > > svn: REPORT request failed on '/svn/!svn/vcc/default' > svn: REPORT of '/svn/!svn/vcc/default': 200 OK (http:// > code.

Re: Global Variables in Templates?

2007-10-08 Thread lars
aybe one could post a link to this snippet in the docs? I guess I wasn't the only one asking for another approach? Yours, Lars --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To pos

Re: Global Variables in Templates?

2007-10-08 Thread lars
nnot say what is possible and what not. Maybe RequestContext could be a member of the request object so that the caller of the view method would be responsible for instantiating the RequestContext. Just an idea :-) Yours, Lars --~--~-~--~~~---~--~~ You received

Re: Multiple primary keys

2007-09-05 Thread Lars Stavholm
Leo wrote: > Lars, have you made any progress on this? I agree that only the Sorry to say: no progress at all:( > numeric types are interesting as multiple keys, so worrying about > URL encoding is pointless (i.e., there's no reason to worry about > supporting multiple arbi

Re: Deployed project keeps reloading

2007-08-14 Thread Lars
data sources (slowest) - Rebuild from database with indexed tables - Cached on disk - Cached in memcache - Cached in memory (fastest) It's been working well so far, and only needs some tweaking on my production server. Thanks for your suggestions! Lars On Aug 15, 12:24 pm, "James B

Deployed project keeps reloading

2007-08-14 Thread Lars
end. Can anyone suggest what the problem might be? Thanks, Lars --~--~-~--~~~---~--~~ 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 unsubs

Re: Multiple primary keys

2007-08-14 Thread Lars Stavholm
Thanks, Michael, I'll give it a try. /Lars Michael Radziej wrote: > Hi Lars, > > I found myself in a similar position, and I'm also coming from the database > side ... funny ;-) > > I have attached a small patch that solved the problem for me and might be a > st

Re: Multiple primary keys

2007-08-13 Thread Lars Stavholm
Malcolm Tredinnick wrote: > On Tue, 2007-08-14 at 06:51 +0200, Lars Stavholm wrote: >> Malcolm Tredinnick wrote: >>> On Tue, 2007-08-14 at 08:47 +0800, Russell Keith-Magee wrote: >>> [...] >>>> You will have more difficulty with the Admin application and gen

Re: Multiple primary keys

2007-08-13 Thread Lars Stavholm
7;s a goal, I'm afraid I'm out of luck:| > Preferably no change to existing URLs. I see. My conclusion is that the multiple primary key fields is not going to happen, which is a pity, since introspection then is of limited use. Thanks for your input /Lars --~--~-~--~~--

Multiple primary keys

2007-08-13 Thread Lars Stavholm
ng the "multiple fields in the primary key" feature at all? If so, is there anything I could do to help, short of trying to implement it myself, which I doubt that I'll be able to? Any input appreciated. /Lars --~--~-~--~~~---~--~~ You received t

Django, python 2.5 and macports 1.5

2007-07-20 Thread lars
e the "ImportError: No module named _md5" error. Just wanted to post this hint in case someone else runs into the same problem :-) Yours, Lars --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django u

Re: model subclassing

2007-07-13 Thread Lars Stavholm
Carl Karsten wrote: > I am experimenting with subclassing a model. The parent class will be an > abstract class that does not get 'managed' by django. Only the subclass > will, > and the table the subclass works with will have all the fields. > > syncdb was able to create the table I expecte

Re: Refreshing dirty objects

2007-07-03 Thread Lars
ost all the implementation details here, but > hopefully there's enough clues there to work with. Ask questions if not. Plenty, thanks for your help! I've actually realized that since I don't need to add nodes dynamically, I could just construct them o

Refreshing dirty objects

2007-07-03 Thread Lars
right" of it. This means that any python objects I have in memory for this model are now dirty and need to be updated from the database. Is there a way I can ask objects to refresh themselves from the database? Thanks, Lars --~--~-~--~~~---~--~~ You received t

The Book

2007-06-19 Thread Lars Stavholm
Just wanted to let you know that the Django Book seems to be due out June 26th, just got a mail from Amazon. /Lars --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this g

Re: Is composite primary key possible?

2007-06-07 Thread Lars Stavholm
Russell Keith-Magee wrote: > On 6/7/07, Lars Stavholm <[EMAIL PROTECTED]> wrote: >> And then I hit a snag: there's one table that uses a composite >> primary key made up of three fields. (the attachment table in trac.db) >> >> I've scanned the doco an

Is composite primary key possible?

2007-06-06 Thread Lars Stavholm
e up of three fields. (the attachment table in trac.db) I've scanned the doco and I've googled, this is what I came up with: o define one of the fields as a primary o add the unique_together Meta constraint Is there another/better way? Any inp

  1   2   >