I'm proposing to add form_valid function and make next trick
def form_valid(self, form)
# avoid to early savind od the new address
newaddress = form.save(commit=False)
# you need to update object by correct client id value. Keep in
mind that I'm writing without django from
Hi,
Thank for the reply.
Digging into _meta.fields of a created instance I see, as you said that *
myfield* is still defined as in the upper class.
If I understood correctly your answer sub-class should have the field
"redefine" instead of assigned .
something like
*myfield
=
models.Positive
Hi,
checking on my side.
All this works as soon as upper class are not abstract.
regards
manu
On Monday, November 26, 2012 10:19:18 AM UTC+1, Emmanuel Jannetti wrote:
>
> Hi,
>
> Thank for the reply.
>
> Digging into _meta.fields of a created instance I see, as you said that *
> myfield* is sti
Any help please..thanks
On Nov 25, 2012 3:34 PM, "Swaroop Shankar V" wrote:
>
> Hello All,
> I am trying to create a classifieds for my sites using django
calssifieds. When ever I try to upload files from the user side, am getting
the error
>
> OSError at /classifieds/create/edit/5/
>
> [Errno 2]
how should I get the request object when I need that object in some places
rather than in the view for each view has request as its first parameter?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To view this discussion on the web visit
https
Hi all,
I've been doing the test-driven Django tutorial at
http://www.tdd-django-tutorial.com/
I'm partway through the tutorial, and when I run the command "python
manage.py test fts", the message "Creating test database for alias
'default'..." gets shown for 4-5 seconds before anything else h
On Monday, 26 November 2012 10:16:01 UTC, Miaobing Jiang wrote:
> how should I get the request object when I need that object in some places
> rather than in the view for each view has request as its first parameter?
>
Pass it from the view into whatever functions need it.
--
DR.
--
You receiv
Hi, is there any ready to use django package / code snippet for
creating a complex forms for a data which is distributed along many
tables?
I have quite complex data structure, in many cases when creating new
record (for example "Book") one needs to create new "Author", and
"Agreement" (related to
If you use different characters on your code (comments, strings, etc), such
as é, í, ç or, on your case, you sign the code with your name, 名宏贾, you
need to add:
# -*- coding: utf-8 -*-
on the beginning of the file.
This is a guess about what is happening with your code.
Pasting the entire traceb
The tutorial uses a sqlite file database not a in memory database, try omitting
the name parameter and it should speed things up
--
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
I did some research on windowing functions since your post. They tend to be
slower since they ignore optimizations. For example, when using count(*),
indexes are used whenever possible to avoid hitting the table data and outer
joins are ignored altogether. And limited searches quit as soon as t
Hi guys
thank you Yati, this really help me. Will check right away.
Cheers
On Mon, Nov 26, 2012 at 2:32 AM, yati sagade wrote:
> Hi. I've used django-nonrel for interfacing with the Google datastore on
> appengine and I use mongoengine for the rest. I guess mongoengine is the
> recommended way
I found the answer by myself...
it was just to add this:
ret = request.POST
form = ret['kunde']
and use this "form" as a variable... "%s" %form
Am Freitag, 23. November 2012 08:31:30 UTC+1 schrieb Nebros:
> I saw your answer and it was long and with a lot of time, i thanks for
> th
Trying to port up from *old* django this class/function and having a bit of
trouble with the im.save which returns
Exception Type: IOError Exception Value:
[Errno 2] No such file or directory
where the no file or directroy string is a correct path from MEDIA ROOT
concatenated with tiny/fil
I've been using Syntastic along with Vim for Django development for
sometime but I'd like to see if I could improve my Vim configuration.
The problem with Syntastic is that it does not work too well when
checking partial HTML documents (which is often the case with Django
because of template in
Hello,
For the url pattern www.example.com/xxx/cache/[hex] it's a bug in chrome
extension extension ID bodddioamolcibagionmmobehnbhiakf
http://code.google.com/p/chromium/issues/detail?id=132059
El jueves, 19 de julio de 2012 09:21:20 UTC+2, Thomas Orozco escribió:
>
> Did you visit the page wh
Hi,
I extend the django user model as described in the dev doc. I wan't to keep
most of the original User model features so I extend the AbstractUser
class. I've defined in settings.py:
AUTH_USER_MODEL = 'myapp.CustomUser'
My user class:
class CustomUser(AbstractUser):
custom_f
>>> import httplib
>>> myhost = httplib.HTTPConnection('www.google.com')
>>> myhost.request("GET")
>>> googleanswer = myhost.getresponse()
>>> print googleanswer.read()
302 Moved
302 Moved
The document has moved
http://www.google.com.ua/";>here.
>>>
Need more ?
2012/11/25 Andriyko :
> Hello
That doesn't solve the problem I stated. I still will be seeing a bounch of
"Company Object" for every company that I register on the database.
I the image https://docs.djangoproject.com/en/dev/_images/admin04t.png from
the tutorial, part 2, we can see how the poll objects are listed by using
t
well mongodb actually no run en django core, but exist other alternative
https://github.com/django-nonrel/django-nonrel and
http://django-mongodb.org/
Cheers
On Sun, Nov 25, 2012 at 3:19 AM, Chanh Le wrote:
> In the settings.py
> import mongoengine
> mongoengine.connect('cooking')
> AUTHENTIC
No need for that. I've reproduced your problem. With python 3 __unicode__
method is ignored.
We should search for corresponding ticket on trac, or create new one.
On Mon, Nov 26, 2012 at 6:31 PM, Anton Baklanov wrote:
> Hi. I've just checked - it uses __unicode__() to display object names.
>
> P
Yes, I'm using python 3. I think there is no ticket for this yet, but I
would prefer someone with better english and more time using django posted
it.
On Monday, November 26, 2012 1:38:04 PM UTC-3, bak1an wrote:
>
> No need for that. I've reproduced your problem. With python 3 __unicode__
> met
__str__ method works fine with python 3.
i will continue searching the truth here and will create ticket (if it will
be required after finding truth)
thanks
On Mon, Nov 26, 2012 at 6:56 PM, ajendrex wrote:
> Yes, I'm using python 3. I think there is no ticket for this yet, but I
> would prefer
On Fri, Nov 23, 2012 at 1:15 PM, Santiago Basulto <
santiago.basu...@gmail.com> wrote:
> Hey guys, i'm kind of confused here...
>
> If I get data from a request, say:
>
> request.GET.get("something") or request.POST.get("something")
>
> Is it automatically being encoded based on the Encoding of th
The problem is not how to fetch, but how to save.
On Monday, November 26, 2012 2:37:31 PM UTC+2, Sergiy Khohlov wrote:
>
> >>> import httplib
> >>> myhost = httplib.HTTPConnection('www.google.com')
> >>> myhost.request("GET")
> >>> googleanswer = myhost.getresponse()
> >>> print googleanswer.r
Sometimes it is very inconvenient to make the `request` object available
deep in the call stack, so I wrote a short middleware to work around this
issue:
http://djangosnippets.org/snippets/2853/
On Monday, November 26, 2012 5:16:01 AM UTC-5, Miaobing Jiang wrote:
>
> how should I get the reques
On Thu, Nov 22, 2012 at 11:28 AM, Jan Murre wrote:
> Hi,
>
> I have the following peculiar problem that is very easy to reproduce.
> I use a simple middleware the attaches the 'app_name' that is defined in
> the urlconf to 'request.user' for subsequent use.
>
>
> from django.core.urlresolver
On Sun, Nov 25, 2012 at 3:17 AM, Darren Spruell wrote:
> I've got a handful of applications that feature paginated object lists
> as well as a search dialog allowing users to search for simple object
> attributes.
>
> What is the common pattern to use in Django apps to build URI query
> strings in
Ok, well the things we're looking to add and/or improve are: Composed
primary key (although we're worried of the difficulty of this one
in particular . Other thing we notice is that Django emulate the DELETE ON
CASCADE, making select and deletes instead of using the DB constraint and
we would l
1. You dont need ManyToMany field
class urlclass(models.Model):
url =models.CharField()
class itemclass(models.Model):
url = models.ForeignKey(urlclass)
myitem = models.CharField()
#somewhere in view
def saveitems(url, itemlist):
for item in itemlist:
item = itemclass(url= urlclass.objects
On 10/11/12 21:49, Some Developer wrote:
In the documentation it is quite clear that the following syntax is
correct in templates:
{% load i18n %}
{% trans "my_string" as blah_string %}
{{ blah_string }}
etc etc.
This works fine if the original trans tag is inside a block but then the
blah_s
Hi
I have the following model:
class Applicant(model.Models):
...
successful = NullBooleanField()
...
def mark_successful(self):
self.successful = 0
self.last_change_by = request.user
self.save(force_update=True)
--
...we look at the present day through a rear-view mirror. This is
somet
Hi
Sorry about the last email - fat fingered it.
For some reason I can't get the model.save() method to actually save
the data I want it to. I have tried using both save() and
save(force_update=True) without any joy.
I have the following model:
class Applicant(model.Models):
...
successful = Nu
On Mon, Nov 26, 2012 at 12:10 PM, Anton Baklanov
wrote:
> __str__ method works fine with python 3.
that's how it's supposed to be according to the six library. kinda
makes sense, since in Py3 all strings are unicode
--
Javier
--
You received this message because you are subscribed to the Goog
Hi there,
a long shot since you have not provided your save() method. Are you calling
super() there?
Cheers
Jirka
-Original Message-
From: Lachlan Musicman
Sender: django-users@googlegroups.com
Date: Tue, 27 Nov 2012 10:14:03
To:
Reply-To: django-users@googlegroups.com
Sub
Hi all
When I have a script like this:
window.onload=function f(){} it is working fine. but
when I create an external js file and put it within the static directory,
and call the function like this
window.onload=f
It is not working at all. (by the way the url is mapped correctly to the js
On Tue, Nov 27, 2012 at 11:00 AM, wrote:
> Hi there,
>
> a long shot since you have not provided your save() method. Are you calling
> super() there?
Jirka, yes I am, but it's only been modified to set the slug:
def save(self, *args, **kwargs):
if not self.pk:
super(A
Ah ok. So it sounds like if I drop "print(gc.garbage)" into my code at the
right points, I will be able to see where the leak is occurring? I did that and
then load tested it (not via anything tricky, I'm just using "ab") via the dev
server running locally, but I'm not seeing anything, it's alwa
I may se the formating incorrectly (on a phone) but it looks like your save()
method does nothing if self.pk already exists (i.e. model is not new)
HTH
Jirka
-Original Message-
From: Lachlan Musicman
Sender: django-users@googlegroups.com
Date: Tue, 27 Nov 2012 11:07:42
To:
Repl
On Tue, Nov 27, 2012 at 11:16 AM, wrote:
> I may se the formating incorrectly (on a phone) but it looks like your save()
> method does nothing if self.pk already exists (i.e. model is not new)
You are right, quite embarrassing. But it does work in other contexts.
Everyday I learn something new
This is an often proposed solution to the problem, but one that I can't
recommend to anybody.
The very name of your proposed middleware -- GlobalRequest -- should point
at why it's a bad idea. You've just defined a global variable, and you've
architected your entire system around the availability
On Tue, Nov 27, 2012 at 3:33 AM, Alexandra Paredes <05-38...@usb.ve> wrote:
> Ok, well the things we're looking to add and/or improve are: Composed
> primary key (although we're worried of the difficulty of this one
> in particular .
A lot of work has already been done on this problem. See Ticke
Problem: I'm using factory_boy to create some mock up objects so I don't
have to use fixtures in my tests (this isn't causing the problem though). I
have a function called _create_fixtures() that is called in the setUp() of
my class which is causing the following IntegrityErrors:
http://dpast
Hi. I've just checked - it uses __unicode__() to display object names.
Please show us your full admin.py and models.py
--
Regards,
Anton Baklanov
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-user
I think {{STATIC_URL}} should have spaces, like {{ STATIC_URL }}.
On Mon, Nov 26, 2012 at 6:04 PM, Loai Ghoraba wrote:
> Hi all
>
> When I have a script like this:
> window.onload=function f(){} it is working fine. but
> when I create an external js file and put it within the static directory,
On Tue, Nov 27, 2012 at 4:34 AM, Loai Ghoraba wrote:
> Hi all
>
> When I have a script like this:
> window.onload=function f(){} it is working fine. but when
> I create an external js file and put it within the static directory, and
> call the function like this
>
> window.onload=f
>
> It is
46 matches
Mail list logo