Hi all,
I recently sent an email to another Django coder asking for some
possible feedback on my situation. I'll simply restate the email here,
because I figured why not ask a bunch of other Django coders, too!
Here it goes...
Hi,
I'm trying to design a django-based gaming news site, and have b
Karen, you're recommendations were great. After fixing the model form
problem, I found that I and others had problems with PILL. Apparently, it's
not easy to install correctly on Ubuntu, and if it isn't you may get
ImageField validation errors when saving images. Here's a link that might
help fix t
Is there a simple way to do the following that I'm just not seeing, or
am I looking at trying to write a custom tag? The functionality I
need is similar to {% regroup %} but not quite the same...
My app currently has a custom admin view in which I've defined a whole
bunch of different lists, whi
hi,
I use a post_save signal to send a tweet on twitter. Just now I have had some
ugly timeout crashes since twitter was not responding and my saves were
getting b0rked. How does one get around that?
--
regards
kg
http://lawgon.livejournal.com
--~--~-~--~~~---~--~-
Hi guys, in django admin the views that show the register's just have
a link to "edit", but what happen if a need an extra(S) links to
another views?
for example:
i have view that my show list of registered People, the nick is
linking to the Edit page (the normal way of Django), but i need
anoth
Thank you!
Alan.
On Aug 6, 10:51 pm, Daniel Roseman wrote:
> On Aug 6, 8:36 pm, zayatzz wrote:
>
>
>
>
>
> > Hello
>
> > I am not entirely sure if i am asking the right question, but here is
> > what am trying to do.
>
> > I am saving user mugshot with form and it works just fine. I rename
> >
On Fri, 2009-08-07 at 11:56 +1000, Malcolm Tredinnick wrote:
> On Thu, 2009-08-06 at 08:06 -0700, cArkraus wrote:
> > Hey all,
> >
> > I cant seem to get my (non-model-)forms datefield localized.
> >
> > Here's my first attempt:
> > some_date = fields.DateField(widget=widgets.DateInput(format=ug
oh man :) thanks :) so easy :)
On Aug 6, 10:55 pm, "Adam V." wrote:
> ModelAdmin.list_per_page will let you control how many items appear on
> a particular admin
> list:http://docs.djangoproject.com/en/dev/ref/contrib/admin/#django.contri...
>
> On Aug 6, 7:50 pm, Asinox wrote:
>
>
>
> > Well,
ModelAdmin.list_per_page will let you control how many items appear on
a particular admin list:
http://docs.djangoproject.com/en/dev/ref/contrib/admin/#django.contrib.admin.ModelAdmin.list_per_page
On Aug 6, 7:50 pm, Asinox wrote:
> Well, i cant find any about it, i want to know if the paginatio
Well, i cant find any about it, i want to know if the pagination exist
in the admin... i think that "yes"..but .. i cant see any thing
about..
thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" gro
On Thu, Aug 6, 2009 at 7:20 PM, Kenneth Gonsalves wrote:
> is it not deprecated?
The documentation covers that question, too.
--
"Bureaucrat Conrad, you are technically correct -- the best kind of correct."
--~--~-~--~~~---~--~~
You received this message becaus
On Fri, Aug 7, 2009 at 2:56 AM, Shawn Milochik wrote:
>
> Look for the post_save signal.
>
> Once you can attach your own function to that signal (make it listen
> for the signal and kick something off), you can probably have Django
> dump the raw SQL query that is created to a text file. I don't
On Thu, 2009-08-06 at 08:06 -0700, cArkraus wrote:
> Hey all,
>
> I cant seem to get my (non-model-)forms datefield localized.
>
> Here's my first attempt:
> some_date = fields.DateField(widget=widgets.DateInput(format=ugettext
> ('%d.%m.%Y')))
This would do the translation when the file is imp
On Thu, 2009-08-06 at 07:35 -0700, nono wrote:
> I was reading my post and though it was not very clear
>
> My model uses CommaSeparatedIntegerField to store some integer values.
> I want my users to use SelectMultiple widget to create/update those
> integer so I put a ChoiceField with widget=Sel
On Thu, 2009-08-06 at 07:15 -0700, Jan Ostrochovsky wrote:
> Hello,
>
> http://docs.djangoproject.com/en/dev/topics/db/models/#multi-table-inheritance
> says:
> The inheritance relationship introduces links between the child model
> and each of its parents (via an automatically-created OneToOneFi
figured it out, but I'm not sure I can articulate what I did. I had
to start the shell first, then import my model.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send e
It looks like the issue is resolved. Many thanks to Kenneth and
Daniel. Here's the summary to help others:
It looked at first like the PYTHONPATH was not picking any of my apps
or the third-party apps up when running syncdb. This was not the
case. Instead, coltrane's classes weren't loading b
On Friday 07 Aug 2009 12:02:19 am James Bennett wrote:
> On Thu, Aug 6, 2009 at 1:16 PM, Asinox wrote:
> > Thanks Alex Gaynor :) is working :)
>
> It's very important to note that the documentation for this module
> would have given you the same information. In general, you should be
> doing your
Hi Eric,
Thanks for the info. A couple questions:
* Does the .5 version work with django 1.1?
* Do you have any sort of ETA on when you think the GitHub version
will be ready for public use? Is it in a form now that it could
actually be used? IE, if I am willing to dive in and look at the
I moved development over to GitHub [1] and have actually gone ahead
with that big rewrite (thanks also to Honza and team Ella, as well as
Thejaswi Puthraya). It's a total rewrite with very little common
code, so none of the documentation is up to date. The old 0.5.X
version is stable enough, and
On Aug 7, 7:43 am, pcrutch wrote:
> So I run the dev server for my project and everything comes up fine,
> map shows properly and loads the data correctly. However, using wsgi
> the map loads and gives " Unhandled request return Internal Server
> Error" and I checked the log file and I have the
On Aug 7, 7:37 am, Rebecca K wrote:
> I'm working on an ARK (Archival Resource Key) resolver in django, and
> as part of the ARK spec I need to recognize and distinguish urls
> ending with '?' and '??' (no query string or anything else
> following).
>
> When I run my django app throughmod_wsgi
I tried your suggestion and got this:
>>> from coltrane.models import Category
Traceback (most recent call last):
File "", line 1, in
File "/home/matthew/dev/source/coltrane/models.py", line 3, in
from django.db import models
File "/usr/local/lib/python2.6/dist-packages/django/db/__in
I tried your suggestion and got this:
>>> from coltrane.models import Category
Traceback (most recent call last):
File "", line 1, in
File "/home/matthew/dev/source/coltrane/models.py", line 3, in
from django.db import models
File "/usr/local/lib/python2.6/dist-packages/django/db/__in
Anyone know any status on the django-threadedcomments app? The google
group on it seems to be inactive. The last update I see about it is:
March 31, 2009: Released version 0.5 of the application and moved.
This is the last of this line--the next release will be a large
rewrite to use the commen
Hello,
I'm going through the tutorial when I have time. A few weeks back, I
created the polls app, was able to retrieve data and use the admin
interface and everything was beautiful. Now I'm trying to catch up
where I left off and am having problems. When I do the runserver
command, it tells me
Ah, that's it. Thanks Karen. What an awesome quick response. My
mistake.
Thanks
gene
On Aug 7, 10:28 am, Karen Tracey wrote:
> On Thu, Aug 6, 2009 at 5:41 PM, ristretto.rb wrote:
>
> > Hello,
>
> > I'm working on some unit tests using the Client that comes with
> > subclassing django.test
On Thu, Aug 6, 2009 at 5:41 PM, ristretto.rb wrote:
>
> Hello,
>
> I'm working on some unit tests using the Client that comes with
> subclassing django.test.TestCase.
>
> When run code like this
>
> response = self.client.get("/project/usecase")
>
> The object response.context is a list type obj
I think I've fixed the problem. It had to so with PIL not being installed
correctly. Check out this link:
http://www.answermysearches.com/fixing-pil-ioerror-decoder-jpeg-not-available/320/for
a possible solution. Now, jpeg images are uploaded and saved.
On Thu, Aug 6, 2009 at 6:42 PM, Mac wrote
Hi, Rebecca!
Try to use request's `get_full_path` [1] method. It's environment
independent and produces full path string with query.
[1]:
http://docs.djangoproject.com/en/dev/ref/request-response/#django.http.HttpRequest.get_full_path
---
Alex Koshelev
On Fri, Aug 7, 2009 at 1:37 AM, Rebecca K
So I run the dev server for my project and everything comes up fine,
map shows properly and loads the data correctly. However, using wsgi
the map loads and gives " Unhandled request return Internal Server
Error" and I checked the log file and I have the " premature end of
script headers" error. I
Hello,
I'm working on some unit tests using the Client that comes with
subclassing django.test.TestCase.
When run code like this
response = self.client.get("/project/usecase")
The object response.context is a list type object containing two
identical Dictionaries. So, this errors ...
sel
I'm working on an ARK (Archival Resource Key) resolver in django, and
as part of the ARK spec I need to recognize and distinguish urls
ending with '?' and '??' (no query string or anything else
following).
When I run my django app through mod_wsgi, I have access to
request.META['REQUEST_URI'], w
Hello,
Using the builtin/development web server, I am trying to embed an tag in an html response within HttpResponse, but am having no
luck with the link to the image. Specifically:
Here's my return statement:
return HttpResponse('')
Here are the relevant strings in settings.py:
MEDIA_ROOT
Hi Tony,
> @Wayne: Thanks for the welcome. Why are you using 2.5 for your new/
> large project instead of 2.6?
It just seems to be the "sweet spot" release at the moment. I just
found that a few of the libraries I had been using, even in the last
couple of months, had some kind of problem with
Thanks guys :)
On Aug 6, 2:32 pm, James Bennett wrote:
> On Thu, Aug 6, 2009 at 1:16 PM, Asinox wrote:
> > Thanks Alex Gaynor :) is working :)
>
> It's very important to note that the documentation for this module
> would have given you the same information. In general, you should be
> doing you
On Aug 6, 9:33 pm, NealWalters wrote:
> Is there a keyword that will automatically put the URL of the current
> page in the Django form?
> Or do I have to do that in code and pass it to the form as a normal
> user variable?
>
> Here's what I'm trying to accomplish. I have a feedback form on a bas
Bug entered w/ patch: http://code.djangoproject.com/ticket/11651
On Jun 18, 1:24 pm, Alex Gaynor wrote:
> On Thu, Jun 18, 2009 at 3:21 PM, Adam V. wrote:
>
> > Alex, thanks; that's what I was afraid of.
> > If no one else has, I'd be willing to take a stab at a patch for 1.2.
>
> > On Jun 18, 1
Is there a keyword that will automatically put the URL of the current
page in the Django form?
Or do I have to do that in code and pass it to the form as a normal
user variable?
Here's what I'm trying to accomplish. I have a feedback form on a base
template. When the user clicks the feedback but
On Aug 6, 8:36 pm, zayatzz wrote:
> Hello
>
> I am not entirely sure if i am asking the right question, but here is
> what am trying to do.
>
> I am saving user mugshot with form and it works just fine. I rename
> the uploaded file to mugshot.[insert imagefile extension here], but i
> want to do
Hello
I am not entirely sure if i am asking the right question, but here is
what am trying to do.
I am saving user mugshot with form and it works just fine. I rename
the uploaded file to mugshot.[insert imagefile extension here], but i
want to do more in form save method than just that.
1) i wa
Hi,
Thanks for the response and for sharing your code. It looks like it is
exactly what I need. I am somewhat surprised that functionality is not
a standard part of django.
I will give it a try sometime next week!
Thanks again,
Chuck
On Aug 5, 5:17 pm, kmike wrote:
> Hi,
> I've recently creat
Look for the post_save signal.
Once you can attach your own function to that signal (make it listen
for the signal and kick something off), you can probably have Django
dump the raw SQL query that is created to a text file. I don't know
the syntax for that, but check the django.db docs.
Ha
On Thu, Aug 6, 2009 at 1:16 PM, Asinox wrote:
> Thanks Alex Gaynor :) is working :)
It's very important to note that the documentation for this module
would have given you the same information. In general, you should be
doing your best to read and familiarize yourself with documentation so
that y
On Aug 6, 5:07 pm, koranthala wrote:
> Hi,
> I am designing a website with Django and Apache. This is my first
> foray to web designing, even though I have quite a bit of experience
> in another area.
> The logic for the site is somewhat involved - It is better to think
> of it as more of a
Thanks Alex Gaynor :) is working :)
On Aug 6, 1:57 pm, Alex Gaynor wrote:
> On Thu, Aug 6, 2009 at 12:55 PM, Asinox wrote:
>
> > Hi guys, please i need to know why md5 return this:
>
> >
>
> > the way that im using:
>
> > def encriptar():
> > toEncode = pickle.dumps(datetime.now)
> > enco
On 08/06/2009 01:55 PM, Asinox wrote:
> Hi guys, please i need to know why md5 return this:
>
>
>
>
> the way that im using:
>
> def encriptar():
> toEncode = pickle.dumps(datetime.now)
> encoded = md5.new(toEncode)
>
> return encoded
>
Because encoded is an md5 hash *object*.
Thanks Daniel for reply
ill tell u my problem, this form work fine in the User Panel , but in
the Admin dont work.
exactly my problem:
i have a form... when the form is saved, im saving "pub_date" data in
another database table, that is fine in the User Panel, but in the
Admin panel don't work.
On Aug 6, 6:38 pm, Asinox wrote:
> Hi guys, i need a litter help, i know that if i want a Form from Model
> i need to use ModelForm, but im lost with something... i have a view
> that render a Form (ModelFrom) and save this, but now i need to use
> the funcion SAVE in the Model (for use in the
Hi,
Streamweaver wasn't suggesting assigning 00 to every time, just hiding what
you don't want to show using views or templates. For instance:
http://docs.djangoproject.com/en/dev/ref/templates/builtins/#time
- Paulo
On Thu, Aug 6, 2009 at 6:47 PM, Hellnar wrote:
>
> Hello,
> I need this beca
On Thu, Aug 6, 2009 at 12:55 PM, Asinox wrote:
>
> Hi guys, please i need to know why md5 return this:
>
>
>
>
> the way that im using:
>
> def encriptar():
> toEncode = pickle.dumps(datetime.now)
> encoded = md5.new(toEncode)
>
> return encoded
>
>
> Thanks
> >
>
You can call the hexdi
Hi guys, please i need to know why md5 return this:
the way that im using:
def encriptar():
toEncode = pickle.dumps(datetime.now)
encoded = md5.new(toEncode)
return encoded
Thanks
--~--~-~--~~~---~--~~
You received this message because you are su
Hello,
I need this because it is a task specific requirement for my project
(a television broadcast flow management which only consists of HH:MM
format).I will let the user login via the admin panel and add these
broadcast flows includint those times thus each addition with
assigning HH:MM:00 wou
I came from the PHP world myself and am even doing some of it still
but I don't think what you're saying is of particular concern.
Even in PHP you have to worry about differences in PHP 4 and 5 and so
on so the concern itself isn't just a Python one. I can say that
support for Python 2.6 will be
Hi guys, i need a litter help, i know that if i want a Form from Model
i need to use ModelForm, but im lost with something... i have a view
that render a Form (ModelFrom) and save this, but now i need to use
the funcion SAVE in the Model (for use in the admin)... but im
lost... bcz in the view f
I'm not really sure you can but I'm also not clear why this is a
problem. It would seem easy to just not use seconds and filter them
out in the template and views as needed. Is this practical for your
needs or is there a specific benefit you're seeking by filtering out
seconds from the field?
O
Greetings, I am trying to implement a TimeField model which only
consists of HH:MM (ie 16:46) format, I know it is possible to format a
regular Python time object but I am lost about how to manage this with
Django.
Cheers
--~--~-~--~~~---~--~~
You received this me
Sorry, it were an human error!
Solved!
--
Gustavo Henrique
http://www.gustavohenrique.net
http://blog.gustavohenrique.net
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this grou
Hi,
I'm new to Django and programming in general. I've been trying to
create a form that simply uploads images and saves them to a app
folder. I'm using MySql with Django svn. Here's my model:
class Images(models.Model):
prim = models.AutoField(primary_key=True, db_column='PRIM') #
Field nam
Hi!
I'm trying to compare 2 dates and appears the error message:
can't compare datetime.datetime to datetime.date
But in the shell is ok. why?
date1 = models.DateField()
date2 = datetime.date.today()
--~--~-~--~~~---~--~~
You received this message because you are
Bingo!!!
:D
I follow this:
http://oebfare.com/blog/2008/feb/23/changing-modelchoicefield-queryset/
and now I'm happy with mi desired current user based queryset
Thank you all!
BTW, my form class finally looks like...
---
class SendMessageForm(forms.Form):
recipientUser = ShowValidContact
But why don't you put:
recipientUser = ShowValidContactList(currentUser=self.user)
inside the __init__?
- Paulo
2009/8/6 Julián C. Pérez
>
> Thanks for reply, Paulo
> But if I...
> ---
> class SendMessageForm(forms.Form):
>
>recipientUser = ShowValidContactList(currentUser=self.user,
Hello,
I'm a developer for a Polish NGO, owning 5 schools in Warsaw. My
organization decided to throw out our antiquated custom PHP intranet
system (everything school needs: timetables, grades, reports,
announcements, forums, etc. ) and design a brand new one using Django.
And to Open Source it.
Thanks for reply, Paulo
But if I...
---
class SendMessageForm(forms.Form):
recipientUser = ShowValidContactList(currentUser=self.user,
label=u'Send to')
messageSubject= forms.CharField(label=u'Subject')
messageContent = forms.CharField(label=u'Content',
widget=forms.Textar
It doesn't have to be a callable, you can just do something like:
recipientUser = ShowValidContactList(currentUser=self.currentUser)
I never used that kwargs.pop function (I didn't know you could do that),
but I have code like this:
class ExperimentForm(ModelForm):
""" Generate form to hand
Hi,
I am designing a website with Django and Apache. This is my first
foray to web designing, even though I have quite a bit of experience
in another area.
The logic for the site is somewhat involved - It is better to think
of it as more of an application rather than a site.
The problem i
I'm far from being an expert, but maybe you can look at the django-tagging
code for inspiration:
http://code.google.com/p/django-tagging/
What they do is to provide a TagField in the tagging application, and then
you can use that field in the form of the application using tags. You can
probably d
Thanks for the tips, Berco, Wayne.
@Wayne: Thanks for the welcome. Why are you using 2.5 for your new/
large project instead of 2.6?
Tony
On Aug 5, 2:22 pm, Wayne Koorts wrote:
> Hi Tony,
>
> > However, I'm nervous about the Python 3 situation. What if I start
> > building a large project ba
On Aug 6, 3:20 am, Russell Keith-Magee wrote:
> What you have described shouldn't require any particularly special
> handling. I have code in production that does exactly the same thing -
> a daemonized process that responds to requests on a port, does some
> processing, and saves the result to t
Good morning list,
I've been working on a simple Django blog as a learning exercise and
today I've been following this blog post about a simple way to add
images to blog posts. My changes run fine on Django's test server
without errors, however the image related part of the BlogPost's admin
page
My real problem it that the field should looks like:
---
recipientUser = ShowValidContactList(currentUser=_something_,
label=u'Send to')
---
and if I have a form's init method like...
---
def __init__(self, *args, **kwargs):
self.currentUser = kwargs.pop('currentUser', None)
super(SendMess
Hi, I'd like to shed some light on the "the right way" to make
applications in django by an example and a few questions.
Let's say that I have a 'users' application (acting as "user profiles"
on the built-in user authentication system) and I want to add an
avatar image feature to it.
I'd like to
you can use
process_response(self,request,response)
in the process_response, you can do :
if requst.user is in the first-login table, you can redirect URL to
change-passwd page
a little suggestion,
pjv 写道:
> i thought of something along those lines. that's exactly the kind of
> thing that i w
Hey all,
I cant seem to get my (non-model-)forms datefield localized.
Here's my first attempt:
some_date = fields.DateField(widget=widgets.DateInput(format=ugettext
('%d.%m.%Y')))
That's working fine, until the user switches his sessions language.
Then, the date is still shown in the format(ie.
Thanks, Karen. I really appreciate all the time you put in looking at this
and your comments are very informative. You were right about naming the
primary key PK (I thought Django would like that, but it doesn't). I changed
it to PRIM and the model form renders the way it should in photos.html. I
d
On Aug 6, 3:34 pm, Julián C. Pérez wrote:
> Hi
> I tried doing that...
> But it does not work
> For example, if I do something like...
> ---
> class SendMessageForm(forms.Form):
> recipientUser = ShowValidContactList(label=u'Send to')
> messageSubject= forms.CharField(label=u'Subj
I was reading my post and though it was not very clear
My model uses CommaSeparatedIntegerField to store some integer values.
I want my users to use SelectMultiple widget to create/update those
integer so I put a ChoiceField with widget=SelectMultiple in my form.
My problem is that all I can get
Hi
I tried doing that...
But it does not work
For example, if I do something like...
---
class SendMessageForm(forms.Form):
recipientUser = ShowValidContactList(label=u'Send to')
messageSubject= forms.CharField(label=u'Subject')
messageContent = forms.CharField
(label=u'Con
Hello,
http://docs.djangoproject.com/en/dev/topics/db/models/#multi-table-inheritance
says:
The inheritance relationship introduces links between the child model
and each of its parents (via an automatically-created OneToOneField).
http://docs.djangoproject.com/en/dev/ref/models/fields/#onetoone
Simple Pagination in Django is great but I'm having some trouble with
the best way to design pagination with querysets derived from Search
Forms.
I'm currently using the Django-Pagination middleware and it works
great but there's really pretty bad documentation on it (as with many
projects) and I
I am using formsets with my application but I have noticed some
behavior with internet explorer. It seems when I submit the form on
internet explorer I will get a mixture of page has expired, page not
found or blank page. But, when I use a firefox I have no problems.
Does anyone have any suggestio
IBM_DB_DJANGO-0.1.2
---
IBM_DB_DJANGO adaptor enables access to IBM databases from Django
applications http://www.djangoproject.com/. The adaptor is developed
and maintained by IBM.
What's New?
We are pleased to announce the release of ibm_db_
On Aug 6, 1:56 am, Mac wrote:
> Hi,
>
> I'm new to django. When I try to upload image files, I get runtime
> errors. Here's my model:
> models.py
>
> class Images(models.Model):
> pk = models.IntegerField(primary_key=True, db_column='PK') # Field
> name made lowercase.
Unless you are going t
On Aug 6, 1:32 pm, Matthew wrote:
> $ ~/dev/source/cms: pwd
> /home/matthew/dev/source/cms
> $ ~/dev/source/cms: python
> Python 2.6.2 (release26-maint, Apr 19 2009, 01:58:18)
> [GCC 4.3.3] on linux2
> Type "help", "copyright", "credits" or "license" for more information.>>>
> import coltrane
>
Thanks for that, I'll take a look at it. I just thought given
manage.py has the ability to inspectdb, it shouldn't be that much of a
stretch to just check if the model and DB schema match.
Cheers
2009/8/6 kmike :
>
> That's a question about database migration. Django doesn't have built-
> in sol
hi,
im trying to build an app which basically is based on the practical
django projects weblog.
my problem now is that i have a "Project" model and i can get the
archive_index view but i cant solve the object_detail url and i dont
understand where im doing wrong.
my model:
class Project(models
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Could we have the full traceback? That really isn't enough information
to determine your problem.
Regards,
Luke
luke.seelenbin...@gmail.com
rekha wrote:
> Hi, im getting ValueError when try to redirect to an html page.. also
> the validation code
==
models.py
import datetime
from django.db import models
from django.contrib.auth import User
from markdown import markdown
from tagging.fields import TagField
class Category(models.Model):
title = models.CharField(max_length=250,
help_t
Thank you!
On 6 Sie, 14:21, Daniel Roseman wrote:
> On Aug 6, 1:09 pm, Sławek Tuleja wrote:
>
>
>
> > HI everyone!
>
> > Can I redirect to view with form passing few variables in POST method
> > (request.POST) and showing them in the form? (i need this in admin
> > action)
>
> > for example thi
Hi,
my model uses CommaSeparatedIntegerField to store a list of integer. I
want my users to use SelectMultiple widget to create/update this field
so I put a ChoiceField with widget=SelectMultiple in my form. My
problem is that all I can get from this is a list of values where I
expect comma separ
Hi, im getting ValueError when try to redirect to an html page.. also
the validation code in forms.py doesnt work when i test it with wrong
inputs. it accepts the wrong input also.. what would be the bug?
===views.py code==
def register(request):
if request.method == 'POST':
On Aug 6, 1:09 pm, Sławek Tuleja wrote:
> HI everyone!
>
> Can I redirect to view with form passing few variables in POST method
> (request.POST) and showing them in the form? (i need this in admin
> action)
>
> for example this works:
> def add_mailing(self, request, queryset):
> return
Hi,
wouldn't it be easier to put this data to session?
Sławek Tuleja pisze:
> HI everyone!
>
> Can I redirect to view with form passing few variables in POST method
> (request.POST) and showing them in the form? (i need this in admin
> action)
>
> for example this works:
> def add_mailing(self,
HI everyone!
Can I redirect to view with form passing few variables in POST method
(request.POST) and showing them in the form? (i need this in admin
action)
for example this works:
def add_mailing(self, request, queryset):
return HttpResponseRedirect('%s?subject=halo' % \
On Wed, 2009-08-05 at 13:09 -0700, drakkan wrote:
> The code is something like this
>
> obj=DBModels.objects.filter(somefilter)
> results=[]
> for o in obj:
> results.append({'field1':o.field1,'field2':o.field2})
>
> return JsonResponse(results)
>
> where JsonResponse is a class derived from
Hi everyone,
All right, you have convinced me. I'll implement this way.
Thank you all for the advice and help!
- Wojciech
On Aug 6, 7:30 am, Daniel Roseman wrote:
> On Aug 5, 11:38 pm,WojciechGryc wrote:
>
> > Thanks for your replies!
>
> > The problem with storing the user ID for each table
You can use ordering by primary key (id by default) because it
increments by every insert.
So newly created rows in db will have greater id than others.
In most cases it can be enough.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to th
> ..go back and read the original poster's
> message. Having the user in threadlocals doesn't solve any problem,
> since he's trying to create a form class based on information in the
> request and that only happens at import time, not every time something
> in the file is looked at.
Yes, my mista
derek wrote:
>
>>> On the other hand, if the two websites are entirely independent, putting
>>> them into a single database is simply poor design. It's trivial to
>>> create a separate database and why not use the tools that are available
>>> instead of adding extra complexity?!
>> I think the id
> > On the other hand, if the two websites are entirely independent, putting
> > them into a single database is simply poor design. It's trivial to
> > create a separate database and why not use the tools that are available
> > instead of adding extra complexity?!
>
> I think the idea is to allow
1 - 100 of 111 matches
Mail list logo