Hi all,
is there something to bear in mind, if i store a instance of a class
in a django session? e.g. there is a class product and i want to
request.session['CURRENT_PRODUCT'] = myproduct
As far as i know, this should be allowed. Isn't it?
Greets,
Dan
--~--~-~--~~~
You can't do this because a model instance isn't pickleable. You can
save the product id instead.
This is documented under:
http://www.djangoproject.com/documentation/sessions/#technical-details
On Dec 20, 2007 4:03 PM, Daniel Austria <[EMAIL PROTECTED]> wrote:
>
> Hi all,
>
> is there somethin
Hello,
I'm going through the Django tutorial for Django 0.9.6 on Windows
Vista. Everything is going smoothly, and I'm following the tutorial to
a T; except when I'm in my admin site (step 2 of the tutorial),
clicking any of the links (Groups/Users/Sites/Polls), I get a
TemplateSyntaxError, append
Thanks to both of you! I got it working. I also checked out
InstantDjango; reminds me of InstantRails, which I liked.
Rex
On Dec 19, 10:03 pm, cjl <[EMAIL PROTECTED]> wrote:
> Rex:
>
> You might want to check out my stupid little project:
>
> http://www.instantdjango.com
>
> It's a portable and
Hi all,
I want to add the geo tag (with latitude and longitude) to each item of my
feeds:
45.256 -71.92
I am using the feeds framework:
class LatestEvents(Feed):
title = "Latest Events"
link = "/events/"
def items(self):
return Event.objects.order_by(
Recently I got a request from Django site operator to be able to modify
some options we had put into settings.py file. Now changes to some
business-related options require server restart (i.e. change to
DEFAULT_FROM_EMAIL, which isn't that exotic). I'd like to give site
admin an option to modify a
On Dec 20, 2007 4:55 AM, Jarek Zgoda <[EMAIL PROTECTED]> wrote:
> While this might work for the options I defined by myself, the standard
> settings options "should not be changed in runtime" (according to docs).
> Did anybody manage to solve this issue?
Have you looked at Marty's dbsettings proj
Someone created these cool leopard icons for lighttpd and rails. I
guess it should be quite easy for someone with skills to create green
django icons. Anyone?
And here's the link
http://www.wishingline.com/notebook/2007/12/railslighttpdiconsforleopard/
--~--~-~--~~~-
James Bennett napisał(a):
>> While this might work for the options I defined by myself, the standard
>> settings options "should not be changed in runtime" (according to docs).
>> Did anybody manage to solve this issue?
>
> Have you looked at Marty's dbsettings project?
>
> http://code.google.c
Hi to everybody,
I need help from those who have already used AuditTrail:
http://code.djangoproject.com/wiki/AuditTrail
I'm having this problem: : _audit() takes
exactly 3 non-keyword arguments (2 given),
Thanks in advance
--~--~-~--~~~---~--~~
You received this m
Hello,
I am not sure what you have to do with this list? I could not find anything
to do with Django on your website.
Please do not spam this developer list.
Thanks,
Rahul
--
Srijan Technologies Pvt. Ltd. INDIA
www.srijan.in | [EMAIL PROTECTED]
91-11-2622 5926 / 2622 5931 | Fax: 91-11-4160 85
Hi all,
I want to add the geo tag (with latitude and longitude) to each item
of my feeds:
45.256 -71.92
I am using the feeds framework:
class LatestEvents(Feed):
title = "Latest Events"
link = "/events/"
def items(self):
return Event.objects.order_by('-start_date
Title:
Custom Software Solutions Provider
URL:
http://www.tandoninfo.com
Description:
Tandoninfo: Custom Software Solutions Provider - We provide Custom
software development services like application development, web
development, Project management, quality testing. We also provide SAP
Business
Hello there,
I couldn't find any help on the web or on this forum yet, so here I
am :)
I'd like to hear your advice on the best way to go with displaying
form result notices.
For example, after editing an object via a newform, the following page
displays a notice that says "Object successfully
My guess is that you're using 0.96, or if you're using SVN, you're
using a revision before r6269. I've just updated the wiki article to
reflect this requirement.
-Gul
On 12/20/07, worker <[EMAIL PROTECTED]> wrote:
>
> Hi to everybody,
> I need help from those who have already used AuditTrail:
>
Hello,
I wrote an my blog about the solution I have chosen perform what is
describes. To put it in a nutshell I am using a middleware to direct
the user to the language requested in the URL. I am not sure this
follow any "Best Practice":
http://yml-blog.blogspot.com/2007/12/django-internationalis
as a part of using generic relations, i got struck up at one point,
where i need to run the sql to have a field:
summary = generic.GenericRelation(Summary)
where Summary is a class defined as:
class Summary(models.Model):
id = models.AutoField(primary_key=True)
content_type = models.Fore
Hi Julien,
> I'd like to hear your advice on the best way to go with displaying
> form result notices.
>
> For example, after editing an object via a newform, the following page
> displays a notice that says "Object successfully updated".
There is no canonical "best way". There are, instead, a
On Dec 20, 2007 6:09 AM, Julien <[EMAIL PROTECTED]> wrote:
> I'd like to hear your advice on the best way to go with displaying
> form result notices.
>
> For example, after editing an object via a newform, the following page
> displays a notice that says "Object successfully updated".
It's docum
Someone either had the same idea or heard it and answeredvia the
comments on the link,
http://stefanimhoff.de/notiz/django-folder-fuer-mac-os-x-leopard/
On Dec 20, 2007 5:23 AM, konryd <[EMAIL PROTECTED]> wrote:
>
> Someone created these cool leopard icons for lighttpd and rails. I
> guess
I have tabble where I am storing sitewide settings. So I want only
one row to be created in this table. I am trying to enforce this by
over riding the save method.
If I do something like
def save (self):
"""There should not be more than one Blog object"""
if Blog.objects.cou
Hi,
> And I am using a class called Book which will be having the summary
> field mentioned above. So to alter the Book model at the database
> level, i need to run the alter table for Book. I dont know the
> equivalent sql to create a generic relation column in the table.
Just run "python manag
Excellent! Thanks. I think that's what I needed.
--pug
On Dec 19, 11:03 pm, "Eduardo - IdNotFound" <[EMAIL PROTECTED]>
wrote:
> On Dec 20, 2007 1:06 AM, pug2694328 <[EMAIL PROTECTED]> wrote:
>
>
>
> > However, when delving into tutorials they keep referring to the
> > subversion version of Djan
I'm not sure what your end goal is here, but since you seem to be
storing settings in a database, you might consider my dbsettings
app[1], designed for exactly that purpose. I can't guarantee it does
what you need, but it's probably worth looking into.
To answer your question specifically though,
On second thoughts, "sqlall" might be better since it prints out
indexes, initial_data, etc:
python manage.py sqlall
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, sen
Hello all,
I have a problem and I have been googling around for many days for the
solution without any hope. It will be great if someone can help me out
with it.
I have a model Called 'Country' with the following fields
male_count = models.SmallIntegerField( null=True, blank=True,
edita
Hello,
I will start with the code directly which will make it much easier to
explain:)
class ProceedingsEditor( models.Model ):
contact = models.ForeignKey( Contact )
The point here is that the contact table is a 10,000 or so field so a
drop down list is none sense
Now
On Dec 20, 2007 9:03 AM, GodOfGeeks <[EMAIL PROTECTED]> wrote:
> The problem is that when I set the fields to editable=False then they
> won't be visible in the adminModel
The admin interface is deliberately designed not to have
"display-only" data -- the thinking has been that things which can't
More info on this: I am connecting to the db via an ssh tunnel. In the
settings-*.py files, I use
DATABASE_HOST = '127.0.0.1'
Works like a charm, except with the connection module. It is probably
not connecting.
Help!
Gloria
On Dec 19, 7:41 pm, Gloria W <[EMAIL PROTECTED]> wrote:
> I am boggled.
I have an app, and I have added 3 Users in 2 Groups.
How do I get the users that belong to a specific Group??
Using the shell on the built in Django models I get:
>>> G = Groups.objects
>>> U = Users.objects
>>> U.all()
[, ]
>>> G.all()
[, ]
Ok so far? ( the double User: in U.all() concerns me
I am installing pysqlite 2.4.0. I have python 2.3.5 installed and
sqlite 3.1.3. When I run the python setup.py build I get this :
skcompxp:~/Desktop/pysqlite-2.4.0 sptxk$ python setup.py build
running build
running build_py
running build_ext
building 'pysqlite2._sqlite' extension
gcc -fno-strict-
On Dec 20, 1:41 am, Gloria W <[EMAIL PROTECTED]> wrote:
> I am boggled. A SELECT from the MySql command line works just fine.
> But within Django, it returns nothing. It doesn't matter what SQL
> statement I issue.
>
> Here is my syntax:
>
> from django.db import connection
> cursor = connect
On Dec 20, 1:41 am, Gloria W <[EMAIL PROTECTED]> wrote:
> I am boggled. A SELECT from the MySql command line works just fine.
> But within Django, it returns nothing. It doesn't matter what SQL
> statement I issue.
>
> Here is my syntax:
>
> from django.db import connection
> cursor = connect
newDjangoer wrote:
> I am installing pysqlite 2.4.0. I have python 2.3.5 installed and
> sqlite 3.1.3. When I run the python setup.py build I get this :
>
> skcompxp:~/Desktop/pysqlite-2.4.0 sptxk$ python setup.py build
> running build
> running build_py
> running build_ext
> building 'pysqlite2
Yes I am running OS X 10.4.11. I guess I will move up to 2.5. thanks!
On Dec 20, 11:54 am, Jan Rademaker <[EMAIL PROTECTED]> wrote:
> newDjangoer wrote:
> > I am installing pysqlite 2.4.0. I have python 2.3.5 installed and
> > sqlite 3.1.3. When I run the python setup.py build I get this :
>
> >
I am trying to generate a feed.
So I added the following lines to urls.py
feeds = {'latest': main_feed}
urlpatterns += patterns('',
(r'^rss/(?P.*)/$', 'django.contrib.syndication.views.feed',
{'feed_dict': feeds})
)
The class main_feed is,
def main_feed (Feed):
blog = Blog.objec
Access this site - Project Management
http://sergiolaranja.blogspot.com/
--~--~-~--~~~---~--~~
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 uns
> The class main_feed is,
>
> def main_feed (Feed):
That should be:
class main_feed(Feed):
-Rajesh
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-u
Looks strange, I have never used "install.py" for WinXP, see this
tutorial: http://thinkhole.org/wp/django-on-windows/.
On 19 дек, 23:55, Trev <[EMAIL PROTECTED]> wrote:
> Hi, This should take 2 seconds for an experience Django user.
> I'm trying to install Django on windows XP. I've installed py
Don't know why you're getting that (I've never tried 0.96, only svn), but
the easiest thing is just to copy the django subfolder into
C:\Pythong25\lib\site-packages\
To test that it works, enter a python prompt and type:
>>> import django
>>>
- Richard
On Dec 19, 2007 3:55 PM, Trev <[EMAIL PROTE
Hi Baxter,
On Dec 19, 3:13 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> Like the title says, I'd like to output a word-friendly format.
> Obviously plain text is trivial, but I'd like to have a doc or at
> least rtf format. Can anyone point me in the right direction?
I've been messing ar
I've worked up the beginnings of a Trac plugin that authenticates
against Django users. I've since determined that I'm not likely to use
it. So, is anyone interested in using and/or maintaining it? If so,
I'll throw it up on trac-hacks.org.
The basic functionality works. I can login to my django
Hello, I am looking for a way to auto-populate a newforms field, I
would like to have the input hidden, and be auto-populated with the
name field of the Customer class the Issue class is a foreign key to
the Customer class can anyone point me in the right direction, any
help would be appreciated,
Are you using the built-in Group and User classes? If what you are
quoting is cut-and-pasted from your console, you maybe using your own
model? Maybe you should show us the actual source code.
FYI -- the built-in classes are django.contrib.auth.models.Group
and ..User
not Groups nor Users
P>P.K.
My hunch is the answer is "No," but is it possible to do a
'date_heirarchy' on a ForeignKey date object? Haven't been able to
find anything in the archive on the topic. Pointers gratefully
accepted.
John
--~--~-~--~~~---~--~~
You received this message because you a
On Donnerstag, 20. Dezember 2007, Waylan Limberg wrote:
> I've worked up the beginnings of a Trac plugin that authenticates
> against Django users. I've since determined that I'm not likely to use
> it. So, is anyone interested in using and/or maintaining it? If so,
> I'll throw it up on trac-hack
Hi John,
> My hunch is the answer is "No," but is it possible to do a
> 'date_heirarchy' on a ForeignKey date object? Haven't been able to
> find anything in the archive on the topic. Pointers gratefully
> accepted.
Your hunch is right. The admin date_hierarchy works only with date and
datetime
anyone know how to auto assign a variable to my form field?
IssueEntryForm.base_fields['customer'].widget = widgets.HiddenInput()
IssueEntryForm.base_fields['customer'].widget = HELP
--~--~-~--~~~---~--~~
You received this message because you are subscribed to th
>
> What is the best method to capture, all events happening on a specific day.
>
> The view must give a report
>
> when you try the url calendar/2007/dec/20
> On December 20th 2007
>
> Tender 222 date of announcement
> Tender 243 last date for receiving bids
> Tender 227 date for recieving
hi there,
I do want to use pagination, but I don't know how to solve a problem.
template-code:
{% for p in paginator.page_range %}
{{p}}
{% endfor %}
but obviously it should be:
{% for p in paginator.page_range %}
{{p}}
{% endfor %}
because in my-view I use the objectpaginator object zero-ba
Thanks Rajesh,
I am not sure about Choices, since there are some 12 stages, with condition
at couple of stages. I do not know how to conditionalize the choice fields.
Also this would mean that for a single tender, we create 12-14 instances of
the Calendar Table. Advise, please
Ramdas
On Dec 2
On Dec 20, 4:38 pm, "Ramdas S" <[EMAIL PROTECTED]> wrote:
> Thanks Rajesh,
>
> I am not sure about Choices, since there are some 12 stages, with condition
> at couple of stages. I do not know how to conditionalize the choice fields.
I just threw in the choices option there as from your initia
Hello. I want to use the pytz package. It has a tzinfo objects called
pytz.UTC that it recommends you store as the general timezone. Is
there a way for Django to set the tz to pytz.UTC whenever it deals
with datetimes?
Thanks,
Ryan Kaskel
--~--~-~--~~~---~--~~
You
On 2007-12-20 14:33:47 -0700, Julian <[EMAIL PROTECTED]> said:
>
> hi there,
>
> I do want to use pagination, but I don't know how to solve a problem.
>
> template-code:
>
> {% for p in paginator.page_range %}
> {{p}}
> {% endfor %}
>
> but obviously it should be:
>
> {% for p in paginator.
Nevermind on this.
--~--~-~--~~~---~--~~
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 email to [EMAIL PROTECTE
hi,
i am passing a tuple (1,2) to a template in a variable like this:
render_to_response("template.html",{"tuple":(1,2)})
how can i access the single-values without a for-loop in the template?
--~--~-~--~~~---~--~~
You received this message because you are subscr
okay, thanks. i think this will bring me to a comfortable solution.
--~--~-~--~~~---~--~~
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 unsubscri
Hi guys, thanks for your replies.
What I'm trying to achieve is to give feedback with a quick notice
each time the user accomplishes an action (e.g. create/edit/delete/
send/etc.).
So I need a quite generic and flexible solution.
The "Messages" solution pointed out by James looks very good, exce
{{tuple.0}}
{{tuple.1}}
On 21 дек, 01:30, Julian <[EMAIL PROTECTED]> wrote:
> hi,
>
> i am passing a tuple (1,2) to a template in a variable like this:
>
> render_to_response("template.html",{"tuple":(1,2)})
>
> how can i access the single-values without a for-loop in the template?
--~--~
On Dec 20, 2:58 pm, mike <[EMAIL PROTECTED]> wrote:
> anyone know how to auto assign a variable to my form field?
>
> IssueEntryForm.base_fields['customer'].widget = widgets.HiddenInput()
> IssueEntryForm.base_fields['customer'].widget = HELP
I'm not sure I understand the question; what exactly d
On Dec 19, 7:47 pm, Rajesh Dhawan <[EMAIL PROTECTED]> wrote:
> > As I mentioned in my other post, it doesn't work for the one process.
>
> My previous code snippet missed an important statement. You will need
> to first get an instance of _transactions from trans_real.py before
> you declare it to
On 21-Dec-07, at 12:59 AM, Waylan Limberg wrote:
> I've worked up the beginnings of a Trac plugin that authenticates
> against Django users. I've since determined that I'm not likely to use
> it.
why are you unlikely to use it?
--
regards
kg
http://lawgon.livejournal.com
http://nrcfosshelpli
On Dec 20, 11:49 am, pk <[EMAIL PROTECTED]> wrote:
> Are you using the built-in Group and User classes? If what you are
> quoting is cut-and-pasted from your console, you maybe using your own
> model? Maybe you should show us the actual source code.
>
> FYI -- the built-in classes are django.con
> I'll look into it, but before I go too far down one track, could
> anybody give some advice on how to approach it using sessions?
Here's an example:
http://staticallytyped.com/2007/05/17/rails-flash-now-for-django/
It's simply middleware that handles stuffing, retrieving, and clearing.
Micha
This is not a very secure thing to do. But if you must, then just use
initial to set the value.
Michael Trier
blog.michaeltrier.com
On Dec 20, 2007 2:32 PM, mike <[EMAIL PROTECTED]> wrote:
>
> Hello, I am looking for a way to auto-populate a newforms field, I
> would like to have the input hidd
Hi,
I've been struggling with union-ing querysets. Here's an example:
>>> qs1=User.objects.filter()
>>> qs1=User.objects.filter()
>>> qs1
[]
>>> qs2
[]
>>> qs1 | qs2
[]
>>> qs1 or qs2
[]
I thought that "|" was equivalent to a "or", as mentioned in the doc:
http://www.djangoproje
I am used to designing relational databases, and I love django's
capabilities with the models and its database APIs.
I have an app with the following models:
Room
Furniture
Room will store records like: "living room", "family room", "kitchen",
etc...
Furniture will store records like: "chair",
On Thu, 2007-12-20 at 21:11 -0800, Julien wrote:
> Hi,
>
> I've been struggling with union-ing querysets. Here's an example:
>
> >>> qs1=User.objects.filter()
> >>> qs1=User.objects.filter()
> >>> qs1
> []
> >>> qs2
> []
> >>> qs1 | qs2
> []
> >>> qs1 or qs2
> []
>
> I thought
On 21-Dec-07, at 10:53 AM, Jeff Anderson wrote:
> In a regular relational database, I'd just have a table in between
> that
> stored the room id, the furniture id, and the furniture count.
make a bridge table like this in django just as you would do otherwise
--
regards
kg
http://lawgon.li
On Thu, 2007-12-20 at 22:23 -0700, Jeff Anderson wrote:
> I am used to designing relational databases, and I love django's
> capabilities with the models and its database APIs.
>
> I have an app with the following models:
>
> Room
> Furniture
>
> Room will store records like: "living room", "f
Thanks for the hint!
This is not the first time that I stumble on the fact that the
documentation is ahead of the code. And that's very problematic
because you spend hours trying to understand why it doesn't work as
the doc says, while it's in fact a bug in the code or a feature that
hasn't been
Thanks!
I'll use the intermediary model for my solution.
Best Regards,
Jeff Anderson
Malcolm Tredinnick wrote:
> On Thu, 2007-12-20 at 22:23 -0700, Jeff Anderson wrote:
>
>> I am used to designing relational databases, and I love django's
>> capabilities with the models and its database APIs
On Thu, 2007-12-20 at 21:33 -0800, Julien wrote:
> Thanks for the hint!
>
> This is not the first time that I stumble on the fact that the
> documentation is ahead of the code. And that's very problematic
> because you spend hours trying to understand why it doesn't work as
> the doc says, while
thanks, great!
--~--~-~--~~~---~--~~
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 email to [EMAIL PROTECTED]
F
74 matches
Mail list logo