I'd recommend you use all the power of your webserver for this (apache
or nginx or whatever). There should be no specific modifications on
the django site if you do it right.
I think this gui has the fix for what you asked tho:
http://hotsyk.com/blog/2008/11/05/https-django-and-wsgi/
On Thu, Mar
If you don't need any spatial related queries (although django people
uses something like that) you don't really need a spatial database.
You can store geographic coordinates in either FloatFields or
CharFields. Your question is more related to GoogleMaps API than django.
I'm assuming you
I'm using svn trunk version of django (rev. #11263). In my project I
have only one admin site registered in the urlconf. This admin site is
a subcalss of django.contrib.admin.sites.AdminSite and is instantiated
with the name 'admin'. I'm trying to use reverse url lookups for the
admin site as desc
is just an admin site for a larger project done in Java/Flex.
Thanks.
On Fri, Jul 17, 2009 at 4:46 PM, Michael wrote:
> On Fri, Jul 17, 2009 at 10:28 AM, Vasil Vangelovski
> wrote:
>>
>> I'm using svn trunk version of django (rev. #11263). In my project I
>> have only o
osed to give me the url for it's index page?
On Fri, Jul 17, 2009 at 9:48 PM, Vasil
Vangelovski wrote:
> Yes it does work, I've tried this with a brand new project in the same
> virtualenv. Reverese resolution of urls for the AdminSite in
> django.contrib.admin does work with t
Yeah, I was confused mostly about the stuff with the colon because I
didn't pay much attention when reading about namespaced urls the new
docs.
Thanks
On Fri, Jul 17, 2009 at 10:49 PM, Michael wrote:
> On Fri, Jul 17, 2009 at 4:27 PM, Vasil Vangelovski
> wrote:
>>
>> So
Looking at the code for the ModelAdmin class in
django.contrib.admin.options I've come accross this:
context_instance = template.RequestContext(request,
current_app=self.admin_site.name)
in a few places. What is this current_app argument?
When I try to init a RequestContext with the current_app ar
I've posted a question about this a few days ago and I thought I was
confused about something, but it was probably some problem with the
django revision at the time or I'm even more confused now. So... I
have an application called epg with a model named Show and I want to
provide a link for editin
Thanx
It was just my luck reading about this new feature in the URL
dispatcher and trying to use it in my project moments before it was
added to trunk :)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users
A good place to start is the tutorial:
http://docs.djangoproject.com/en/dev/intro/tutorial01/
If you are new to python you can also check dive into python:
http://diveintopython.org/
On Wed, Jul 22, 2009 at 10:52 AM, sudharsan s wrote:
>
> Hi i am new to django . i have interest towrds program
What exactly do you mean by "ajax-based generic views"? Most often
you'd return a JSON response to an xhr request so instead of passing a
dict as a context object to render_to_response you'd return an HTTP
response with the dict serialized as JSON. Follow any guidelines for
making views generic, b
You can certainly run django 1.0.2 in apache tomcat, jetty etc. See these:
http://docs.djangoproject.com/en/dev/howto/jython/
http://code.google.com/p/django-jython/
It's a bit slower though (will fool anyone that it's a Java web app).
On Wed, Jul 22, 2009 at 11:58 PM, slypete wrote:
>
> Hi e
I don't think it really matters if one or more processes/threads try
to access it, when it get's locked EXCLUSIVE for writing only one will
have access to it until the lock gets released. For a very low volume
site with very few INSERT/UPDATE/DELETE queries you may not experience
any difference bu
See this:
http://docs.djangoproject.com/en/dev/topics/http/urls/#defining-url-namespaces
On Mon, Jul 27, 2009 at 12:13 AM, Vitaly Babiy wrote:
> How does one go about registering a namespace?
> I can't seem to find it in the docs.
> Thanks,
> Vitaly Babiy
>
> >
>
--~--~-~--~~---
First you create a ModelForm:
from django.forms import ModelForm
from myproject.myapp.models import MyModelClass
class MyFormClass(ModelForm):
class Meta:
model = MyModelClass
there you have your form_class that you need to pass to the view you want:
‘django.views.generic.create_update.update_
> oh by the way,
> i've tried your method and i received the error:
>
> 'NoneType' object is not callable
>
> May i know how do i solve this issue?
>
> Best Regards,
> Eugene
>
> On Jul 27, 12:15 pm, Vasil Vangelovski wrote:
>
>> First
Are you emailing just the rtf document you generate or sending the
contents in the email body as well?
The problem might be that the content encoding of the rtf or email
message is not set properly.
cootetom wrote:
> Hello,
>
> I'm having some trouble with strange characters that come from MS
There's not much benefit in using an IDE like eclipse or netbeans for
Python and JS, they are also slow enough to counter productivity. I'd
rather waste those CPU cycles for playing random noises in the
background.
--~--~-~--~~~---~--~~
You received this message be
> The way I do it is what you allude to at the end, have a special class
> on the inputs and then use the inner Media class of the widget
> (http://docs.djangoproject.com/en/dev/topics/forms/media/) to provide
> a javascript file that'll automatically add the widget to all of the
> items with that
Is it possible to define custom validation for the form in the admin
change list when using ModelAdmin.list_editable?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send
What exactly do you need to do? Please be more specific.
On Wed, Jul 29, 2009 at 11:39 PM, Asinox wrote:
>
> Hi guys, i cant find a example about how ill save data in two or more
> tables... somebody help me please
>
> Thanks
> >
>
--~--~-~--~~~---~--~~
You recei
That works, thanx.
On Thu, Jul 30, 2009 at 12:07 AM, Alex Gaynor wrote:
>
> On Wed, Jul 29, 2009 at 5:05 PM, Vasil
> Vangelovski wrote:
>>
>> Is it possible to define custom validation for the form in the admin
>> change list when using ModelAdmin.list_e
Of course that the files specified in the class Media are accessed via
GET. How else would they be accessed? It's possible to fetch a js file
with additional get arguments and access those values from the js. So
you can pass prePopulateString as a get parameter to the js file in
class Media for ex
There's a package of PostgreSQL called postgresplus that comes with
postgis, pgadmin etc. It's pretty easy to set up on os x:
http://www.enterprisedb.com/products/postgres_plus/overview.do
Installing psycopg2 after I've installed postgresplus has always
worked for me with minimum effort, see this:
I've used orbited with success for this purpose:
http://www.orbited.org/
But getting started integrating it with your django project is not
very straightforward.
On Thu, Jul 30, 2009 at 11:52 AM, aleph wrote:
>
> Hi!
>
> Is it possible to use Django with longpoll technique? What I mean is a
> cl
cess
> to xyz from the .js script itself. Sorry if this is a dumb question -
> I've written various bits of javascript/jquery but haven't encountered
> this.
>
> Margie
>
>
>
> On Jul 29, 5:51 pm, Vasil Vangelovski wrote:
>> Of course that the files specifie
You can get the model class for the modeladmin, it's the model property. So
modeladmin.model will give you the model class. You can just do a
check of equality
modeladmin.model == OurModel.
On Thu, Jul 30, 2009 at 1:22 PM, selcukcihan wrote:
>
> Hi, i have django 1.1
>
> I have a user profile mod
I'm making a very small project that will use the apps/models from a
larger one. This will be hosted on a separate domain. Now the larger
project uses the models from django.contrib.auth, but I don't need and
don't want to store users in a database for this smaller one. I'll just
provide my ow
rib.auth).
>
> To fully answer your question, we would need to know what apps it is using.
>
> Luke
> luke.seelenbin...@gmail.com
>
> "I [may] disapprove of what you say, but I will defend to the death your
> right to say it." -- Voltaire
>
>
> Vasil Vangelovs
what the apps you are using. If none of the apps
>> depend on django.contrib.auth, you won't need it, unless you want to use
>> the django admin (which depends on django.contrib.auth).
>>
>> To fully answer your question, we would need to know what apps it is using.
>
You can unregister the User model and default UserAdmin from the admin
site, then register it again but after changing form and add_form of
UserAdmin with you custom form classes. Looking at the code for
django.contrib.auth.admin will probably make things clearer for you:
http://code.djangopr
From that bash interaction I can assume you are running os x.
The absolutely easiest way to install postgresql and psycopg2 on os x is
with postgresplus.
These links may help if you decide to go down that path:
http://www.enterprisedb.com/products/postgres_plus/overview.do
http://blog.jonypawk
Having this line of code:
User._meta.get_field('is_staff').default = True
in the models.py for one of my apps works without problems.
I wonder if it's possible to make email unique and first_name,last_name
unique_together by using this technique.
This:
User._meta.get_field('email').unique = Tr
Thanks Alex, that worked.
Alex Koshelev wrote:
> Hi, Vasil!
>
> `Field.unique` is the read only property. If you want to set
> uniqueness you have to assign field's `_unique` attribute to True.
>
> ---
> Alex Koshelev
>
>
> On Wed, Aug 5, 2009 at 12:54 AM, Va
If you are writing your code in python 2.6 it will be easy to port it to
python 3 later. The backwards incompatible changes introduced in python
3 are not a good reason not to write you web application with django.
snfctech wrote:
> Hello.
>
> We are researching technologies to begin what may b
Lets say I have one form which inherits from ModelForm and a second
one that inherits from the first one. What I want to do is add 2
fields in the second form, the fields are bound to the properties of
the model. Which would be the best way to do this?
Example:
the model has fields: name, conten
That website is built using django which is a web framework built in
python. If you want info on how to build a website using django
consult the django tutorial:
http://docs.djangoproject.com/en/dev/intro/tutorial01/ and the docs:
http://docs.djangoproject.com/en/dev/contents/,
If you want to build
Is there a way to run unit tests in such a way that email will be sent
via the SMTP email backend when there's a call to send_mail in the
unit test?
--
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..
Yes, I'm using trunk (1.2).
Thanks Russell, that helped.
On Fri, Apr 23, 2010 at 1:59 PM, Russell Keith-Magee
wrote:
> On Fri, Apr 23, 2010 at 6:27 PM, Vasil Vangelovski
> wrote:
>> Is there a way to run unit tests in such a way that email will be sent
>> via the SMTP ema
Have a look into LFC (lightning fast CMS) http://demo.django-lfc.com/,
seems to be pretty flexible.
On Wed, May 5, 2010 at 9:52 PM, Jonatan.mv wrote:
> What would be you recommended CMS?. Could you please give some reasons
> (pro and cons)?.
>
> I'm investigating on these:
>
> - PyLucid v0.8.x st
Hi
I'm trying to build the CSS class attributes for all the widgets in my
ModelForm dynamically in the form's __init__ method. This seems to
work for and input widgets, but doesn't work if the
is for a foreign key field. From what I can see the BaseModelAdmin
replaces widgets for foreign keys di
I have a form class, call it MyBaseForm which defines some media as a
dynamic property (by providing a media property, not defining a Media
class). Then I have MyForm which inherits from MyBaseForm and
overrides some widgets on it's fields, these widgets have their own
media definitions. The proble
I'm developing an intranet application where one of the requested
features is having a detailed log containing entries of IP, user and
timestamp every time someone has logged in successfully. Also as a
bonus feature I'd like to implement a log of failed login attempts.
What would be the cleanest ap
Using the alias directive is much more easier and straighforward, for
me at least. Here's an example configuration
upstream django-backend
{
server testsite.local:4080;
}
server {
listen 80;
server_name testsite.com;
location /{
proxy_re
Hi
I have around 30 models inheriting from one abstract model class and
the number may grow (there's a specific reason for this design
decision, involving making the database easy for people to make
reports from the data with other tools, namely ms access, and making
it easier to make changes to s
You can achieve this without django at all. By defining rewrite rules
on your web server. But why don't you make your own view/template on
the url you want that will play the desired video? You can use the
HTML file generated by camtasia for a reference on how to write the
template.
On Sat, Jun 5,
It's possible if both of your applications are under the same domain.
see the SESSION_COOKIE_* settings variables
http://docs.djangoproject.com/en/dev/ref/settings/#session-cookie-age
You can then find the current user by the sessionid from the django_* tables.
On Sat, Jun 5, 2010 at 1:40 PM, na
set
SESSION_COOKIE_DOMAIN=".mychatapp.com"
this will make the django cookie valid both for www.mychat.com and
chat.mychat.com
On Sat, Jun 5, 2010 at 2:34 PM, nameless wrote:
> If the chat is in a subdomain ?
>
>
>
> ----
>
> On Jun 5, 2:05 pm, Vasil Vange
It seems that your application is trying to render a template that
doesn't exist.
And why are you using mod_python anyway?
On Sat, Jun 5, 2010 at 5:49 PM, Jagdeep Singh Malhi
wrote:
>
> MOD_PYTHON ERROR
>
> ProcessId: 3219
> Interpreter: '127.0.1.1'
>
> ServerName: '127.0.1.1'
> Docu
d ( from Django and
> PHP )
> also throught a cookie.
> In your opinion what is the best way ?
>
> Thanks ^_^
>
> -
>
> On Jun 5, 4:01 pm, Vasil Vangelovski wrote:
>> set
>>
>> SESSION_COOKIE_DOMAIN=".mychatapp.com"
>>
>&
See haystack http://haystacksearch.org/
On Sun, Jun 6, 2010 at 9:10 AM, Odagi wrote:
> Hello users,
>
> I'd like to implement searches like google (i.e., resolve typos or
> similar words). For example, if I'm looking for the word 'manatan' the
> search engine should match similar words like:
>
>
I'm rendering a template with a management command (something I need
for producing documentation in my native language). So I've no request
object, so no RequestContext. Is there a way I can force the template
rendering process to lookup translation strings from a particular
language other than Eng
Thanks for the help.
On Thu, Jun 10, 2010 at 12:49 PM, Tom Evans wrote:
> On Thu, Jun 10, 2010 at 11:39 AM, Vasil Vangelovski
> wrote:
>> I'm rendering a template with a management command (something I need
>> for producing documentation in my native language). So I'
To use custom SQL see this for reference:
http://docs.djangoproject.com/en/dev/topics/db/sql/
To create a templatetag see this for reference:
http://docs.djangoproject.com/en/dev/howto/custom-template-tags/
On Mon, Jun 14, 2010 at 10:08 PM, Cole743 wrote:
> Hello again,
>
> My last question
Not really. Giving them a different secret key won't make much
difference. Just make sure your site id is the same.
On Thu, Jun 17, 2010 at 11:22 AM, Aljosa Mohorovic
wrote:
> if i have a project with domain example.com and it's deployed as 3
> wsgi apps:
> - www.example.com
> - admin.example.com
You can use your own template for flatpages, see
http://docs.djangoproject.com/en/dev/ref/contrib/flatpages/?from=olddocs#flatpage-templates
Just make that menu a separate template and include it wherever you want. Of
course your flatpages template and your other templates can inherit from the
same
Is that NAS with an ARM processor? It might be caused by a bug in python
2.5:
http://bugs.python.org/issue1762561
On Sat, Sep 11, 2010 at 11:26 PM, S66 wrote:
> hi there,
>
> i tried to get the current version of django working on my NAS, but
> when i run
> python setup.py install
> i get this
> Mainly, I just don't think you're subclassing User for the right
> reasons. In fact, I can't really think of anytime I would subclass
> it. Usually adding a related table is a better way to go (lookup
> django user profiles for example).
>
There are times when the builtin User model is not eno
There's a bug in PyAMF: http://dev.pyamf.org/ticket/694
On Mon, Feb 8, 2010 at 5:54 PM, WC wrote:
> Hi Everyone,
>
> I have a ForeignKey field that is always null on the Flex client. I
> have tried using select_related(), but it's still null. Any idea what
> I am doing wrong? In the following
You can override the template for a specific app by first copying it
to a template folder respectful to that app
See this:
http://docs.djangoproject.com/en/dev/ref/contrib/admin/#overriding-admin-templates
On Mon, Feb 8, 2010 at 8:16 AM, djangonoob wrote:
> Hi all.
>
> If someone could please h
I've looked at it a couple of months ago. There are some great ideas behind it.
Web2Py cons:
1. The first and biggest issue at the time was that there was no
sufficient/accessible documentation available for free. The book was
only available on scribd for free which is horrible. Now the book is
av
Write a management command that downloads the CSV from email and loads
it in your database. Set up a cron job that calls the management
command. This is how I would do it.
There may be some unnecessary complication with that approach, like
figuring out which emails contain the CSVs of interest etc
Either use model inheritance or one by one relationships with the Site model.
The other solution which doesnt require changing django's code
would be monkeypatching (changing the class in runtime from the models.py
file of one of your apps), not a great idea.
On Sun, Mar 21, 2010 at 4:43 AM, ej
Well, the error message is pretty concise, a connection to the
database server can't be opened. See if you can connect to the same
database from the same machine with another client (for example
Management Studio Express) to check if all the parameters in your
connection string are correct.
On Mon
It's a deprecation warning. It means that some code in
facebook.djangofb uses some part of the standard library that will be
gone from future releases of python (for example python 2.7). Since
it's not in your code but in some package you are using, it's the
responsibility of the maintainers of tha
I've nothing but positive impressions from Slicehost so far.
- All their VPS plans (slices) work pretty fast and each is mostly
limited by the amount of memory you need and are prepared to pay for.
- Resizing a slice (changing a plan) is painless and fast.
- You are the master of your own slice, n
Can you be more precise about what part doesn't work? Did you include
the javascript translation catalog in you HTML template with a
One option is to use flash vars to pass your django app url to your flex SWF
on initialization in your HTML page.
That way you don't have to rebuild your SWF for different environments.
And you may use a django template to render the html that embeds your swf so
you can change the
url conditionally
A reusable application is a package. To use it you need to put the
package name in INSTALLED_APPS and depending if it provides any models
do syncdb after that (for mailer you need that).
Usually there's detailed instructions on what you need to do to get up
and running with a reusable app. But an
It's a validation error for a DateTimeField
On 4/10/11 12:28 AM, ydjango wrote:
> I have a batch process which reads a text file and loads mysql DB
> tables. I see following error occasionally in log files. Finding it
> hard to trace but working on it.
> This app is on older Django 1.1.2. Has some
70 matches
Mail list logo