Hi, When changing the model, you will need to migrate.
Rather update the past_date field with the newdate etc..
Johannes
From: django-users@googlegroups.com On Behalf
Of Mayank Prajapati
Sent: Wednesday, January 29, 2025 12:34 PM
To: django-users@googlegroups.com
Subject: Re: File
D6FF27NJWKTEGAFRUDNSVVAFIHQ/
>
> <https://mail.python.org/archives/list/python-...@python.org/message/B25APD6FF27NJWKTEGAFRUDNSVVAFIHQ/>
>
> Kind Regards,
>
> Johannes
>
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
Is there any reason why this has to happen after saving? otherwise you
could use pre_save.
bg,
Johannes
On 14.08.2014 08:12, Neto wrote:
I'm using post_save but he is in loop:
@receiver(models.signals.post_save, sender=Cars)
def auto_num_on_save(sender, instance, **kwargs):
my
you could have a look at djorm-ext-pgfulltex.
bg,
Johannes
On 28.06.2014 18:15, Bastian Kuberek wrote:
Hi,
Just saw that django.contrib.admin.ModelAdmin.search_fields
<https://docs.djangoproject.com/en/dev/ref/contrib/admin/#django.contrib.admin.ModelAdmin.search_fields>
full
text
you can use 'Fabric' to deploy your code. But In this case you still
have to write some parts on your own.
https://pypi.python.org/pypi/Fabric/
bg,
Johannes
On 07.06.2014 22:50, Chen Xu wrote:
I am building a django website, and wondering what is an easy way to
move all of
You can use from foo import bar inside your method/class definitions or
you can use import foo.bar.
bg,
Johannes
On 16.04.2014 11:37, Daniel Oźminkowski wrote:
Hello,
I recently cut my models.py into separate files and now I try to fix all
the problems with imports that showed up. I hit the
thnx, yea that's what I'm looking for. unfortunately I cannot use 1.7 ;(
bg,
Johannes
On 19.02.2014 23:19, Anssi Kääriäinen wrote:
If I am not mistaken you are trying to alter how
.filter(customfield__eq=val) and friends work.
In current Django versions you can't easily cu
hey list,
I have a custom Field implemented for one of my models. How do I
implement the database operations (e.g. '==', '!=') for the custom field
which are used to execute database queries?
bg,
Johannes
--
Johannes Schneider
Webentwicklung
johannes.schnei...@
thnx,
I thought there might be a more django-like way.
On 23.01.2014 15:48, Erik Cederstrand wrote:
import sys
sys.exit(123)
--
Johannes Schneider
Webentwicklung
johannes.schnei...@galileo-press.de
Tel.: +49.228.42150.xxx
Galileo Press GmbH
Rheinwerkallee 4 - 53227 Bonn
Hi List,
see the question in the subject. I want to return from a management
command with a given exit code. How can this be done?
bg,
Johannes
--
Johannes Schneider
Webentwicklung
johannes.schnei...@galileo-press.de
Tel.: +49.228.42150.xxx
Galileo Press GmbH
Rheinwerkallee 4 - 53227 Bonn
thnx guys for all that input.
On 21.01.2014 14:06, Erik Cederstrand wrote:
Den 21/01/2014 kl. 10.55 skrev Johannes Schneider
:
yes, but the problem is that we manually give them a pk.
Maye it's the best to reduce the question to the following:
Which (undocumented) field is better for
yes, but the problem is that we manually give them a pk.
Maye it's the best to reduce the question to the following:
Which (undocumented) field is better for this case?
* instance._state.db (checking if this is None)
* instance_state.adding (checking for True)
bg,
Johannes
On 21.01.2014
ith the same pk or same values for its attributes) in the database.
bg,
Johannes
On 20.01.2014 18:21, Avraham Serour wrote:
well you have a problem then, the database is the one holding the data,
if you want to know if the data exists will would need to ask the one
responsible for it, if not
I don't do, because I don't want do to have a query against the database.
On 20.01.2014 16:25, Kelly Nicholes wrote:
Wait-- Why aren't you using exists()? Don't even check the pk.
Model.query.exists() was made for this.
--
Johannes Schneider
Webentwicklung
johann
thnx for this suggestion. we use '_state.adding' now. Is there an
advantage of using '_state.database'?
bg,
Johannes
On 17.01.2014 14:39, Tom Evans wrote:
On Thu, Jan 16, 2014 at 5:23 PM, Johannes Schneider
wrote:
This could be a way to it, but we need this informatio
No, just if you use auto generated PKs. Exactly this is the point. We
use manually generated PKs, so can not use this check.
On 16.01.2014 18:03, Javier Guerra Giraldez wrote:
On Thu, Jan 16, 2014 at 11:50 AM, Johannes Schneider
wrote:
The point is, I have to distinguish between an instance
This could be a way to it, but we need this information while handling
the Pre_save singal. So this does not work too.
On 16.01.2014 17:53, Martin Marrese wrote:
On Thu, Jan 16, 2014 at 1:50 PM, Johannes Schneider
mailto:johannes.schnei...@galileo-press.de>> wrote:
The point is, I h
The point is, I have to distinguish between an instance which is
created, but its save method is not yet called. And an instance coming
from the database via a manager.
bg,
Johannes
On 16.01.2014 16:04, Erik Cederstrand wrote:
Den 16/01/2014 kl. 14.27 skrev Johannes Schneider
:
Hi List,
I
this solution.
Checking 'InstanceModel.objects.exists(pk=self.pk)' generates too much
queries, so this is not acceptable in my case.
bg
Johannes
--
Johannes Schneider
Webentwicklung
johannes.schnei...@galileo-press.de
Tel.: +49.228.42150.xxx
Galileo Press GmbH
Rheinwer
)|
bg,
Johannes
On 03.11.2013 14:01, Robin Lery wrote:
Suppose this is a model for an app Blog:
|class Blog(models.Model):
title= models.CharField(max_length=200)
pub_date= models.DateTimeField(default=datetime.now)
creator= models.ForeignKey(User)
content= BleachField
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
sounds great. Thanx guys.
On 12.04.2013 11:29, Stratos Psomadakis wrote:
> Hi fellow Django users!
>
> We are pleased to introduce objpool [1] to the Django community.
>
> objpool provides a generic library for pooling resources as objects.
> It's b
Hey,
it would be nice to have some more details about the error or problem
you have.
bg,
Johannes
On 07.04.2013 22:40, Martin Charles wrote:
> What is wrong with my code? I cant find this annoying problem.
>
> Here is a gist:
> https://gist.github.com/caffinatedmonkey/f2283756
this solves my problem
(or other upcoming problems related to this).
thank you guys.
bg
Johannes
On 07.04.2013 22:31, Alexis Roda wrote:
> Al 07/04/13 21:35, En/na Johannes ha escrit:
>> I get again to different results.
>> the shell accesses the settings.py while from the testserver
I get again to different results.
the shell accesses the settings.py while from the testserver the
settings.pyc is accessed. After I deleted the pyc-file. the testserver
uses the settings.py too.
When and in which cases the pyc-file gets (re)-build?
bg,
Johannes
On 07.04.2013 21:24, Alexis
memory:', 'TEST_CHARSET': None,
'TIME_ZONE': 'UTC', 'TEST_COLLATION': None, 'OPTIONS': {}, 'HOST': '',
'USER': '', 'TEST_NAME': None, 'PASSWORD': '', 'PORT': '&
erver. Even more, If I create
and save data from the testserver, it's only available until I restart
the server.
my configuration is Django 1.4 with sqlite3 on Ubuntu.
bg,
Johannes
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To u
Hi!
One question about the topic above.
I'm just wandering what's going on in the admin panel when creating an
instance of a ForeignKey in a special case.
I've got two models. One regular one with the regular fields (like name,
date etc.) an one who holds the ForeignKey to that class.
the regul
Partner in a Start Up backed by one of Europe’s leading VCs. We’re
developing a Social Commerce product with massive potential. The
development takes place in Sweden and the initial roll out will be in
the US. Now we’re building a team in Stockholm and California.
I’m looking for developers to com
in case someone runs into this in the future, i had to set the default
from email to get it to work.
DEFAULT_FROM_EMAIL = 'sam...@domain.com'
nicer error messages would have been, well nice.
On Wed, Nov 17, 2010 at 9:52 AM, Johannes Nel wrote:
> ok, I decided to switch to o
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/smtplib.py"
in sendmail
712. raise SMTPRecipientsRefused(senderrs)
Exception Type: SMTPRecipientsRefused at /accounts/register/
Exception Value: {u'xxx.x...@gmail.com': (451, 'Temporary local
probl
Hi
My dev enviroment is OS x 10.5
I grabbed the django registration application and configured it to
email via my local host spooler. After which I setup postfix alias's
for some dummy domains, these I tested from command line and my emails
are coming through. Then i proceed to get the register ap
Nice.
Kudos to the people who did virtualenv, neat tool.
On Tue, Nov 16, 2010 at 9:07 AM, Nick Lo wrote:
> Hi Johannes,
>
> You may be interested in this project:
>
> https://github.com/kmmbvnr/django-hudson
>
> Cheers,
>
> Nick
>
> On Nov 14, 5:36 am, Johanne
deployment, which looks
pretty powerfull, but more investigation is needed.
If anyone has got some experience in fabric and hudson integration or
a good resource on propagation strategies will be much appreciated.
On Sat, Nov 13, 2010 at 4:56 PM, Johannes Nel wrote:
> Hi All
>
> What do
Hi All
What do you guys use for CI servers? Also where can I get some
detailed info on application propagation strategies (from dev, to qa,
to uat to prod) for django
As a side note, I think the getting started documentation should be
updated to reflect the use of relative paths
http://rob.cogit8
pyparsing is an incredibly (perhaps over in this case) powerful tool
for parsing stuff into what ever your heart desires.
On Fri, Nov 12, 2010 at 4:22 PM, Javier Guerra Giraldez
wrote:
> On Fri, Nov 12, 2010 at 3:40 AM, Pradnya wrote:
>> Please let me know if there is any other way to convert t
I've changed that part now, but the output remains the same.
On Apr 22, 5:12 pm, Johannes Wilm wrote:
> well, that's strange, because that part always worked and still works.
> So this line here, to get the daily values:
>
> queryset=PrecioPrueba.objects.filter(pro
imo','minimo').order_by('fecha')
works just fine.
What I have problems with is the part about annotating/aggregating
values for an entire month.
On Apr 22, 5:06 pm, Randy Barlow wrote:
> -----BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Johannes Wilm
Hey,
I have a model which monitors the prices of certain items at certain
markets daily.
precios/models:
...
class Prueba(Approvable):
mercado = models.ForeignKey(Mercado)
producto = models.ForeignKey(Producto)
fecha = models.DateField()
minimo = models.DecimalFiel
You are looking for setattr(): http://docs.python.org/lib/built-in-
funcs.html#l2h-66
for attr in ('groupon', 'companyon', 'addressfirst', 'extendnames',
'clubfieldson'):
setattr(settings, attr, attr in data)
Am 12.06.2008 um 00:48 schrieb Wim Feijen:
>
> Thanks Russell!
>
> I suppose
Wah, nevermind ..
Am 30.05.2008 um 01:27 schrieb Johannes Dollinger:
>
>> Should this work??
>>
>> results = Gear.objects.select_related().order_by
>> (generic_info__hits)
>
> Quotes are missing:
>
> Gear.objects.select
> Should this work??
>
> results = Gear.objects.select_related().order_by(generic_info__hits)
Quotes are missing:
Gear.objects.select_related().order_by('generic_info__hits')
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the
You could use a filter:
@register.filter(name='concat')
def concat(value, arg):
return "%s%s" % (value, arg)
and then {% include dir|concat:"/tag.html" %}.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"
Malcolm Tredinnick schrieb:
> On Thu, 2007-11-01 at 09:56 -0700, johannes wrote:
> > Hello,
> >
> > I'm planning to alter an existing hobby-project-site from php and xml/
> > xslt scripts into a python web-app.
> > I just played around a little bit with dj
st any
tutorials for this?) or puts me on the right track where to look.
Thanks in advance,
johannes
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email
from macports, so in the end
there is quite a lot of stuff to write in your PATH when you do this.
Anyway directly using the django from djangoproject seems to be less
complicated.
Cheers,
johannes
--~--~-~--~~~---~--~~
You received this message because you are subscrib
Well, which django revealed:
no django in /opt/local/bin /opt/local/sbin /Library/Frameworks/
Python.framework/Versions/Current/bin /bin /sbin /usr/bin /usr/sbin /
usr/texbin /usr/local/bin
So there is something wrong with my django-macports-installation?
In opt/local/bin there's only django-adm
> Can you successfully run this:
>
> [EMAIL PROTECTED] python
>
> >>> import django
>
> ?
No. That doesn't work either. Well, but how do I figure out what's the
right path to /path/to/django/bin?
There are so many "djangos" in my opt/local/-directory. (mostly
receipts or rsync-stuff from macports
Uhm. Yes I'm logged in as non-admin user. But even when I log in via
terminal to my admin-account (su -l ...), the same error occurs.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to
Ok. Adding
export PYTHONPATH=$PYTHONPATH:/opt/local/lib/python2.5/sitepackages/
django/core
to my .profile seemed to be the remedy.
But no I get the error:
/Library/Frameworks/Python.framework/Versions/2.5/Resources/Python.app/
Contents/MacOS/Python: can't open file 'manage.py': [Errno 2] No such
ht. Anyway, here's
my .profile:
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
What should I change?
Cheers,
Johannes
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To p
Traceback (most recent call last):
File "manage.py", line 2, in
from django.core.management import execute_manager
ImportError: No module named django.core.management
computer:~/Sites/mysite user$
What went wrong here?
Thanks for
.1-1, both standard Debian packages. Any pointers?
Thanks in advance,
-Johannes
The views:
--
from django.http import HttpResponse, HttpResponseRedirect
def test1(r):
r.session.set_test_cookie()
return HttpResponseRedirect('/kysely/test2/')
def t
ed and even the
models I need have many attributes which are useless for the visualization.
But if "inspectdb" is the easier and safer approach, it would be fine too.
I'm glad for any hint!
Cheers,
Johannes
--~--~-~--~~~---~--~~
You received t
brian corrigan schrieb:
> The only problem I came across with the Mac (iBook) was that there is
> no c compiler installed. You can download xcode tools (I think) from
> the apple developer site which will give you gcc. The problem is that
> xcode is about a 1GB (latest realease)./installing_django
54 matches
Mail list logo