This is fixed in Django 1.8. See the fifth item in
https://docs.djangoproject.com/en/dev/releases/1.8/#models.
On Friday, March 27, 2015 at 5:38:15 PM UTC-4, Gergely Polonkai wrote:
>
> Hello,
>
> I’d like to execute the following code:
>
> Booking.objects.filter(start_ts__isnull = False,
Thanks for kind answers guys.
Best Regards
On Fri, Mar 27, 2015, 5:31 PM Simon Charette wrote:
> Hi Gabriel,
>
> One thing I dislike about how PHP/Rail deal with this is the fact they
> expose an easy way to shoot yourself in the foot.
>
> e.g. PHP
>
> Your code expects
Hello,
I’d like to execute the following code:
Booking.objects.filter(start_ts__isnull = False, end_ts__isnull =
False).extra(select = {'amount': "strftime('%s', end_ts) - strftime('%s',
start_ts)"})
However, in the shell, I get the following error:
Traceback (most recent call last): File "",
Hi Gabriel,
One thing I dislike about how PHP/Rail deal with this is the fact they
expose an easy way to shoot yourself in the foot.
e.g. PHP
Your code expects $_GET['foo'] to be an array() but the querystring is
missing the trailing "[]" (?foo=bar) and crash. This also open a door for
Hi Gabriel,
On 03/27/2015 02:10 PM, Gabriel Pugliese wrote:
> I perfectly understand what you are saying. It was very clear and
> informative, but do not agree with the design chosen here. Below is just
> an opinion and you do not have to agree with it:
That's good :-) I probably won't continue
There is a sense in which what you are describing, for the Django side, is
what a webserver, including one involving Django, ordinarily does.
The only requirement the web server makes (and some can get around it with
work) is that the data sent over the socket, at least from the client
Hi Carl,
I perfectly understand what you are saying. It was very clear and
informative, but do not agree with the design chosen here. Below is just an
opinion and you do not have to agree with it:
My buddies have given PHP and Rails examples, but there are other
frameworks from other
I'm trying to deploy a django application on ec2 using chef. I followed
blogs that got me to the point where the application(_python) cookbook has
setup a clone of the repo to shared-copy and the chef client invokes the
first command to syncdb. Then however a problem occurs that is easy to
Have you looked at the ‘socket’ python library ?
François
> On Mar 27, 2015, at 3:05 PM, bobdxcool wrote:
>
> I am new to TCP socket programming. I have a django based server
> communicating with a microcontroller. Now, I want to implement TCP based
> socket on the server
Hi Gabriel,
On 03/27/2015 01:34 PM, Gabriel Pugliese wrote:
> @Masklinn
> That input is from jQuery's default serializer. It sends the data with
> contentType 'application/x-www-form-urlencoded; charset=UTF-8'. I just
> need to pass a data parameter with my JS Object (JSON) and it does the
>
I am new to TCP socket programming. I have a django based server
communicating with a microcontroller. Now, I want to implement TCP based
socket on the server side in order to communicate with the TCP socket on the
microcontroller. Can anyone give me an idea on how to do this ? What
libraries
@Daniel, oh really that Rails is not Django? Haven't noticed on my years of
Python web development. Thanks!
@Masklinn
That input is from jQuery's default serializer. It sends the data with
contentType 'application/x-www-form-urlencoded; charset=UTF-8'. I just need
to pass a data parameter with
I am new to TCP socket programming. I have a django based server
communicating with a microcontroller. Now, I want to implement TCP based
socket on the server side in order to communicate with the TCP socket on
the microcontroller. Can anyone give me an idea on how to do this ? What
libraries
On Fri, Mar 27, 2015 at 10:30 AM, Thomas Güttler wrote:
> You have an instance method to render one row of a search result (a custom
> paginator).
>
> One column of this row displays a link. Some users are allowed to follow the
> link,
> some are not. You need to check the (row
Hey,
He doubled post. A thread already exists about this called:
"textarea showing image instead of code"
On 03/27/2015 03:54 PM, Filipe Ximenes wrote:
Can you send us the code of the view and the template of this form?
On Fri, Mar 27, 2015 at 3:27 AM,
Hmm this all sounds quite dirty :/
However if you absolutely want to have a global object, you could try
something like [1], although I don't recommend it at all. There are
some situations where your modelling needs request introspection, for
example row level auditing, but these are very
Am 27.03.2015 um 15:49 schrieb Cal Leeming:
There is a reason that state is passed around from method to method,
rather than being stored as a global, because this is the correct way
to do things.
Is a threadlocal global state part of the correct way, or is it "evil"?
However, it sounds
>From what I understand, using file based sessions will work with no
problems in production environment. But, you will have a problem in case
you need to horizontally scale (have multiple machines serving your app)
your system. In this situation, since files from one machine wont be able
to access
Have you checked if the html tags actually end up in the database?
If yes, then the problem is either in the view or in the template (like not
using the safe filter).
vineri, 27 martie 2015, 08:27:15 UTC+2, akash...@ranosys.com a scris:
>
> Hie to all,
> In one of my template i am using text
I am using Django 1.7, and I have read the documentation on
the SESSION_ENGINE setting. It is not clear to me what are the advantages
and disadvantages of using file-based sessions. Do file-based sessions have
better or worse performance than database-backed sessions? Are file-based
sessions
Just checking: when you say you are adding users using
Group.users.add(user)
in this case `Group` is an instance of the Group model and NOT the actual
model, correct?
if so, you can make a query using the same instance, looking for the user:
user = Group.user.filter(user).first()
if user:
Can you send us the code of the view and the template of this form?
On Fri, Mar 27, 2015 at 3:27 AM, wrote:
> Hie to all,
> In one of my template i am using text area. The issue is that when i write
> html tags with some image link using img tag, when i am saving this i
There is a reason that state is passed around from method to method,
rather than being stored as a global, because this is the correct way
to do things.
However, it sounds like the architectural design of your code is
flawed, as throwing around the request object indicates that you don't
have
Hi,
I have rather strange problem with already deployed application. I added
some new ACL rules which I need to write to the database, so I wanted to
call syncdb --all. However, using the command:
./manage.py syncdb
or
./manage.py syncdb --settings=intranet.settings.demo
I get this:
Other way is use sessions!
Django provide session midleware.
You can get the session dict out of the view!
Sorry my english, I am a Brazilian guy!
>
>
>
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop
Maybe a global state? Yes!
https://docs.djangoproject.com/en/1.7/topics/http/middleware/#init
I never did that, but you can try!
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from
Hi
I am setting up an admin user account to manage my Django app on
my local machine, but would it be possible for me to also give admin
access to external users using their own machines? My machine is
not part of a LAN/WAN, just standalone, but I am thinking that to enable
this I should provide
Hi everyone, i'm just started on django... and i have a problem :(. I
install django on windows (with Setuptools and PIP, according to the
documentation), create a new project, use migrate but throws me a mistake:
C:\Users\Kompressor\Documents\lalolando>python manage.py runserver 8080
What is db.TextProperty!? Is it Django?
Where the "result" variable comes from?
please read:
https://docs.djangoproject.com/en/1.7/ref/models/
On 03/27/2015 10:20 AM, Akash Patni wrote:
Hi This is my html
{% block content %}
src="/site_media/images/digital-assets-note-icon.png"
I don't understand how middlware or filter would help on those cases.
Why not only pass the variable where it's needed?
On Fri 27 Mar 2015 at 10:18 guettli wrote:
>
>
> Am Donnerstag, 26. März 2015 15:52:07 UTC+1 schrieb Anderson Resende:
>>
>> You can use middlewares!!! It is
If your clients are using different subdomains, like client1.webapp.com,
client2.webapp.com then you can have separate settings file per subdomain
and completely isolate the client data, but still use the same virtualenv
and codebase. You must also take care of the file upload/access because
Hi This is my html
{% block content %}
View Notes
See your notes details.
{% for i in result %}
Note Title
{{i.note_title}}
Note
*{{i.note}*
Beneficiaries
{% if all_nominees %}
{% for nominee in all_nominees %}
Am Donnerstag, 26. März 2015 15:52:07 UTC+1 schrieb Anderson Resende:
>
> You can use middlewares!!! It is a way...
>
>
>
I don't understand how middleware can help here.
The only way I see is that the middleware updates a global variable for the
data. In my case request.user.
Anderson, is
Thanks for the code paste.
You mean in your views, the formset.is_valid() returns False
and so does not delete your form tagged to delete?
I don't quite understand where exactly is the problem?
On 03/27/2015 12:17 AM, Neto wrote:
When I mark to delete the formset, django requires complete all
Hello,
You could provide us more information when asking for
help please. Your template and view code at least.
I guess your problem is in your HTML but to be sure, please
dump your information at the POST request to see what
is send. Then review your template. Maybe there's a "name"
attribute
I agree with Anderson, this is one solution, even
though I don't know if it's a good way.
For example a middleware is used to add the user to
the request. You could do the same with the request
to a singleton instance and get it back then from your
form, view etc.? But be aware that some
Hie to all,
In one of my template i am using text area. The issue is that when i write
html tags with some image link using img tag, when i am saving this i am
getting image on the desription field.
Actual-Image is comming
Expected-I want HTML code to be displayed in the discription.
Please
Hie to all,
In one of my template i am using text area. The issue is that when i write
html tags with some image link using img tag, when i am saving this i am
getting image on the desription field.
Actual-Image is comming
Expected-I want HTML code to be displayed in the discription.
Please
38 matches
Mail list logo