For my home purpose, currently I am running Windows XP.
I have everything ready. Django, Python are all good.
If I let the runserver (I am using the django-development server) to
be 127.0.0.1:8000 or 192.168.1.101:8000 they all worked.
Let say abc.no-ip.org is a FREE DNS service I use to access
of
> > accessing your dev server from elsewhere anyway, because you can't see
> > the debug messages.
>
> > On 6 June 2010 10:32, John Yeukhon Wong wrote:
> >> For my home purpose, currently I am running Windows XP.
>
> >> I have everything ready. D
, 1:19 am, Sam Lai wrote:
> Does it work from another machine on the same local network?
>
> This is definitely possible though; I've done it before.
>
> On 6 June 2010 14:35, John Yeukhon Wong wrote:
>
> > I just disabled the FW, but no luck with any trials.
>
>
Hi, I know most of you work on Linux, but I do need this to be done on
Windows for a very personal reason.
I mainly followed this tutorial here, except that I use mod_wsgi over
mod_python.
http://wiki.thinkhole.org/howto:django_on_windows
I had my python 2.7, apache, mod_wsgi and postreg all inst
rder deny,allow
Allow from all
3. I try to access to localhost/hello.wsgi but it's still giving me
the same blue django default page
Thank you for the help
On Aug 13, 10:01 pm, Graham Dumpleton
wrote:
> On Aug 14, 11:26 am, John Yeukhon Wong wrote:
>
>
>
> >
According to this post
http://www.rkblog.rk.edu.pl/w/p/mod_wsgi/
I used the similar approach, and had localhost/hello.py and worked.
But what about the WSCI way that you showed us in the video?
Thank you.
--
You received this message because you are subscribed to the Google Groups
"Django use
Hi, Graham
I looked at the error log and I fully understood the problem.
I spent an hour trying different ways to understand the whole thing.
Here is the result.
f:/public/testproject/apache/django.wsgi
//code begins here
import os, sys
sys.path.append("f:/public")
os.environ['DJANGO_SETTINGS_
I am running Debian Lenny, and I have 2.5.25 and 2.7 co-exists
Which one would I get for django?
Notice the last response from this link
http://stackoverflow.com/questions/142764/how-do-i-upgrade-python-2-5-2-to-python-2-6rc2-on-ubuntu-linux-8-04
This is the method that I used...
--
You receive
I have the book "The definitive Guide to DJango: Web Development Done
Right".
Both editions use mod_python, and not mod_wsgi.
I have the setup correctly.
The first program was display the current datetime
views.py
from django.http import HttpResponse
import datetime
def current_datetime(reques
Yeukhon Wong wrote:
> I have the book "The definitive Guide to DJango: Web Development Done
> Right".
> Both editions use mod_python, and not mod_wsgi.
>
> I have the setup correctly.
>
> The first program was display the current datetime
>
> views.py
>
> fr
I don't think this code is working properly
from django import forms
from django.contrib.auth.models import User
def clean_email(self):
email = self.cleaned_data['email']
try:
User.objects.get(email=email)
except User.DoesNotExist:
return email
raise forms.Validati
tExist:
return email
raise forms.ValidationError('This email address has been
registered with an existing user.')
/// code ends
On Aug 21, 10:05 pm, Steve Holden wrote:
> On 8/21/2010 7:23 PM, John Yeukhon Wong wrote:> I don't think this code is
> w
Hi, thank you for pointing out the problem!
Solved! Thank you!!
--
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 unsubscribe from this group, send email to
django-users+unsub
Hi, I am confused with this piece of code. This is a code responsible
for building a tag cloud. It lives in the views.py
The part I don't understand is
# Calculate tag, min and max counts.
min_count = max_count = tags[0].bookmarks.count()
I never had used this 3 assignments in Python bef
I want to understand something...
Let say I want to do a low-level registration handling myself, using
the User class that comes with Django.
I started an app called accounts in my project
So what should I put in model? Some examples would create an
additional file called forms.py to put the regi
I asked this somewhere else but it seems like the responder hasn't
reply the latest comment I made.
http://stackoverflow.com/questions/3951758/how-do-you-iterate-over-a-list-in-django/3951775#3951775
Nevertheless, I think I should be welcome to make one here.
Let's keep thing short.
Say I have a
I think for the link view function, I need to do something like this
instead. Sorry.
[--code--]
def link(request):
c = Context()
c['title'] = ['Home Page', 'Current Time', '10 hours later']
return render_to_response('time.html', c)
I asked this somewhere else but it seems like the responder hasn't
reply the latest comment I made.
http://stackoverflow.com/questions/3951758/how-do-you-iterate-over-a-...
Nevertheless, I think I should be welcome to make one here.
Let's keep thing short.
Say I have a very simple list to iterat
I have django 1.2.3.0 Final
In my setting, I have 'sqlite3' filled for the DATABASE_ENGINE.
I am able to work with the sqlite3 until I am told that I need to
access python manage.py dbshell
At first I got the error "sqlite3 is not recongized"
Then I read threads and I found that this can be s
Problem solved. SQLite will chop the path of the sqlite.db... so
instead moved to "C:\\sqlite.db" will solve the problem.
On Oct 22, 9:47 pm, John Yeukhon Wong wrote:
> I have django 1.2.3.0 Final
>
> In my setting, I have 'sqlite3' filled for the DATABASE_ENGINE.
This is part of my views
[[[code]]] from mysite.views
def site_root(request):
return HttpResponse("This is the site root")
def hello(request):
return HttpResponse("Hello World")
[[endcode]]
My URLConf
[[code]]
from django.conf.urls.defaults import *
urlpatterns = patterns('mysite.view
I am working on someone's legacy code. We do testings on virtual
machine (like virtulabox). The virtual machine image contains a
working version of our project, and under the directory we have this:
project
- media/
- site_media
- static
--
You received this message because you are su
# Absolute path to the directory that holds media.
# Example: "/home/media/media.lawrence.com/"
MEDIA_ROOT = os.path.join(PROJECT_ROOT, "site_media", "media")
# URL that handles the media served from MEDIA_ROOT. Make sure to use
a
# trailing slash if there is a path component (optional in other
ca
I am Cc this to testing-in-python mailing list. Hope this makes sense.
Suppose I have a function called "render_reverse" which takes two
arguments: function name, and args list, and it returns "reverse(f, *args)"
If I called render_reverse('happy_birthday', {'args': [username]}), I would
get th
3/4 down the page
http://www.djangobook.com/en/2.0/chapter08/
urlpatterns = patterns('', # ... (r'^somepage/$', views.method_splitter,
{'GET': views.some_page_get, 'POST': views.some_page_post}), # ... )
Is this a good practice at all? If I use the method splitter, my urls will
look ugly. Or s
protect your WSGI application from the outside world. If you don't
> have access to the server's configuration, well, then I'm sure the cloud
> service you deployed to is "safe enough".
>
> On Tuesday, 10 April 2012 18:21:15 UTC-5, John Yeukhon Wong wrote
Would this help?
http://stackoverflow.com/questions/3086637/how-should-i-validate-html-in-django-templates-during-the-development-process
I quite like the not-accepted-as-answer. Just go through your urls.
Essentially, you have two types of possible template errors:
1. human errors (missing a cl
Maybe pyjs?
Do the GUI part using Python (which renders into javascript), and you can
connect it using Django as your backend.
On Sunday, May 13, 2012 6:14:36 AM UTC-4, Eugene NGONTANG wrote:
>
> Hi!
>
> I'm a python developper, but new in django.
>
> I'm devolopping a multi clients-server appl
Django has list_editable. I need to edit is_active flag.
class MyUserAdminForm(ModelForm):
class Meta:
model = User
def clean_is_active(self):
# do something that validates your data
print ' I am here... '
print self.cleaned_data
print self
cla
I agree, but I think at the web server level is much better. Middlewares
can break if Django core changes a lot, and since they are third-party hack
code, so unless you are confident how to maintain it yourself, don't use
them. Apache, Nginx configurations are widely used so they are easier to
You run the development server right out of the box such as python
manage.py runserver
But for real deployment you don't use the development servers. It doesn't
support multiple requests. It will break. It's a toy, basically.
Watch some youtube videos on getting started with Django. Then look at
Just a quick question. Is is possible for you to manually setup this
without bothering cpanel?
I mean u should have access to CentOS (ssh into it) right?
Then the setup should be very easy if you have that. I will use Nginx +
gunicorn if you really have that option. I want to make sure you do wi
While it has been asked a trillion times already, let me say TRY UT
YOURSELF. Sometimes even doing on console such as vim is not bad.
However if you are working on a huge project an IDE can help you.
Pycharm is very good. The problem is still very new but its
development. Maturity is outstanding.
http://docs.djangoproject.com/en/dev/topics/generic-views/#adding-extra-context
I am confused by the model scenario.
"For example, think of showing a list of all the books on each
publisher detail page. The object_detail generic view provides the
publisher to the context, but it seems there's no w
In forms,py, we can simple do this
e_mail = forms.EmailField(label='Your e-mail address')
this will work and be use if we use {{ form.as_table}} for example.
But if we instead use our own customization, because it's too
restricted to use the auto form render, when it comes to labels, we
have to
Suppose we have a django page using
django.views.generic.date_based.object_detail (or even archive_index..
actually doesn't really matter...)
In the model class I saved the datetime.datetime.now which suppose to
include the day, month, year, and time.
But I have no idea how to access the time par
OHHH this is really impressive. I didn't really think of that.
Thanks! Now I have another concept loaded under my belt. Hhaha
THank!
On Feb 26, 12:18 am, Russell Keith-Magee
wrote:
> On Sat, Feb 26, 2011 at 1:09 PM, John Yeukhon Wong
>
> wrote:
> > Suppose we have
37 matches
Mail list logo