Re: django-admin.py startproject mysite

2011-04-29 Thread Yongning Liang
type this in Windows
python django-admin.py startproject mysite
if it doesn't work, make sure that both python and django-admin in you
system PATH

On Sat, Apr 30, 2011 at 5:38 AM, Daisy  wrote:

> Greetings all;
>
> I have a problem also with the "django-admin.py startproject mysite"
> command
>
> when i type it, it didn't create the directory mysite instead it opens
> the django-admin.py in a notepad++
>
> I don't know how to fix this?
> any ideas please.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Does django 1.3 has a ubuntu deb package released!

2011-04-29 Thread Yongning Liang
maybe there is no need to do this, you got python, and you can install
Django with simple python setup.py install

On Sat, Apr 30, 2011 at 10:29 AM, Korobase  wrote:

> Does django 1.3 has a ubuntu deb package released !
> I have googled but get none,Any one have done this?
> Thanks.
>
> --
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: django-admin.py startproject mysite

2011-04-30 Thread Yongning Liang
The path of django-admin.py is *YOUR_PYTHON_PATH*
\Lib\site-packages\django\bin
after this, you can just type django-admin.py startproject mysite to start a
project.
but make sure that your .py file default open by Python, if not,
right-click(Shift + right-click in XP) a .py file and select open with...,
choose Python, or remove file association in you Notepad++
On Sat, Apr 30, 2011 at 5:39 PM, Daisy  wrote:

> Thank you for your reply,
> Python is in my system PATH but How to add django-admin in my path. I
> mean what will be the enviroment variable for django-admin that i have
> to put in my system PATH?
>
> On Apr 30, 4:37 am, Yongning Liang  wrote:
> > type this in Windows
> > python django-admin.py startproject mysite
> > if it doesn't work, make sure that both python and django-admin in you
> > system PATH
> >
> >
> >
> >
> >
> >
> >
> > On Sat, Apr 30, 2011 at 5:38 AM, Daisy  wrote:
> > > Greetings all;
> >
> > > I have a problem also with the "django-admin.py startproject mysite"
> > > command
> >
> > > when i type it, it didn't create the directory mysite instead it opens
> > > the django-admin.py in a notepad++
> >
> > > I don't know how to fix this?
> > > any ideas please.
> >
> > > --
> > > You received this message because you are subscribed to the Google
> Groups
> > > "Django users" group.
> > > To post to this group, send email to django-users@googlegroups.com.
> > > To unsubscribe from this group, send email to
> > > django-users+unsubscr...@googlegroups.com.
> > > For more options, visit this group at
> > >http://groups.google.com/group/django-users?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: django-admin.py startproject mysite

2011-04-30 Thread Yongning Liang
if you tried the command django-admin.py startproject mysite and it output
the usage, it mean the PATH of Python and django-admin.py is correct, maybe
you type a wrong subcommand.
BTW, are you install Django with setuptools(python setup.py install)?

On Sat, Apr 30, 2011 at 10:16 PM, Daisy  wrote:

> I have just did what you said and  the result was (no project created)
> and the output was:
> 
>
>
> Usage: django-admin.py subcommand [options] [args]
>
> Options:
>  -v VERBOSITY, --verbosity=VERBOSITY
>Verbosity level; 0=minimal output, 1=normal
> output,
>2=all output
>  --settings=SETTINGS   The Python path to a settings module, e.g.
>"myproject.settings.main". If this isn't
> provided, the
>DJANGO_SETTINGS_MODULE environment variable
> will be
>used.
>  --pythonpath=PYTHONPATH
>A directory to add to the Python path, e.g.
>"/home/djangoprojects/myproject".
>  --traceback   Print traceback on exception
>  --version show program's version number and exit
>  -h, --helpshow this help message and exit
>
> Type 'django-admin.py help ' for help on a specific
> subcommand.
>
> Available subcommands:
>  cleanup
>  compilemessages
>  createcachetable
>  dbshell
>  diffsettings
>  dumpdata
>  flush
>  inspectdb
>  loaddata
>  makemessages
>  reset
>  runfcgi
>  runserver
>  shell
>  sql
>  sqlall
>  sqlclear
>  sqlcustom
>  sqlflush
>  sqlindexes
>  sqlinitialdata
>  sqlreset
>  sqlsequencereset
>  startapp
>  startproject
>  syncdb
>  test
>  testserver
>  validate
> 
>
> while surfing the net I found this solution, write in the console
>
> python C:\Python27\Scripts\django-admin.py startproject mysite
>
>
> I don't know if there is another solution instead of writing the above
> line every time or not.
>
> thanks for help.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Attribute error

2011-04-30 Thread Yongning Liang
class wish(models.Model):
wish=models.CharField(max_length=200)


what's your django version


On Sun, May 1, 2011 at 3:45 AM, Pulkit Mehrotra
wrote:

> AttributeError at /mysite/wishlist/
>
> 'module' object has no attribute 'CharField'
>
> What does this error means ???
>
> View for this is:
> from django.shortcuts import render_to_response
> from django.http import HttpResponseRedirect,HttpResponse
> from wishlist.models import wish
> from wishlist.forms import wish
>
> def wishlist(request):
>   wish_list=wish.objects.all()
>   return render_to_response(
>   'wishlist/wishlist.html',
>   {'list':wish_list}
>   )
>
> def wish_form(request):   
>   return render_to_response('wishlist/wish_form.html', {'form': form, })
>
> def search(request):
> if 'q' in request.GET:
> message = 'You searched for: %r' % request.GET['q']
> else:
> message = 'You submitted an empty form.'
> return HttpResponse(message)
>
> The models.py for this is:
> from django.db import models
>
> class wish(models.Model):
>   wish=models.CharField(max_length=200)
>   wish_date=models.DateTimeField('date published')
>
> the urls.py for this is:
> from django.conf.urls.defaults import patterns, include, url
> from mysite.wishlist import views
>
> # Uncomment the next two lines to enable the admin:
> # from django.contrib import admin
> # admin.autodiscover()
>
> urlpatterns = patterns('',
>   (r'^mysite/wishlist/$','wishlist.views.wishlist'),
>   (r'^mysite/wish/$','wishlist.views.wish_form'),
>   (r'^mysite/wishsearch/$','wishlist.views.search'),  
>   # Examples:
> # url(r'^$', 'mysite.views.home', name='home'),
> # url(r'^mysite/', include('mysite.foo.urls')),
>
> # Uncomment the admin/doc line below to enable admin documentation:
> # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
>
> # Uncomment the next line to enable the admin:
> # url(r'^admin/', include(admin.site.urls)),
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.