On Tue, 2008-12-16 at 23:23 -0800, oops wrote:
> def OrderPlacedView(request):
> form = OrderPlaceForm()
> try:
> print "try"
> print request.POST
> #brand = BrandName.objects.get(pk=request.POST['brand'])
> except:
> print"nothing"
> return
On Dec 17, 2008, at 3:23 PM, oops wrote:
>
> def OrderPlacedView(request):
>form = OrderPlaceForm()
>try:
>print "try"
>print request.POST
>#brand = BrandName.objects.get(pk=request.POST['brand'])
>except:
>print"nothing"
>return
def OrderPlacedView(request):
form = OrderPlaceForm()
try:
print "try"
print request.POST
#brand = BrandName.objects.get(pk=request.POST['brand'])
except:
print"nothing"
return render_to_response('inventory/orderprocess.html',
{'form':form})
On Wed, Oct 22, 2008 at 6:14 AM, erikcw wrote:
>
> Hi all,
>
> I'm working on a project that uses flatpages pretty heavily. I was
> wondering if there was a way to use named urls with flatpages so that
> I can use reverse() in my other views and {% url
On Tue, 2008-12-16 at 21:35 -0800, steverfran...@gmail.com wrote:
> Given I have a variable that's constructed to contain the filter
> clause I want, how do I pass it to the object.filter?
>
> i.e.
> TripFilter="priceseason__end__gte=datetime.now()"
>
> yet
Given I have a variable that's constructed to contain the filter
clause I want, how do I pass it to the object.filter?
i.e.
TripFilter="priceseason__end__gte=datetime.now()"
yet DiveTrip.objects.filter('TripFilter')
results in
ValueError at /dive/results
too many values to unpack
Yet
On Tue, 2008-12-16 at 20:15 -0800, Chuck22 wrote:
> 1. I want to create Global Unique ID (GUID) as the primary key of my
> database table. Is there GUID available in Django or Python?
The uuid module is part of Python's standard library. Lots of options
there for generating various forms of
1. I want to create Global Unique ID (GUID) as the primary key of my
database table. Is there GUID available in Django or Python?
2. Also, I need to create a Authorization Code (random char/number
string) to verify user's email when people sign up on my site. Is
there generic method in Django or
Rebooted my server and started working for no reason. Don't know what
was going on.
On Dec 16, 8:25 pm, Malcolm Tredinnick
wrote:
> On Tue, 2008-12-16 at 13:22 -0800, prem1er wrote:
> > Just walked through this
> >
Hi Matius,
Thank you for your clue, I have modified my code and it run exactly
like I want.
My code as following below:
def my_view(request):
username = []
password = []
if request.method == "POST" :
username = request.POST['username']
password = request.POST['password']
Perfect. Exactly what I needed.
Thank you Russ
On Dec 16, 5:22 pm, "Russell Keith-Magee"
wrote:
> On Wed, Dec 17, 2008 at 9:04 AM, David Lindquist
>
> wrote:
>
> > I encountered a scenario where I need to query the database for a
> > list of
On Mon, 2008-12-15 at 23:54 -0800, redbaron wrote:
>
> > However, if you want to pass some extra information to the
> > logout_then_login function, look at the third argument in the url() call
> > -- the dictionary of extra parameters. You can set up the login_url
> > parameter there.
>
>
On Tue, 2008-12-16 at 13:22 -0800, prem1er wrote:
> Just walked through this guide
> http://docs.djangoproject.com/en/dev/ref/contrib/flatpages/?from=olddocs
> to get a flatpage working on my site. After trying to access my admin
> page I am now getting an error while trying to log in.
>
> In
On Tue, 2008-12-16 at 02:45 -0800, architecture wrote:
> i was working with php and always i put the favicon.ico in the root of
> the website but now the problem with django occurs
> now i'm working with django and i have a problem now
> i used
> 1. static.serve
> 2. .htaccess
> 3.redirect_to
>
On Wed, Dec 17, 2008 at 9:04 AM, David Lindquist
wrote:
>
> I encountered a scenario where I need to query the database for a
> list of names sorted by length. In SQL this is easy:
>
> SELECT name from distributors_distributor ORDER BY LENGTH(name)
>
> Instead of
I encountered a scenario where I need to query the database for a
list of names sorted by length. In SQL this is easy:
SELECT name from distributors_distributor ORDER BY LENGTH(name)
Instead of writing raw SQL in my view, I am doing this:
names = [x['name'] for x in
On Dec 16, 2:31 am, 朱穆穆 wrote:
> The extra_context in FormWizard is a class attribute so the new
> request may get the context of the previous request.
> I can prepend below to __call__ method to solved it:
>
> self.extra_context = self.extra_context.copy()
>
> Is this
Thanks a lot, Karen! That solved the problem! :-)
And sorry for my lack of attention at the PEP...
Bye,
Diogo
On 16 dez, 21:22, "Karen Tracey" wrote:
> On Tue, Dec 16, 2008 at 6:06 PM, diogobaeder wrote:
>
> > Hi there,
>
> > I'm trying to use
On Tue, Dec 16, 2008 at 6:06 PM, diogobaeder wrote:
>
> Hi there,
>
> I'm trying to use accents in a string, inside the Meta properties, but
> Python throws the following error:
>
> SyntaxError: Non-ASCII character '\xc3' in file /home/diogo/sites/
>
Hi there,
I'm trying to use accents in a string, inside the Meta properties, but
Python throws the following error:
SyntaxError: Non-ASCII character '\xc3' in file /home/diogo/sites/
projetos/diogobaeder/django_site/diogobaeder/../diogobaeder/developer/
models.py on line 27, but no encoding
It took over an hour for this to appear, that's why there are 2
threads.
On Dec 16, 3:00 pm, adrian wrote:
> Hi all,
>
> I'm writing an app that needs random access to a fixed set of data
> (about 1 MB) on just about every request. (It also uses MySQL for
> dynamic data).
Has anyone written these?
TimeSpan for example, is useful because '2 hours' is not a time, it's
a difference between two times.
It has its own validation and display needs.
I need Lat and Long as well.
Thanks
--~--~-~--~~~---~--~~
You received this message
Howdy Folks!
I wanted to be able to have UUID primary keys for certain models.
I found the implementation done by the django_extensions project
(http://code.google.com/p/django-command-extensions/) and it works
fine
as is.
But I wanted to be able to have a UUIDField that stored its values in
an
How could I have some fixed data that is in a Python variable treated
as a Model?
My app has about 1 MB of data that I need random access to for almost
every request. I don't want to read it out of MySQL because it would
be slow. I want to put it in a variable declaration in a python
Hi all,
I'm writing an app that needs random access to a fixed set of data
(about 1 MB) on just about every request. (It also uses MySQL for
dynamic data). I wrote a different app on app-engine that had this
requirement as well and I ended up putting the fixed database in a
large Python
Thank you! I'll look into it. I would have never found this on my own.
On Dec 16, 11:31 am, "Ian Lawrence" wrote:
> Hi
> look athttp://autotest.kernel.org/
> this is a djand and gwt application used for kernel testing. It basically
> sets up an RPC django server
> I'd like to know everything there is to know about using the
> filter_horizontal method when displaying admin backend choices.
>
> I want to re-engineer it.
>
> I was wondering if anyone has done anything like this and could give me a
> couple of pointers to get started.
>
> Any assistance as
Just walked through this guide
http://docs.djangoproject.com/en/dev/ref/contrib/flatpages/?from=olddocs
to get a flatpage working on my site. After trying to access my admin
page I am now getting an error while trying to log in.
In template /home/dev/djprojects/afterthebeep/djTemplates/admin/
Malcolm Tredinnick wrote:
> In hindsight, I probably wasn't clear as to why I'm suggesting this:
> there are a lot of places where Django would like to write to your
> database (sessions, auth lookups, ...). You can configure around and
> away from each of those in turn, but, if this were me,
Hi
look at http://autotest.kernel.org/
this is a djand and gwt application used for kernel testing. It basically
sets up an RPC django server which passes json into gwt.
It is a great app to learn how this all works
Ian
--
http://ianlawrence.info
On 16 déc, 19:07, Lyubomir Petrov wrote:
> I'm just starting a project that is using django-profile. There are
> some fields like "country" that i want to remove.
> As in django-profiles I use my own class that extends the base class
> (BaseProfile), so i can add some
Hi,
> Media classes are part of the form framework. The changelist page is
> not a form, so it doesn't get the media class. I don't think this is
> likely to change.
Ahaaa... Okay, thanks!
> In any case, I'd say that the media requirements for forms are
> different from changelists anyway. As
I am a staunch advocate of the unconventional Google Web Toolkit (GWT)
as a framework for dynamic Web application development. I also use
Django, of course. In my current project, much of my time has been
wasted devising how to transfer content to and from Django and GWT.
The root of my problem
On Dec 16, 6:48 pm, "3lancer.eu" wrote:
> Hi,
>
> As I read
> onhttp://docs.djangoproject.com/en/dev/ref/contrib/admin/#modeladmin-me...,
> the files defined in Media classes' js and css attributes will only be
> added to html on the add/change page. So as far as I
Hi,
As I read on
http://docs.djangoproject.com/en/dev/ref/contrib/admin/#modeladmin-media-definitions,
the files defined in Media classes' js and css attributes will only be
added to html on the add/change page. So as far as I understand, it's
only possible to add some js to the change list
Hi,
Check out:
http://code.google.com/p/django-multilingual/wiki/Introduction
They work for me. After installing as mentioned on that page, you
still need to have
'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware' in
your MIDDLEWARE_CLASSES (at least this is how it works in my
When google spiders our i18n translated django websites, does it try
and indicize all languages? is it possible to force the language by a
GET var (for example _code=en) ?
--
Alessandro Ronchi
Skype: aronchi
http://www.alessandroronchi.net
SOASI Soc.Coop. - www.soasi.com
Sviluppo Software e
I'm just starting a project that is using django-profile. There are
some fields like "country" that i want to remove.
As in django-profiles I use my own class that extends the base class
(BaseProfile), so i can add some common information fields.
What is the best way that i can remove those field
I just use the get method on the POST object.
username = request.POST.get('username','')
if there is no username posted, the username will be blank and should
not authenticate. same for the password.
On Dec 16, 9:39 am, Matias wrote:
> Hello,
>
> You should show the
Have I lost my mind, or did I see a django coda plugin recently? Can't
seem to find it now
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to
Softwarefabrica Django Wiki (sfwiki) is a free, Open Source, Django
wiki application.
It is meant to be used as a component in developing full-fledged wiki
applications, but it also provides a fully working stand-alone
application.
Source is available on Launchpad:
I've tested flup several times, but it wasn't it.
Looks like the problem was really caused by right, but not valid path
(which containes relative paths and django path was there three times
accidentally), that caused recursive imports, afaik.
the problem is solved, thanks
On Dec 14, 2:48 am,
Hi everyone,
I activated the flat pages in my django app, but I also need to have
them in several languages.
Does anyone know how can I achieve this?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users"
I just hg pull the code from time to time. I've had bad luck running
the latest/greatest of anything. So now I only upgrade when I need
to.
-d
On Dec 16, 6:23 am, shabda wrote:
> Django registration has moved from googlecode to Bitbucket, which
> means my projects
On Tue, Dec 16, 2008 at 7:19 AM, sagi s wrote:
> So I'm looking at the data available in the template to try to get my
> hands dirty and restore all this manually but can't find how all this
> magic works. I'm in the debugger looking at the form passed to the
> template via the
On Tue, Dec 16, 2008 at 8:23 AM, shabda wrote:
> Django registration has moved from googlecode to Bitbucket, which
> means my projects which are svn:externaled to django-registration
> might not get the latest code. Is anyone maintaining an svn repository
> which is I can
On Tue, Dec 16, 2008 at 7:44 AM, rtmie wrote:
> OK, got it working:
> changed view code to:
> if request.method =='POST':
>form = AppUserForm(request.POST,request.FILES)
This is covered in the forms documentation; you may want to give it a
read to learn how the
Hello,
You should show the login if the method != "POST".
By calling render_to_response(...) it will render your template, so that is
what the view must return.
I think you want something like this:
def my_view(request):
if request.method == "POST" :
username = request.POST['username']
Hello,
You should show the login if the method != "POST".
By calling render_to_response(...) it will render your template, so that is
what the view must return.
I think you want something like this:
def my_view(request):
if request.method == "POST" :
username = request.POST['username']
Django registration has moved from googlecode to Bitbucket, which
means my projects which are svn:externaled to django-registration
might not get the latest code. Is anyone maintaining an svn repository
which is I can svn:external to?
--~--~-~--~~~---~--~~
You
OK, got it working:
changed view code to:
if request.method =='POST':
form = AppUserForm(request.POST,request.FILES)
On Dec 15, 2:48 pm, rtmie wrote:
> H i ,
> I am trying to migrate a project from 0.95 to 1.02 and so have to
> migrate all of my old model based
Maybe I'm missing something here but I've been struggling with some
basic forms customization issues.
I'm using ver. 1.0
I have created a simple model (Metric) and a form to go with it,
deriving from django.forms.ModelForm with the model set it the Meta as
per the examples.
Out-of-the-box the
I had the same situation as my server is CentOS 5.2. Django needed
MySQL-python 1.2.2. I tried Yum but the default repo gave me version
1.2.1.
You can find version 1.2.2 at SourceForge, but to install it you need
to have MySQL development tools installed on your server. The package
is called
On Dec 16, 9:45 pm, architecture wrote:
> i was working with php and always i put the favicon.ico in the root of
> the website but now the problem with django occurs
> now i'm working with django and i have a problem now
> i used
> 1. static.serve
> 2. .htaccess
>
i was working with php and always i put the favicon.ico in the root of
the website but now the problem with django occurs
now i'm working with django and i have a problem now
i used
1. static.serve
2. .htaccess
3.redirect_to
but none of them works have you any idea for using favicon.ico in the
On 16 déc, 01:15, SnappyDjangoUser wrote:
> I wanted to run this by the group one more time does anyone know
> how to handle sorting results by table header URL after a POST
> request?
>
> I have used the SortHeaders class for GET requests and it works
> great. I am
On 16 déc, 10:26, JF Simon wrote:
> thanks dude.
>
> any idea to split the dict on the _ char ?
> recursive function ?
Probably not the most elegant solution, but it should do the trick:
def add_to_context(self, context, field):
current = context
parts =
Have a look at this also!
http://docs.djangoproject.com/en/dev/topics/email/
On Dec 15, 8:48 pm, Oliver Beattie wrote:
> http://docs.djangoproject.com/en/dev/ref/settings/#email-host
>
> On Dec 15, 7:25 pm, prem1er wrote:
>
> > Didn't know about
On 16 déc, 07:53, JF Simon wrote:
> Hello, i'm new with python (and french so my english may seem very
> poor, sorry about that).
> I would like to list a model's fields and return a dict, here is the
> example :
>
> I have a model class with :
>
> meta_title : CharField(...)
>
Thanks Karen,
Using a combination of both the links you provided I sorted it.
I just needed to change my form slightly
class MyForm(ModelForm):
mydate = forms.DateTimeField(input_formats=['%d-%m-%Y'])
class Meta:
model = MyObject
Thanks again for pointing me the right
thanks dude.
any idea to split the dict on the _ char ?
recursive function ?
--~--~-~--~~~---~--~~
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
Hi Malcom,
Thanks for your help.
Being a noob this was the first time i used the save() method and it
just rocks!
Issue solved.
Regards,
Sajal
On Dec 15, 7:04 am, Malcolm Tredinnick
wrote:
> On Sun, 2008-12-14 at 15:43 -0800, sajal wrote:
> > when using Multi-table
The extra_context in FormWizard is a class attribute so the new
request may get the context of the previous request.
I can prepend below to __call__ method to solved it:
self.extra_context = self.extra_context.copy()
Is this really a bug?
--~--~-~--~~~---~--~~
The extra_context in FormWizard is a class attribute so the new
request may get the context of the previous request.
I can prepend below to __call__ method to solved it:
self.extra_context = self.extra_context.copy()
Is this really a bug?
--~--~-~--~~~---~--~~
Hello everyone
I'd like to know everything there is to know about using the
filter_horizontal method when displaying admin backend choices.
I want to re-engineer it.
I was wondering if anyone has done anything like this and could give me a
couple of pointers to get started.
Any assistance as
65 matches
Mail list logo