If I am not mistaken, the same way that you would construct a SQL query
like
SELECT * FROM table1 t1
INNER JOIN table2 t2 ON t2.t1_id = t1.id
INNER JOIN table3 t3 on t2.t3_id = t3.id
WHERE t3.id = '1'
AND t3.id = '2'
AND t3.id = '3'
AND t3.id = '4'
AND t3.id = '5'
(many AND t3.id = 'X')
you wi
Para centos debes seguir los mismos pasos que en cualquier otro lugar.
Apache con fastcgi, o con wcgi, o nginx, o lighttpd, o cherokee... tu
mismo. Hay guias por todos lados. Solo debes tener en cuenta que
dependiendo del servidor que escojas, tu eres responsable de rearrancar las
instancias de
You can create pseudo fields in the admin
class CarAdmin(admin.ModelAdmin)
list_display = ('name','custom_field')
def custom_field(srlf, obj):
return mark_safe('http://www.google.com";>Link')
custom_field.short_description = 'Link to Google'
custom_field.allow_tags = True
You have to make sure that the javascript code that populates the second
select box sets the value properly, or create a custom form validation
(custom form/field clean methods).
On Tuesday, May 8, 2012 5:59:19 AM UTC+2, HDayi wrote:
>
> hi people,
> i am new to all of this.
> i have a form wh
Json and difflib won't work well together, unless you make a diff per
field, which will add overhead. Look at
http://stackoverflow.com/questions/4599456/textually-diffing-json
Reverting is returning to a previous state. Just run all diffs from the
first commit until you reach the desired state.
Wednesday, May 9, 2012 11:37:10 PM UTC+4, francescortiz wrote:
>>
>> Json and difflib won't work well together, unless you make a diff per
>> field, which will add overhead. Look at
>> http://stackoverflow.com/questions/4599456/textually-diffing-json
>>
>>
I use django europe, cheap shared hosting with a good setup with lighttpd
by default, but you can set up any server you want compiling it.
On Monday, April 2, 2012 12:48:24 PM UTC+2, fix3d wrote:
>
> Where do you host your django app and how to you deploy it?!
>
> Please share personal exp.
--
Implementing a simple global chat is pretty straightforward:
1- Don't use database
2- Implement filesystem based locking (multithread safe)
3- if there user wrote a new line, acquire lock and append the new line to
the file.
4- releaase lock
5- send the last lines to the users. I recommend you to
You need to be more specific, because the code you have already seems to do
what you ask. What is your problem?
On Monday, May 21, 2012 5:51:21 AM UTC+2, Aditya Sriram M wrote:
>
> Help please! :-|
>
> On Saturday, 19 May 2012 18:31:05 UTC+5:30, Aditya Sriram M wrote:
>>
>> I have a function like
This link could help:
http://lmgtfy.com/?q=python+parse+xml
On Saturday, May 26, 2012 4:24:29 PM UTC+2, Benjamin Carlson wrote:
>
> I'm new to django, and am trying to write a web service.
>
> The request will have xml in the body. How can I parse that into
> elementtree root node?
>
> Thanks i
a search for
python write file
migh help
On Monday, May 28, 2012 9:51:59 AM UTC+2, Madhu wrote:
>
> Hi! all
> I create client & through client i call the web service.
> which returns pdf file, i want to stored that file directly.
> I use this
> response['Content-Disposition'] = 'attachment; file
You could create a bug report:
https://code.djangoproject.com/newticket
On Tuesday, June 12, 2012 4:59:08 PM UTC+2, Greg Donald wrote:
>
> Over the weekend I upgraded my project to Django 1.4. After the
> upgrade my Apache/mod_wsgi setup began running out of memory. I
> increased the memory c
By your comment it seems that your question is more about browser
capabilities than django. If this is the case, check HTML5 to see what
can be used for drag and drop, like files in gmail.
On Aug 24, 7:22 pm, glenn hafstrom wrote:
> Hi Reinout
>
> Thanks for your input.
> I've googled a lot but I
You will have to create a connection pool as a resident thread.
Briefly, a connection pool will take care of:
- Create a new connection if there is no connection available.
- Reuse a connection if possible.
- Remove connections that are no longer being used or that commanded
to close.
Then, your c
I wrote a thumbnailing app myself:
https://github.com/francescortiz/image
The main advantages of this are:
- You set the center of attention for images through the admin
section. This way, when you crop your image it looks properly aligned,
whatever crop you do. This is the reason why I created
I've been looking around for django commerce sollutions for a while
and they all seem to work with predefined database models. For
instance, you always have a name field and a slug field that come with
the product. While this could seem fine if you are creating a store
form scratch, it makes it ver
I always create multilingual sites. What I do is inspired by django-
modeltranslation, but I find awkward that it leaves a "default"
language field and I prefer to have all my fields defined inside my
models.
1. Create a field for each language and a function that returns the
field corresponding t
If you are sending a 2mb json on every action and there are only about
40 nutrients per food, either I am missing a point or something is
really wrong about your logic.
On Dec 3 2011, 12:34 pm, mf wrote:
> I'm building an application and I'm having trouble making a choice
> about how is the best
Why are you using two thumbnail providers?
On Dec 26 2011, 3:01 pm, CareerDhaba tech
wrote:
> Hey everyone,
>
> I am running into an issue where two third party apps easy_thumbnail and
> sorl_thumbnail are using the custom template tag called thumbnail. Hence, I
> am actually unable to use the ta
Appart of using relative paths when I want to use STATIC_URL in
javascript I define a global javascript variable in my base.html
template, so it is available in my javascript files.
window.STATIC_URL = '{{STATIC_URL}}';
On Jan 3, 4:38 am, Andres Reyes wrote:
> If you're serving your media from
http://stackoverflow.com/questions/1123200/how-to-lock-a-critical-section-in-django
On Jan 3, 7:28 pm, Pawel Rzeczewski wrote:
> It won't work in forked processes.
>
>
>
>
>
>
>
> > Tried Google.
> >http://effbot.org/zone/thread-synchronization.htm
--
You received this message because you are s
Also, don't forget about the magic functions provided by django:
smart_unicode and smart_str
On Jan 5, 2:27 pm, Karen Tracey wrote:
> On Thu, Jan 5, 2012 at 8:16 AM, César Frias wrote:
> > I guess you have some files without the # -*- coding: utf-8 -*- on the top
> > of the file
>
> > You will n
The only case in which you can have issues with double brackets is
when a '{{' appears in the same line and before than a '}}'.
On Jan 4, 10:18 pm, Bill Freeman wrote:
> Good point. But you can run into double braces in JS.
>
>
>
>
>
>
>
> On Tue, Jan 3, 2012 at 3:29 PM, Christophe Pettus wrote
you can try https://github.com/francescortiz/image
On 6 ene, 12:35, MeME wrote:
> Hello,
>
> I'm new to Django. I started to write something for personal
> purposes.
> I have doubts about writing model for media files, especially images.
> In my app thumbnails should b
For example, in urls.py:
('^entry/?P(.*)/', 'entry'),
and in your models you have an slug field
On Jan 7, 1:13 am, Lie Ryan wrote:
> On 01/07/2012 11:04 AM, Barış Bilgiç wrote:
>
> > Hi,
>
> > I am looking for how to implement URL rewrite in Django which is
> > explained inhttp://en.wikipedia.o
You can place the static files in the public html directory via
symlink if allowed or copying them, and have rewrite rules that
redirect to your django fcgi instance only in case a a file doesn't
exist.
On Jan 14, 8:06 am, Tundebabzy wrote:
> I am stuck after running collectstatic. I don't know h
I would pass bound data instead of calling from_request:
https://docs.djangoproject.com/en/dev/ref/forms/api/#ref-forms-api-bound-unbound
This way you don't have to worry about forms logic, but just about
filling the default data.
Francesc
On Jan 18, 8:42 pm, Jeff Heard wrote:
> My basic proble
of attention, heads
won't get cut anymore.
Link:
https://github.com/francescortiz/image
I am thinking of calling it "django-headcut"
Thank you,
Francesc
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to
ve me, this won't be the
> > first or last time a race condition screws you over :)
>
> > I see you are also using os.system(cmd), I would recommend looking into
> > using popen instead.
>
> > It might also be worth revisiting the code in a few days/week
you could try something like
{% with x.message|regtest as value %}
{% include "messages/"|add:value|add:".html" %}
{% endwith %}
On 15 Juny, 05:04, Greg Corradini wrote:
> Hello All,
>
> I'm try to get away from doing if/else in a template:
>
> {% if x.message|regtest == "True" %}
> do some
Faheem,
In your post you write:
"This works, but I traced through the code, and found that the code
was using streaming, when clearly the optimal thing to do in this case
would be to just copy the file from the temporary location to the
permanent location"
In java copying files is performed by r
Well, I run the test:
code used:
http://pastebin.com/9FNT82ym
results (second result is stream copy):
$ python2 cp.py
8.55721712112
5.28589200974
$ python2 cp.py
8.5057990551
6.55976104736
$ python2 cp.py
6.88285589218
8.86908006668
$ python2 cp.py
5.8047721386
8.57982397079
$ python2 cp.py
Try doing this in your models.py:
def get_profile(self):
...your code to get the profile for a the user...
User.get_profile = get_profile
On Jun 20, 9:54 am, gontran wrote:
> Hello evreybody,
>
> I wonder how to deal with many user profiles.
> I need to store different informations depend
I don't want to be rude, but your question is so bague that I think
that you should start by reading some python and django books/
documentation.
On Jul 6, 11:44 am, Gour-Gadadhara Dasa wrote:
> Hello!
>
> I'm starting with Django trying to migrate all my sites from PHP apps to
> Django
> apps..
¿Why cropping on upload when you can let the system keep the center of
attention centered?
https://github.com/francescortiz/image
On Jul 29, 10:50 am, jaspreet kaur wrote:
> I want to add crop option in Django application
> i followed the link:http://code.activestate.com/pypm/django
LESS combines CSS and javascript which I think that goes beyond the
safe line, so I vote for SCSS ( http://sass-lang.com/ ) that also has
a python version ( http://github.com/Kronuz/pyScss ).
LESS is based on an "older" version of SCSS that didn't follow CSS
syntax (SASS).
On Aug 3, 1:52 pm, Tom
;
> On 08/03/2011 08:21 AM, francescortiz wrote:
>
> > LESS combines CSS and javascript which I think that goes beyond the
>
> What does it mean? Care to give an example? Like textually combining
> both languages? Or does it produces both JavaScript and CSS files?
>
> La
The FAQ section is awesome!
On Aug 5, 5:51 pm, rei wrote:
> I accidentally PHP support for the Django template language.
>
> No support yet for cookies, headers or event GET / POST, but otherwise
> functional. See the source code for usage examples.
>
> Link:http://animuchan.net/django_php/
--
Hi,
I have dedicated server sites and django hosting sites. Personally, I
prefer that someone else takes care of the server and focus myself on
development. So, unless you need to use a lot of resources for some
reason, dedicated django hostings are ok to me.
About google apps, I never used it.
You can have a look to the as_p method of django Form class and create
your own renderer based on that.
On Aug 9, 4:09 pm, Hayyan Rafiq wrote:
> Could you please give an example.. say of a simple input box
> in html its done like
>
>
> How would i replace the default input box with the one from
What part are you missing? How to write the django template, how to
access the data or the what is the related HTML?
On Aug 8, 9:43 pm, Hayyan Rafiq wrote:
> Hi i wanted to know is there a way through which i could use a tree control
> in my template
> I wanted to add something like
>
> Stude
The django documentation about ModelAdmin.save_model seems to be what
you look for. The example they give does almost what you want:
https://docs.djangoproject.com/en/dev/ref/contrib/admin/#django.contrib.admin.ModelAdmin.save_model
On Aug 8, 11:32 pm, galgal wrote:
> I need to override save met
Looks really good. Thank you.
On Aug 13, 6:06 am, Stephen McDonald wrote:
> Hi all,
>
> Our Django Dash entryhttp://drawnby.jupo.orgmade extensive use of
> Socket.IO (cross-browser websockets) and born out of that I've created a new
> django-socketio package which is now available:
>
> Github:htt
43 matches
Mail list logo