Indeed :) . I'd never have guessed that. Thanks,
Axel.
Am 08.09.2011 um 17:47 schrieb Shawn Milochik:
> I think your order by needs to be "-start" instead of "start," then
> take [0] instead of [:1]. That will get the newest entry that matches
> your query.
>
> --
> You received this message
Hello list,
I have a little trouble setting up a Django query. In my app the user logs time
spans by entering two time points. I want to make sure that a time span logged
is not within another span already entered.
Example: ONE goes from 1000 to 1200, TWO goes from 1400 to 1600. Now I want
us
on the fly, depending upon the form definition parameters
> provided to the generator function during runtime. Obviously you need to be
> careful with this, and consider the cons coming with it.
>
>
> On Tue, Aug 23, 2011 at 12:01 AM, Axel Bock
> wrote:
> Hi group,
>
>
ross browser/version.
>
> http://blog.mozilla.com/webdev/2009/02/20/cross-browser-inline-block/
>
>
>
> On Mon, Aug 22, 2011 at 7:35 PM, Axel Bock
> wrote:
> Hah! I can answer something on a Django-list - oh joy :) .
> Yes, indeed I have an idea. *inline-block* may be t
Hah! I can answer something on a Django-list - oh joy :) .
Yes, indeed I have an idea. *inline-block* may be the css thing for you.
A very nice example for that is here:
http://www.brunildo.org/test/inline-block.html
Go to http://www.brunildo.org/ to have an overview over a lot of other stuff,
Hi group,
I have another question about Django forms. I designed a Form for a Model, but
now I want to remove fields depending on some user settings.
Can I do that?
Lets assume the following:
class MyModel(models.Model):
field1 = TextField(null=True, blank=True)
field2 = Textfield(nu
Thanks for all your replies, it makes sense to wait until it's a performance
problem :)
Greetings,
Axel.
Am 21.08.2011 um 22:14 schrieb Simon Connah:
> On 21 Aug 2011, at 19:37, Shawn Milochik wrote:
>
>> Using a OneToOne field does the same thing as a FK with unique set to true,
>> and si
Hi again,
I will need to add some properties to a user in the future. Now I found two
ways of doing it. First, the Django-way (as described in the Django docs). Then
I found some other posts from other people, all doing an inheritance of the
original User-class and using this one. That seems ra
I am _*SO*_ stupid. and equally embarrassed right now.
oh boy.
thank you so much.
Am 20.08.2011 um 18:07 schrieb Yaşar Arabacı:
> Do it like this:
>
> def myview(request):
>if request.method =="POST":
>return call_my_other_func(request)
>else: rtr("index.html")
>
> def ca
Hi all,
I am new to this list (hello btw :), a beginner of Django, and I have
discovered a _very_ strange thing. Basicall I have a view handling a
file upload (see shortened code below). Depending on a select field a
function gets called handling the stuff, and returning. (rtr =
render_to_response
"looks"? tried them yourself? :)
for me it looks like aptana tried to focus on ruby/rails, while pycharm
definitely focuses on python/django.
-Axel.
2011/2/13 Cal Leeming [Simplicity Media Ltd] <
cal.leem...@simplicitymedialtd.co.uk>
> Aptana looks nice, PYCharm looks a bit ugly :/
>
> On Sat,
hm, I'm using pycharm right now, and I really think it "kicks ass" ;)
havent looked at the other "usual" ones (komodo, wing, eclipse, etc.) for a
long time, though.
about ftp ... looks like it:
http://www.jetbrains.com/pycharm/webhelp/deployment-connection-tab.html
cheers,
axel.
2011/2/11 jose
Hi,
try this, I guess this should workd (being new here myself :):
OrderPositions.objects.filter(order__type = "A")
and maybe have a look here:
http://docs.djangoproject.com/en/1.2/ref/models/querysets/#field-lookups
Cheers,
Axel.
2011/2/11 josch
> Hi,
>
> I`m searching for a solution for
Hi again,
I have in my model a DateTime input, which the admin interface automatically
displays as two separate DATE and TIME input fields. I would like to do
that, too.
Can anyone tell me how? :)
Thanks & greetings,
Axel.
--
You received this message because you are subscribed to the Google
f() - it didn't get called. Any
ideas, why?
Axel.
2011/2/5 Shawn Milochik
> On 02/05/2011 01:08 PM, Axel Bock wrote:
>
>> practically:
>> - the user enters "0300" in the datetime field.
>> - I make "0300" into date=0, time=03:00, valid field
let's make an example: in the datetime fields of the forms there will only
be a time, which is ok for the user. the date will be added later by some
background logic, for convenience.
practically:
- the user enters "0300" in the datetime field.
- I make "0300" into date=0, time=03:00, valid field.
hi all,
really, I don't get this model form validation stuff. And currently, right
now, I am immensely p*** off, because either the documentation is horribly
bad (at least for me) or I am simply way too stupid.
okay, enough rant, let's get practical - on to my little problem. I want to
do model f
out the full path.
>
> C:\Python27\Scripts\django-admin.py startprofect mysite
>
> C:\Python27 is already added to my windows' PATH. Proably will need to
> add C:\Python27\Scripts to it too.
>
>
> On Jan 30, 1:44 am, Axel Bock wrote:
> > hm ... my windows times are
hm ... my windows times are over quite a while, BUT ...
1) try associating the .py extension with the python commandline
interpreter.
2) syntax error? send a screendump maybe, or your exact command line ... it
_should_ work without problems.
can you execute other simple python scripts?
cheers,
forget it. it was formset.forms ...
I *SWEAR* there is another example just with "for form in formset" ...
thanks anyway :)
Axel.
2011/1/25 Axel Bock
> Hello all,
>
> I am trying to implement something quite simple, in my eyes. But it does
> not work at all ... .
Hello all,
I am trying to implement something quite simple, in my eyes. But it does not
work at all ... . Basically, I create a modelformset_factory with a model of
mine, and pass the instantiated modelformset to my template to render. And I
get the message *Caught TypeError while rendering: 'LegF
):
>topic = form.clean_data['topic']
>
> Now if you wanted to overide the topic, you could instead have:
> topic = 'my custom text'
>
>
> Hope this is clearer!
>
> Derek
>
> On Dec 29, 4:07 pm, Axel Bock wrote:
> > hi
he form POST and data
> "clean" (see:
> http://docs.djangoproject.com/en/dev/topics/forms/?from=olddocs#processing-the-data-from-a-form
> )
>
> HTH
> Derek
>
> On Dec 28, 10:21 pm, Axel Bock wrote:
> > Hi all,
> >
> > I have this little problem. In my little webapp I
Hi all,
I have this little problem. In my little webapp I have a data model which
defines several required fields. Depending on WHO is logged on, some of
these fields should not be changed by the user and be pre-filled (or better:
post-filled) by the application.
Currently I delete the fields out
Hello again,
after some trying and not coming to a successful end I might need a hint or
two with the following construction.
Assume a pilots flight log: Each flight can have several legs, and a
purpose. So basically the model looks like this:
Mission:
Pilot
Purpose
...
Leg:
Mis
I gotta say this is the kind of answer which usually upsets me for obvious
reasons, although I gotta admit the question surely is not very well
phrased, too :)
But well. I just discovered dajaxproject.com from another thread - maybe you
could start from there. It seems to be a framework which coup
maybe I was a little bit out of sleep today :) . tried to get auth.User
subclassing working til 4am in the morning ... and what do you mean with
"not picky enough"?
2010/9/24 Steve Holden
> On 9/24/2010 2:23 PM, Axel Bock wrote:
> > Anything wrong here? I must say, th
oh f...
thanks.
2010/9/24 Scott Gould
>
> > def logout(request):
> > logout(request)
>
> Infinite loop, no?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To u
2010/9/24 Jason
>
> "Creating the relationship between User and UserInfo has some
> implications I'd like to avoid on a model-level"
>
> Specifically what are you referring to here? Because anytime you
> subclass in Django you are basically doing the exact thing in the
> database behind the scene
HI all,
another problem here: On my system (MacBook Pro, OS X newest version) Python
"unexpectedly" quits when I invoke localhost:8000/logout.
The code for that looks like this:
#urls.py:
urlpatterns += patterns('webflog.flightlog',
#
(r'^logout/', 'views.logout'),
)
#
Thanks a lot for your answers.
I thought subclassing users is a nice idea, cause a Student IS a user, with
a few extended attributes. I decided to subclass users, because ...
* when adding a UserInfo -> user relationship (class UserInfo(Model): user =
ForeignKey('User')), ALL users having a useri
Hello all,
I must admit - I am going crazy. With something I thought should be
incredibly simple, but maybe I am just too f**king stupid.
All right, here comes my problem. I have subclassed "User" as "Student" and
added some required fields, one of them being "Course":
# models.py
class Student(
wow, thanks a alot guys for those efforts. indeed, that explanation is
better than the original docs :) .
I get it now, I changed it, and I guess the data model (v1.0 ...) is
sufficient for the first test run.
it's nice btw to get such a good support here in the forums! this is not
granted at all.
thanks for all the explanations! i had a look into the database tables - and
they do just what i expected. so I just leave it at changing the referal
property names ...
thanks & greetings,
Axel.
2010/9/18 bruno desthuilliers
> On 18 sep, 16:23, Axel Bock wrote:
> > 20
2010/9/18 bruno desthuilliers
>
> On 18 sep, 08:26, Axel Bock wrote:
> > Now I get an error when compiling this.
>
> s/compiling/importing/
>
yah, all right :) .
> > Any help here? I'm quite new to dango, so a little hint would be
> > nice :)
>
Hello,
I am currently experimenting with a little webapp, and I have the
following problem. I want to assign two properties of the same type to
a class. (Stupid) Example: I have a meal, and it comes with two sides.
The sides itself are another database key - they can change on a
whim :) . It looks
36 matches
Mail list logo