Re: Internship and job in python and Django related

2023-07-21 Thread Emmanuel Seth
Svp parlez en français 


Le ven. 21 juil. 2023 à 15:14, Opeyemi Ajayi <
opeyemichristiana.aj...@gmail.com> a écrit :

> I am Christiana Ajayi from Nigeria, but I am currently based in Rwanda and
> Nigeria.  I have just concluded development of a realtime dashboard using
> Django, Reactjs, HTML, CSS,  D3, PostgreSQL deployed on AWS cloud.
>
> I also have an engineering  background and hold a Masters degree in
> Engineering  Artificial Intelligence and Software engineering from Carnegie
> Mellon University, and I am actively seeking remote/on-site part-time or
> full-time opportunities that will help build on my skill in Django, Python,
> Data Analytics and contribute to my professional growth.  I look forward
> anyone who can accept me as a full time remote role anywhere in the world.
> Thank you.
>
> Attached is my LinkedIn profile: www.linkedin.com/in/
> opeyemichristianaajayi
>
>
> Kind regards,
> +250791591554
> +2348133347565
>
> On Wed, Jun 7, 2023, 4:17 PM Shubham DJ  wrote:
>
>> Hello, I’m Shubhang Jori from Nerul Navi Mumbai. I have been learning web
>> development for a few months now and have gained familiarity with Django,
>> python , MySQL, HTML  and CSS. Also I have completed 3 months internship in
>> trivia software as a python intern. As a student , I am actively seeking
>> Full-time job opportunities as well as internship opportunities that will
>> provide me with hands on experience in Django , python and contribute to my
>> professional growth.  I look forward anyone who can accept me as a full
>> time employee as well as an intern
>>
>>
>> Also I attached resume for your reference.
>> [image: PDF file]
>> shubham cv-1-2.pdf
>> 
>>
>> --
>> 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 it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CA%2B1KL_nGkLuktOc_3GEfDB1yzHCrovb_-rKJgT2trhsqnzn2rg%40mail.gmail.com
>> 
>> .
>>
> --
> 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 it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAA0EoL37E%2BjkeUeggn%2BFoyisMtrp5OK-Du_xqO%2BHMQQW6tzLdg%40mail.gmail.com
> 
> .
>

-- 
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 it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAMKrB%2B7AB-3aim3S-2meUQjtsOrWxwnx7pMKDhpmx4Lk7stpKw%40mail.gmail.com.


Plugging in Require.js

2015-09-09 Thread Christos Jonathan Seth Hayward
I asked how to plug in Require.js at:

http://stackoverflow.com/questions/32483810/how-do-i-think-and-act-in-require-js-if-i-have-a-script-src-background-a

​What should I be doing, and what packages should I be using, to be able to
use Require.js?


Thanks,​


-- 
[image: Christos Jonathan Seth Hayward] <http://jonathanscorner.com/>
Christos Jonathan Seth Hayward, an Orthodox Christian author.

Amazon / Kindle <http://amazon.com/author/cjshayward> • *Author
<http://cjshayward.com/>* • Author Bio <http://jonathanscorner.com/author/>
 • *The Classic Orthodox Bible <http://classicorthodoxbible.com/>* • *Email
<christos.jonathan.hayw...@gmail.com>* • Facebook
<http://www.facebook.com/christos.jonathan.hayward> • Fan Page
<http://fan.cjshayward.com/>• Github
<https://github.com/JonathanHayward?tab=repositories> • Google Plus
<http://jonathanscorner.com/plus> • LinkedIn
<http://www.linkedin.com/in/jonathanhayward> • *Main Website
<http://jonathanscorner.com/>* • *Professional
<http://jonathanhayward.com/>* • Twitter
<http://twitter.com/JonathansCorner> • What's New?
<http://jonathanscorner.com/>

If you read just *one* of my books, you'll want *The Best of Jonathan's
Corner <http://tinyurl.com/best-of-jonathans-corner>* (Kindle
<http://tinyurl.com/best-jonathans-corner-kindle>).

-- 
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 it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAE6_B5R0UoJq%2BsC-pLY6zbTi3m99F_eaFnuaf3c9gAxb9nT%3DNQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


django-ckeditor noop?

2014-12-05 Thread Christos Jonathan Seth Hayward
At
http://stackoverflow.com/questions/27321396/how-can-i-get-my-django-ckeditor-installation-to-recognize
I asked what I could do to get a RichTextField() to be displayed with a
CKeditor widget.

Any advice for what I should change?


Thanks,

-- 
[image: Christos Jonathan Seth Hayward] <http://jonathanscorner.com/>
Christos Jonathan Seth Hayward, an Orthodox Christian author.

Amazon / Kindle <http://amazon.com/author/cjshayward> • *Author
<http://cjshayward.com/>* • Author Bio <http://jonathanscorner.com/author/>
 • *The Classic Orthodox Bible <http://classicorthodoxbible.com/>* • *Email
<christos.jonathan.hayw...@gmail.com>* • Facebook
<http://www.facebook.com/christos.jonathan.hayward> • Fan Page
<http://fan.cjshayward.com/>• Github
<https://github.com/JonathanHayward?tab=repositories> • Google Plus
<http://jonathanscorner.com/plus> • LinkedIn
<http://www.linkedin.com/in/jonathanhayward> • *Main Website
<http://jonathanscorner.com/>* • *Professional
<http://jonathanhayward.com/>* • Twitter
<http://twitter.com/JonathansCorner> • What's New?
<http://jonathanscorner.com/>

If you read just *one* of my books, you'll want *The Best of Jonathan's
Corner <http://tinyurl.com/best-of-jonathans-corner>* (Kindle
<http://tinyurl.com/best-jonathans-corner-kindle>).

-- 
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 it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAE6_B5T8oq52FQ1zstfERksPrgMye7RL4GA1eEqy1LNpAioPXw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: How do I supply an appropriate application.wsgi to Gunicorn?

2014-11-24 Thread Christos Jonathan Seth Hayward
And with that, I'm off and running!

Thank you for your help.

On Mon, Nov 24, 2014 at 4:05 PM, Carl Meyer <c...@oddbird.net> wrote:

> On 11/24/2014 03:00 PM, Carl Meyer wrote:
> > On 11/24/2014 02:56 PM, Christos Jonathan Seth Hayward wrote:
> >> Thanks so much!
> >>
> >> Could you confirm the invocation?
> >>
> >> cjsh@ps306627:~/cynthia$ gunicorn cynthia.wsgi 0.0.0.0:
> >>
> >> usage: gunicorn [OPTIONS] [APP_MODULE]
> >>
> >> gunicorn: error: No application module specified.
> >
> > That's the right invocation, but you need your python path set up to
> > include the directory that has `manage.py` in it (when you actually run
> > a `manage.py` command, this happens automatically, but not when you run
> > gunicorn).
> >
> > There are a variety of ways that can be done, the simplest is to run
> > your gunicorn command from the same directory that contains `manage.py`
> > and set the PYTHONPATH env var:
> >
> > PYTHONPATH=`pwd` gunicorn cynthia.wsgi 0.0.0.0:
>
> Sorry, I was focused on the Python issues, didn't notice that you're
> trying to pass a bind address without using the `-b` option. This is
> what you want:
>
> PYTHONPATH=`pwd` gunicorn -b 0.0.0.0: cynthia.wsgi
>
> Carl
>
> --
> 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 it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/5473AB99.8040101%40oddbird.net
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
[image: Christos Jonathan Seth Hayward] <http://jonathanscorner.com/>
Christos Jonathan Seth Hayward, an Orthodox Christian author.

Amazon / Kindle <http://amazon.com/author/cjshayward> • *Author
<http://cjshayward.com/>* • Author Bio <http://jonathanscorner.com/author/>
 • *The Classic Orthodox Bible <http://classicorthodoxbible.com/>* • *Email
<christos.jonathan.hayw...@gmail.com>* • Facebook
<http://www.facebook.com/christos.jonathan.hayward> • Fan Page
<http://fan.cjshayward.com/>• Github
<https://github.com/JonathanHayward?tab=repositories> • Google Plus
<http://jonathanscorner.com/plus> • LinkedIn
<http://www.linkedin.com/in/jonathanhayward> • *Main Website
<http://jonathanscorner.com/>* • *Professional
<http://jonathanhayward.com/>* • Twitter
<http://twitter.com/JonathansCorner> • What's New?
<http://jonathanscorner.com/>

If you read just *one* of my books, you'll want *The Best of Jonathan's
Corner <http://tinyurl.com/best-of-jonathans-corner>* (Kindle
<http://tinyurl.com/best-jonathans-corner-kindle>).

-- 
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 it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAE6_B5QMBGstoZJeVaEKN0ZuXevVS8t4Mdwk_1cbK%2B%2BTTr%2BvgA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: How do I supply an appropriate application.wsgi to Gunicorn?

2014-11-24 Thread Christos Jonathan Seth Hayward
Thanks so much!

Could you confirm the invocation?

cjsh@ps306627:~/cynthia$ gunicorn cynthia.wsgi 0.0.0.0:

usage: gunicorn [OPTIONS] [APP_MODULE]

gunicorn: error: No application module specified.

cjsh@ps306627:~/cynthia$ gunicorn cynthia.wsgi:application 0.0.0.0:

usage: gunicorn [OPTIONS] [APP_MODULE]

gunicorn: error: No application module specified.

cjsh@ps306627:~/cynthia$ gunicorn cynthia.wsgi:cynthia 0.0.0.0:

usage: gunicorn [OPTIONS] [APP_MODULE]

gunicorn: error: No application module specified.


On Mon, Nov 24, 2014 at 3:45 PM, Carl Meyer <c...@oddbird.net> wrote:

>
>
> On 11/24/2014 02:38 PM, Christos Jonathan Seth Hayward wrote:
> > Ok; wonder if I should upgrade Django.
> >
> > I just ran a startproject earlier today (I can re-create it; I was just
> > trying to get it running and see the start page in my browser before
> going
> > further).
> >
> > cjsh@ps306627:~/cynthia$ find . -name \*.wsgi
>
> Your Django version is fine. The problem is that you're expecting to
> find a file with the `.wsgi` extension. The file Django generates is
> called `myproject/wsgi.py`, thus its dotted Python import path (which is
> what you pass to gunicorn) is `myproject.wsgi`.
>
> Carl
>
> --
> 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 it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/5473A6EF.4090107%40oddbird.net
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
[image: Christos Jonathan Seth Hayward] <http://jonathanscorner.com/>
Christos Jonathan Seth Hayward, an Orthodox Christian author.

Amazon / Kindle <http://amazon.com/author/cjshayward> • *Author
<http://cjshayward.com/>* • Author Bio <http://jonathanscorner.com/author/>
 • *The Classic Orthodox Bible <http://classicorthodoxbible.com/>* • *Email
<christos.jonathan.hayw...@gmail.com>* • Facebook
<http://www.facebook.com/christos.jonathan.hayward> • Fan Page
<http://fan.cjshayward.com/>• Github
<https://github.com/JonathanHayward?tab=repositories> • Google Plus
<http://jonathanscorner.com/plus> • LinkedIn
<http://www.linkedin.com/in/jonathanhayward> • *Main Website
<http://jonathanscorner.com/>* • *Professional
<http://jonathanhayward.com/>* • Twitter
<http://twitter.com/JonathansCorner> • What's New?
<http://jonathanscorner.com/>

If you read just *one* of my books, you'll want *The Best of Jonathan's
Corner <http://tinyurl.com/best-of-jonathans-corner>* (Kindle
<http://tinyurl.com/best-jonathans-corner-kindle>).

-- 
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 it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAE6_B5RrTBV5NB8cROvV%3D%2B_owyVDtfZrTAwvmSLrXd3hCXfMkw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: How do I supply an appropriate application.wsgi to Gunicorn?

2014-11-24 Thread Christos Jonathan Seth Hayward
Ok; wonder if I should upgrade Django.

I just ran a startproject earlier today (I can re-create it; I was just
trying to get it running and see the start page in my browser before going
further).

cjsh@ps306627:~/cynthia$ find . -name \*.wsgi

cjsh@ps306627:~/cynthia$ python manage.py shell

Python 2.6.6 (r266:84292, Aug 12 2014, 07:57:07)

[GCC 4.4.5] on linux2

Type "help", "copyright", "credits" or "license" for more information.

(InteractiveConsole)

>>> import django

>>> dir(django)

['VERSION', '__builtins__', '__doc__', '__file__', '__name__',
'__package__', '__path__', 'conf', 'contrib', 'core', 'db', 'dispatch',
'forms', 'get_version', 'http', 'middleware', 'shortcuts', 'template',
'templatetags', 'test', 'utils', 'views']

>>> django.VERSION

(1, 6, 5, 'final', 0)

>>>

​Further suggestions?


Thanks,

On Mon, Nov 24, 2014 at 3:24 PM, Carl Meyer <c...@oddbird.net> wrote:

> Hi,
>
> On 11/24/2014 02:19 PM, Christos Jonathan Seth Hayward wrote:
> > From
> >
> http://stackoverflow.com/questions/27113466/how-can-i-deploy-django-gunicorn-under-apache-proxy
> > :
> >
> > 've run through the documentation and am hitting the same pages over and
> > over again. At present I've found documentation to run off an existing
> > myapp.wsgi file, but documentation for how to make an appropriate wsgi
> file
> > is a little harder to find.
> >
> > If I want to make, proxied by Apache, the equivalent of, on an older
> > version of Gunicorn etc.:
> >
> > python manage.py run_gunicorn 0.0.0.0:
> >
> > what should I be doing to supply a WSGI file for:
> >
> > gunicorn project.wsgi:application
>
> That depends a bit on your version of Django. For any Django version
> since 1.4, 'django-admin.py startproject' should generate a wsgi.py file
> in your project. If your project doesn't have one, you can run
> 'startproject' to quickly see what one should look like and copy it into
> your project.
>
> Carl
>
> --
> 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 it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/5473A21F.8050801%40oddbird.net
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
[image: Christos Jonathan Seth Hayward] <http://jonathanscorner.com/>
Christos Jonathan Seth Hayward, an Orthodox Christian author.

Amazon / Kindle <http://amazon.com/author/cjshayward> • *Author
<http://cjshayward.com/>* • Author Bio <http://jonathanscorner.com/author/>
 • *The Classic Orthodox Bible <http://classicorthodoxbible.com/>* • *Email
<christos.jonathan.hayw...@gmail.com>* • Facebook
<http://www.facebook.com/christos.jonathan.hayward> • Fan Page
<http://fan.cjshayward.com/>• Github
<https://github.com/JonathanHayward?tab=repositories> • Google Plus
<http://jonathanscorner.com/plus> • LinkedIn
<http://www.linkedin.com/in/jonathanhayward> • *Main Website
<http://jonathanscorner.com/>* • *Professional
<http://jonathanhayward.com/>* • Twitter
<http://twitter.com/JonathansCorner> • What's New?
<http://jonathanscorner.com/>

If you read just *one* of my books, you'll want *The Best of Jonathan's
Corner <http://tinyurl.com/best-of-jonathans-corner>* (Kindle
<http://tinyurl.com/best-jonathans-corner-kindle>).

-- 
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 it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAE6_B5RwmAdAmotBkmmARKZAED%3DKZyjeUk4a_Xz%3Dux%3DbA0d%2BiQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


How do I supply an appropriate application.wsgi to Gunicorn?

2014-11-24 Thread Christos Jonathan Seth Hayward
From
http://stackoverflow.com/questions/27113466/how-can-i-deploy-django-gunicorn-under-apache-proxy
:

've run through the documentation and am hitting the same pages over and
over again. At present I've found documentation to run off an existing
myapp.wsgi file, but documentation for how to make an appropriate wsgi file
is a little harder to find.

If I want to make, proxied by Apache, the equivalent of, on an older
version of Gunicorn etc.:

python manage.py run_gunicorn 0.0.0.0:

what should I be doing to supply a WSGI file for:

gunicorn project.wsgi:application

Thanks,
-- 
[image: Christos Jonathan Seth Hayward] <http://jonathanscorner.com/>
Christos Jonathan Seth Hayward, an Orthodox Christian author.

Amazon / Kindle <http://amazon.com/author/cjshayward> • *Author
<http://cjshayward.com/>* • Author Bio <http://jonathanscorner.com/author/>
 • *The Classic Orthodox Bible <http://classicorthodoxbible.com/>* • *Email
<christos.jonathan.hayw...@gmail.com>* • Facebook
<http://www.facebook.com/christos.jonathan.hayward> • Fan Page
<http://fan.cjshayward.com/>• Github
<https://github.com/JonathanHayward?tab=repositories> • Google Plus
<http://jonathanscorner.com/plus> • LinkedIn
<http://www.linkedin.com/in/jonathanhayward> • *Main Website
<http://jonathanscorner.com/>* • *Professional
<http://jonathanhayward.com/>* • Twitter
<http://twitter.com/JonathansCorner> • What's New?
<http://jonathanscorner.com/>

If you read just *one* of my books, you'll want *The Best of Jonathan's
Corner <http://tinyurl.com/best-of-jonathans-corner>* (Kindle
<http://tinyurl.com/best-jonathans-corner-kindle>).

-- 
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 it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAE6_B5SUNHzCEjoC%3D7y9tqWq-m%3DSWkYayqaQ6PNqy9BdXVqOAQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


How can I set up Debian x86_64 so a Django project sees django.contrib.staticfiles?

2014-04-23 Thread Christos Jonathan Seth Hayward
I have a new Debian VPS, and a Django project that I am trying to deploy is
not seeing django.contrib.staticfiles.*. Doing a "pip install
django-staticfiles" has not observably changed things.

What is the best way to have things running well enough that such Django
projects will run?

Thanks,


-- 
[image: Christos Jonathan Seth Hayward] <http://jonathanscorner.com/>
Christos Jonathan Seth Hayward, an Orthodox Christian author.

Amazon / Kindle <http://amazon.com/author/cjshayward> • *Author
<http://cjshayward.com/>* • Author Bio <http://jonathanscorner.com/author/>
 • *Email <christos.jonathan.hayw...@gmail.com>* •
Facebook<http://www.facebook.com/christos.jonathan.hayward>
 • Fan Page <http://fan.cjshayward.com/> • Google
Plus<http://jonathanscorner.com/plus>
 • LinkedIn <http://www.linkedin.com/in/jonathanhayward> • *Professional
<http://jonathanhayward.com/>* • Twitter<http://twitter.com/JonathansCorner>
 • *Web <http://jonathanscorner.com/>* • What's
New?<http://jonathanscorner.com/>
If you read just *one* of my books, you'll want *The Best of Jonathan's
Corner <http://www.amazon.com/dp/1478219912>*.

-- 
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 it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAE6_B5SMaj3tbjbz5-JKMkhZJ%3DGLYE1-RpkxAENKVRmx_fVwZA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Creating JSON file

2013-04-08 Thread Seth Gordon
You want to output a list of one dict per object, and you want that dict to
contain another dict inside it. So you don’t need dict2. Instead

f = file('report.json','a+')
sys.stdout = f
result = []
objects = game_objects.objects.all()
for obj in objects:
time = time_stamp.objects.filter(user_id = obj.user_id)
obj_id = obj.object_id
per = performance.objects.filter(user_id = obj.user_id)
pat = pattern.objects.filter(user_id = obj.user_id)
dict1 = {'user_id' : obj.user_id, 'game_id': obj.game_id}
dict1[obj_id]={'color': obj.color, 'speed': obj.speed, 'energy':
obj.energy }
result.append(dict1)


On Mon, Apr 8, 2013 at 8:33 AM, Nagarajan Dharmar Sitha <
nagarajan.dharmarsi...@gmail.com> wrote:

> saved = sys.stdout
> f = file('report.json','a+')
> sys.stdout = f
> result = []
> objects = game_objects.objects.all()
> for obj in objects:
> dict2 ={}
> time = time_stamp.objects.filter(user_id = obj.user_id)
> obj_id = obj.object_id
> per = performance.objects.filter(user_id = obj.user_id)
> pat = pattern.objects.filter(user_id = obj.user_id)
> dict2[obj_id]={'color': obj.color, 'speed': obj.speed, 'energy':
> obj.energy }
> dict1 = {'user_id' : obj.user_id, 'game_id': obj.game_id}
> result.append(dict1)
> result.append(dict2)
>
> print json.dumps(result, indent =  4)
> sys.stdout = saved
>
> this is my code and out put of the code is:
>
>
>
> [
> {
> "game_id": "000g1",
> "user_id": "000u1"
> },
> {
> "000o1": {
> "color": "red",
> "energy": "300",
> "speed": 2
> }
> },
> {
> "game_id": "000g2",
> "user_id": "000u2"
> },
> {
> "000o2": {
> "color": "red",
> "energy": "450",
> "speed": 6
> }
> },
> {
> "game_id": "000g3",
> "user_id": "000u3"
> },
> {
> "000o3": {
> "color": "red",
> "energy": "600",
> "speed": 12
> }
> },
> {
> "game_id": "000g4",
> "user_id": "000u4"
> },
> {
> "000o4": {
> "color": "red",
> "energy": "750",
> "speed": 20
> }
> },
> {
> "game_id": "000g5",
> "user_id": "000u5"
> },
> {
> "000o5": {
> "color": "red",
> "energy": "900",
> "speed": 30
> }
> },
> {
> "game_id": "000g6",
> "user_id": "000u6"
> },
> {
> "000o6": {
> "color": "red",
> "energy": "1050",
> "speed": 42
> }
> },
> {
> "game_id": "000g7",
> "user_id": "000u7"
> },
> {
> "000o7": {
> "color": "red",
> "energy": "1200",
> "speed": 56
> }
> },
> {
> "game_id": "000g8",
> "user_id": "000u8"
> },
> {
> "000o8": {
> "color": "red",
> "energy": "1350",
> "speed": 72
> }
> },
> {
> "game_id": "000g9",
> "user_id": "000u9"
> },
> {
> "000o9": {
> "color": "red",
> "energy": "1500",
> "speed": 90
> }
> }
> ]
>
>
> but i want out put like this way:
>
>
> [
> {
> "game_id": "000g1",
> "user_id": "000u1"
> "000o1": {
> "color": "red",
> "energy": "300",
> "speed": 2
> }
> },
> {
> "game_id": "000g2",
> "user_id": "000u2",
> "000o2": {
> "color": "red",
> "energy": "450",
> "speed": 6
> }
> },
> ..
> .
> ]
>
>
> kindly help me out...
>
>  --
> 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 it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
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 it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Django setup with elsatic beanstalk

2012-10-09 Thread Seth Alves

If you name your top-level wsgi file to "application.py", does it do any 
better?

-seth


On Monday, October 8, 2012 10:22:51 AM UTC-7, shlomi oberman wrote:
>
> I'm trying without succes to setup a simple application using django with 
> elastic beanstalk from my windows machine.
> Does anyone have any expreience with this? I am currently getting the 
> following error from the EB console: 
> "Your WSGIPath refers to a file that does not exist."
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/USBE7D0SkkgJ.
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 Development environment

2011-08-28 Thread Seth
On Aug 22, 3:07 pm, Stephen Jackson 
wrote:
> I am new to the world of Django. I would like to hear from other django
> developers describe their dev environment (tools, os, editors, etc.).

OS: Mac OS X (Snow Leopard)
Editor: TextMate with ProjectPlus plugin, Eclipse+PyDev for debugging
ONLY (and rarely). All of the cross platform editors Eclipse/PyCharm/
NetBeans/Wing/Komodo/Eric4/SPE are too buggy and/or mac-unfriendly to
be useful day-to-day ... I really wish TextMate had better completion
like PyDev, and debugging :(
DB: sqlite, PostgreSQL (if I need GIS support), mysql (if I don't need
GIS support)
Source control: mercurial, using hooks for production deployment on
push
Apps: South (must have), rpc4django (must have), profiler middleware
(http://djangosnippets.org/snippets/1579/), djcelery + celery +
rabbitmq.
Other Tools: memcached (must have), logging module, closure compiler,
WebKit's WebInspector, virtualenv, Pixelmator, Photoshop, Sphinx (for
docs)
Deployment: turnkeylinux django image (Ubuntu 10 + apache2.2 +
mod_wsgi), Windows 7 + apache2.2 + mod_wsgi
Hosting: webfaction

I've been doing 100% django development for about two years now, and
am much relieved be free of C# and Java in my daily workflow.

- S -

-- 
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: removing the source of a OneToOneField relationship

2011-05-04 Thread Seth Gordon
On 05/04/2011 12:43 AM, Andy McKay wrote:
> 
> On 2011-05-03, at 2:05 PM, Seth Gordon wrote:
>> I get an exception, complaining that Target.source does not allow
>> null values.
> 
> You'll probably want to allow null values on your OneToOne field then:
> 
> http://docs.djangoproject.com/en/dev/ref/models/fields/#django.db.models.Field.null

Ah, but I don’t want Source.target to be a nullable value.  Every Source
should point to a Target, but not every Target needs to have a Source.

> --
>   Andy McKay
>   a...@clearwind.ca
>   twitter: @andymckay
>  
> 

-- 
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.



removing the source of a OneToOneField relationship

2011-05-03 Thread Seth Gordon
I have one Django model that points to another one with a OneToOneField,
sort of like this:

class Target(models.model):
# stuff

class Source(models.Model):
target = models.OneToOneField(Target)

Sometimes, given an object that is an instance of Target, I want to
navigate to its Source and delete that:

try:
some_target.source.delete()
except ObjectDoesNotExist:
## nothing to delete!
pass

But this doesn't work: some_target.source will still exist after the
delete() operation has been performed.  If I try "some_target.source =
None", I get an exception, complaining that Target.source does not allow
null values.  Calling save() and clean_fields() at strategic moments
doesn't seem to work, either.

What does seem to work is reloading the Target object:

try:
some_target.source.delete()
some_target = Target.objects.get(pk=some_target.id)
except Source.DoesNotExist:
## nothing to delete!
pass

Is this a bug in Django, or am I misunderstanding how related or cached
objects are supposed to work?

This is Django 1.2.3, Python 2.6.5, PostgreSQL 8.4.7, all running on
Ubuntu Linux 10.04.

-- 
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: Japanese Text Sort Order

2011-01-05 Thread Seth Gordon
On 01/05/2011 07:57 AM, James Hancock wrote:
> I think it does the same thing, but I was talking about how you cant set
> 'ordering' under the Meta class in a model.
> http://docs.djangoproject.com/en/1.2/ref/models/options/#django.db.models.Options.ordering
> 
> If
> I set it to a field of Japanese characters, the ordering comes out wrong. At
> least not in the desired order.
> How can I set the data collation for just a few fields? And how can I know
> which of the Japanese to set it to?

Does the “strcoll” function in Python’s standard “locale” module do the
right thing when a Japanese locale is set?  If not, can you persuade the
PyICU package to do the right thing?

If either of these works, then you could slurp your results into a
Python list and then sort the list using one of these methods.  This
wouldn’t perform too well, of course, if you had thousands and thousands
of results and you wanted the database to peel off the top ten... but if
for some reason collation at the database level isn’t working, doing it
all at the Python level might be better than nothing.

-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: django test framework with no models.py

2010-12-30 Thread Seth Gordon
On 12/27/2010 09:58 AM, Henrik Genssen wrote:
> Hi,
> 
> I wanted to write a test for an app, that does not have a models.py itself.
> Doing so I get:
> django.core.exceptions.ImproperlyConfigured: App with label service could not 
> be found
> 
> if I create a models.py with just a "pass" in it everything works as expected.
> I use Django 1.1

I worked around the same problem (in 1.2, at least) with just an empty
models.py file—I didn’t even need the “pass”.

-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Odd behavior with reverse()

2010-08-04 Thread Seth
I've just spent the better part of an afternoon dealing with this
issue, then finally figured it out this morning.

Supposing you have this situation (which I saw in a django app that
I've been using lately):

urls.py:
(r'^viewtest1$', 'testapp.views.viewtest1'),
(r'^viewtest2$', 'testapp.views.viewtest2'),

testapp/views.py:
def viewtest1(request):
return HttpResponse("You've reached view1. It's url is %s" %
view1_url)

view1_url = reverse(viewtest1)

def viewtest2(request):
return HttpResponse("You've reached view2.", mimetype="text/
plain")

When you try to load up http://localhost/viewtest1, you get this
error:

ViewDoesNotExist at /viewtest1
Tried viewtest2 in module reverseapp.views. Error was: 'module'
object has no attribute 'viewtest2'

What appears to be happening is that when reverse() is called, it is
presumably importing testapp.views. But, since testapp.views hasn't
been fully loaded at that point, reverse() can't see the any functions
that appear after it in the file, and thus, viewtest2 isn't found.

In my case, I was getting NoReverseMatch errors in my templates for
unrelated views.


So, now that I'm writing this up, I see a little note in the reverse()
documentation which says "don't do it wrong", and I feel like I'm just
complaining now :)

That particular bit of documentation wouldn't have helped my in my
case, since the error originated in a 3rd party app (I was looking
through my own code to see what I did wrong). Anybody else been bitten
by this? Is there a way to make errors like this easier to track down
(especially in templates, where you don't have a stack trace)?


- Seth -

-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: issue with django.views.generic.date_based.archive_index's date_list

2009-07-01 Thread Seth Buntin

Karen,

That makes total sense.  I really missed the verbiage there.

Thanks.

On Jun 30, 10:34 pm, Karen Tracey <kmtra...@gmail.com> wrote:
> On Tue, Jun 30, 2009 at 1:55 PM, Seth Buntin <sethtr...@gmail.com> wrote:
>
> > I'm having an issue with the date_based generic views archive_index.
> > I am expecting the context to return a date_list with datetime
> > instances of the years specified in my queryset.
>
> > The problem is my queryset doesn't return what I am expecting.  The
> > queryset only has one instance and it has a datefield values of June
> > 6, 2009 the only date object I get in date_list is an object for
> > January 1, 2009. Any ideas on what might be causing this?
>
> This is what I'd expect base on the documentation.
>
> http://docs.djangoproject.com/en/dev/ref/generic-views/#django-views-...
>
> says date_list is "A list of datetime.date objects representing all years
> that have objects available according to queryset. These are ordered in
> reverse. This is equivalent to queryset.dates(date_field, 'year')[::-1]."
>
> Looking up queryset.date 
> (http://docs.djangoproject.com/en/dev/ref/models/querysets/#dates-fiel...),
> when you specify kind as "year", it says what will be generated is a list of
> all distinct year values for the field.  The example for kind="year" shows
> datetime.date value of Jan 1 for the single year in the example set (the
> full set in the example has multiple dates in the same year).
>
> Note the only significant value in the datetimes returned is the year, but
> the month and day have to have values set to something (since Python doesn't
> support a datetime.date with only the year part specified), so they are
> arbitrarily set to 1 and 1.  This does not mean there is necessarily any
> instance in the queryset that has that exact date, it simply means there is
> at least one (perhaps more) instance within the queryset with a date in that
> year.
>
> Karen
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



issue with django.views.generic.date_based.archive_index's date_list

2009-06-30 Thread Seth Buntin

I'm having an issue with the date_based generic views archive_index.
I am expecting the context to return a date_list with datetime
instances of the years specified in my queryset.

The problem is my queryset doesn't return what I am expecting.  The
queryset only has one instance and it has a datefield values of June
6, 2009 the only date object I get in date_list is an object for
January 1, 2009. Any ideas on what might be causing 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
-~--~~~~--~~--~--~---



Target anchor on div's id (/account/#divid ) + Redirection after a POST = ascii encode problem

2009-01-26 Thread Seth Kaïne

Here's my problem. I want to redirect my urls by the name of its
model, like this:
urls.py:


(r'^(?P\w+)/$', 'urlCatcher'),
(r'^(?P\w+)/(?P\w+)/$', 'urlCatcher'),
(r'^(?P\w+)/(?P\w+)/(?P\w+)/$',
'urlCatcher'),

here's the function in the views.py:

def urlCatcher(request, model='', action='', code=''):
...
# the action and the name are stick together and use to redirect to
their own template.

locals_dict.update({ 'model':model, 'action':action })
key = '%s%s' % (action, model.capitalize())

   try:
if not code:
if key != '':
# I use a callback to take the locals from the functions
(all return a dict with template, lists,...)
locals_dict.update({

  'Account':userProfile,
  'deletedRss':userProfile,
  'addedRss':userProfile,
  'changedRss':userProfile,
  'listenRss':userProfile,
  'deletedUsers':userProfile,
  ...
  'deletedQuotes':userProfile,
  'deletedWeather':userProfile,
  'getWeather':userProfile,
  'listenWeather':userProfile,
  'getQuotes':userProfile,

  }[key](request))

...

userProfile, the function:

locals_dict.update({ 'templateName':"user_account.html",
 'user_list':user_list,
 'weather_list':weather_list,
 ...

})
return locals_dict

Here's the redirection to the target anchor:

try:
# hack
# if locals_dict['redir'] exists, is true
print "ooo%s - message : %s  oo" % (locals_dict['redir'],
locals_dict.get('message'))
if model:
#print "ooo%s  ooo" % model
if model == 'users' or model == 'im':
model = 'contacts'
elif model == 'quotes':
model = 'markets'

return HttpResponseRedirect("/account/#%s" % (model))


All is fine,except a reload from the page when it goes to the anchor.
But this is not my big problem.
My problem is when I press the button to send a message with a
character like 'ç':

 * Erreur : 'ascii' codec can't encode character u'\xe7' in position
0: ordinal not in range(128)

I have on top of all my files:
 # -*- coding: utf-8 -*-

and in my settings:
DEFAULT_CONTENT_TYPE = 'text/html; charset=utf-8'

and in my form:


I also have problem with path_info:
path_url = request.META['PATH_INFO']

#in dev
URL = "/mysite"

# server apache in production
URL = ""

I have an apache2 server with ubuntu 8.04 in production.










--~--~-~--~~~---~--~~
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 ORM and phpMyAdmin

2008-11-26 Thread Seth Kaïne

I'm learning about ORM, but it's not easy to understand the whole
picture.
I'm trying to create a "function" or a "filter" linked to my models.py
or to PHPmyAdmin to give me a signal when something is changing.
I'm making reseachs on signal on django, perhaps a solution to
explore.

If you have other informations about ORM or a way to bind the whole
thing together.

Thanks for your response.

Seth

On Nov 24, 6:04 pm, "Travis Veazey" <[EMAIL PROTECTED]>
wrote:
> Seth,
> The reason that you don't see the values in u3 change when you change the
> database is that the models don't read from the database every time you want
> to get a value - that would be silly and would cause Django to be among the
> worst-performing frameworks in existence. Database reads take time, and to
> avoid that overhead any good ORM will get the values once and then hold them
> in memory.
>
> If you were to modify your database values and then retrieve a new object
> (via the filter() method or whatever), you will see your modifications show
> up.
>
> I'm afraid I'm too new to Django to tell you if there's a method to force a
> model to refresh its data from the database, but I'm an old hand at ORMs in
> general and I know from working with a very poorly-implemented one (this one
> would make a separate database call for each field value you wanted to
> retrieve; displaying an employee's first, middle, and last names, for
> example, would require 3 database queries) that reducing your round-trips to
> the database significantly reduces the amount of time required to process
> your script (in the example I mentioned, modifying the ORM to make only a
> single call to get all the values resulted in reducing page load time by
> almost a full third!).
>
> Hope this gives you some insight.
>
> -Travis
>
> On Mon, Nov 24, 2008 at 6:33 AM, Steve Holden <[EMAIL PROTECTED]> wrote:
>
> > Seth Kaïne wrote:
> > > I want to have some more, please.
> > > When I do that:
>
> > >>>> python manage.py shell
>
> > >>>> from httpbackend.models import Unit
> > >>>> Unit.objects.all()
>
> > > [, , ,
> > > ]
>
> > >>>> u3 = Unit.objects.filter(id=3)[0]
> > >>>> u3.status
>
> > > 
> > > --- I change the status for an ONLINE statement with phpmyadmin in
> > > my Table Unit to test if django orm takes modifications to the objet
> > > from the DB --
>
> > >>>> u3.status
>
> > > 
> > > --- no, nothing ---
>
> > > I want to know why?
>
> > > And I want to solve this, please!
> > >  thank you, come again!
>
> > At the very least you would need to read the database again, as there is
> > nothing that would "magically" make the already-in-memory u3 object
> > update itself when the database content changes.
>
> > regards
> >  Steve
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Django ORM and phpMyAdmin

2008-11-24 Thread Seth Kaïne

I want to have some more, please.
When I do that:

>>> python manage.py shell

>>> from httpbackend.models import Unit
>>> Unit.objects.all()
[, , ,
]
>>> u3 = Unit.objects.filter(id=3)[0]
>>> u3.status

--- I change the status for an ONLINE statement with phpmyadmin in
my Table Unit to test if django orm takes modifications to the objet
from the DB --
>>> u3.status

--- no, nothing ---

I want to know why?

And I want to solve this, please!
 thank you, come again!

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: IE7, IE6, and Safari session save issue

2008-05-14 Thread Seth Buntin

This is also not allowing me to log into the admin interface so it is
definitely site wide.

On May 14, 10:35 am, Seth Buntin <[EMAIL PROTECTED]> wrote:
> I don't know if this helps but I am using mod_wsgi 1.3.  I have
> noticed some issues with mod_php but I don't have that installed on
> the server.
>
> On May 13, 10:07 pm, Seth Buntin <[EMAIL PROTECTED]> wrote:
>
> > Okay I am going to try to explain this the best I can.  The issue I am
> > having is only with IE7, IE6, and Safari.  I believe it is a way the
> > session information isn't being saved.  This issue doesn't happen with
> > r7020 but is happening with r7526.  The problem doesn't occur when
> > running from Django's development server.
>
> > Here is the bit of code (Cart model):
>
> > @classmethod
> > def get_session_cart(cls, request, customer=None):
> > try:
> > cart = cls.objects.get(id=request.session['cart'])
> > except (Cart.DoesNotExist, KeyError):
> > cart = cls()
> > cart.customer = customer
> > cart.save()
> > request.session['cart'] = cart.id
> > return cart
>
> > I don't assume I have to tell what I am doing here but the idea is to
> > get the cart object if it exists.  I run this command when adding to
> > cart and when I display the cart.  In IE6&7 and Safari it throws a
> > KeyError and creates a new cart session.  When adding to cart it
> > actually adds the product correctly but also throws the KeyError when
> > displaying the cart.  I can't figure out what I am doing wrong.  If I
> > add the setting to save the session on every request it doesn't work
> > in any browser.  Any ideas?
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: IE7, IE6, and Safari session save issue

2008-05-14 Thread Seth Buntin

I don't know if this helps but I am using mod_wsgi 1.3.  I have
noticed some issues with mod_php but I don't have that installed on
the server.

On May 13, 10:07 pm, Seth Buntin <[EMAIL PROTECTED]> wrote:
> Okay I am going to try to explain this the best I can.  The issue I am
> having is only with IE7, IE6, and Safari.  I believe it is a way the
> session information isn't being saved.  This issue doesn't happen with
> r7020 but is happening with r7526.  The problem doesn't occur when
> running from Django's development server.
>
> Here is the bit of code (Cart model):
>
> @classmethod
> def get_session_cart(cls, request, customer=None):
> try:
> cart = cls.objects.get(id=request.session['cart'])
> except (Cart.DoesNotExist, KeyError):
> cart = cls()
> cart.customer = customer
> cart.save()
> request.session['cart'] = cart.id
> return cart
>
> I don't assume I have to tell what I am doing here but the idea is to
> get the cart object if it exists.  I run this command when adding to
> cart and when I display the cart.  In IE6&7 and Safari it throws a
> KeyError and creates a new cart session.  When adding to cart it
> actually adds the product correctly but also throws the KeyError when
> displaying the cart.  I can't figure out what I am doing wrong.  If I
> add the setting to save the session on every request it doesn't work
> in any browser.  Any ideas?
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



IE7, IE6, and Safari session save issue

2008-05-13 Thread Seth Buntin

Okay I am going to try to explain this the best I can.  The issue I am
having is only with IE7, IE6, and Safari.  I believe it is a way the
session information isn't being saved.  This issue doesn't happen with
r7020 but is happening with r7526.  The problem doesn't occur when
running from Django's development server.

Here is the bit of code (Cart model):

@classmethod
def get_session_cart(cls, request, customer=None):
try:
cart = cls.objects.get(id=request.session['cart'])
except (Cart.DoesNotExist, KeyError):
cart = cls()
cart.customer = customer
cart.save()
request.session['cart'] = cart.id
return cart

I don't assume I have to tell what I am doing here but the idea is to
get the cart object if it exists.  I run this command when adding to
cart and when I display the cart.  In IE6&7 and Safari it throws a
KeyError and creates a new cart session.  When adding to cart it
actually adds the product correctly but also throws the KeyError when
displaying the cart.  I can't figure out what I am doing wrong.  If I
add the setting to save the session on every request it doesn't work
in any browser.  Any ideas?
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Data truncated error

2007-07-17 Thread Seth Buntin

I figured it out, sorry.  I had an hidden character somewhere. I just
retyped it instead of copy/paste and everything is fine.

Seth

On Jul 17, 11:29 am, Seth Buntin <[EMAIL PROTECTED]> wrote:
> I am getting a Data truncated error and I don't know if it is because
> of the data I am inserting into the DB or what.  I am putting this in
> a TextField and here is the message I am getting:
>
> Warning at /admin/cabedge_silo/page/2/
> Data truncated for column 'bodytext' at row 1
> Request Method: POST
> Request URL:http://localhost:8000/admin/cabedge_silo/page/2/
> Exception Type: Warning
> Exception Value:Data truncated for column 'bodytext' at row 1
> Exception Location: /usr/local/lib/python2.5/warnings.py in
> warn_explicit, line 102
> Python Executable:  /usr/local/bin/python
> Python Version: 2.5.1
>
> I am using Mac OX 10.4.10.
>
> Here is the data i am putting into the field (I hope it displays
> correctly):
>
> 
> What's a cabedge?
> We're a creative company. However, our creativity isn't limited to
> just people who can draw. We look for imaginative, artistic, and
> inventive solutions in everything we do. From Internet marketing, web
> design and development to search engine optimization and ecommerce,
> we're here to provide productive Internet solutions for our clients.  p>
> 
> Take a look around. Like what you see? Let us know a>. Here are a few to get you started...
> 
> 
>
> 
> // <![CDATA[
>
> var so = new SWFObject("/site_media/cabedge_silo/flash/home_hero.swf",
> "homehero", "700", "292", "7", "#F1EAC6");
> so.addVariable("flashVarText", "this is passed in via FlashVars for
> example only");
> so.write("home_hero");
> // ]]>
> 


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Data truncated error

2007-07-17 Thread Seth Buntin

I am getting a Data truncated error and I don't know if it is because
of the data I am inserting into the DB or what.  I am putting this in
a TextField and here is the message I am getting:

Warning at /admin/cabedge_silo/page/2/
Data truncated for column 'bodytext' at row 1
Request Method: POST
Request URL:http://localhost:8000/admin/cabedge_silo/page/2/
Exception Type: Warning
Exception Value:Data truncated for column 'bodytext' at row 1
Exception Location: /usr/local/lib/python2.5/warnings.py in
warn_explicit, line 102
Python Executable:  /usr/local/bin/python
Python Version: 2.5.1

I am using Mac OX 10.4.10.

Here is the data i am putting into the field (I hope it displays
correctly):


What's a cabedge?
We're a creative company. However, our creativity isn't limited to
just people who can draw. We look for imaginative, artistic, and
inventive solutions in everything we do. From Internet marketing, web
design and development to search engine optimization and ecommerce,
we're here to provide productive Internet solutions for our clients. 

Take a look around. Like what you see? Let us know. Here are a few to get you started...





// 



--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Weird session

2007-03-14 Thread Seth Buntin

Well this didn't work:

request.session["order_items"] = request.session["order_items"] +
[order_item.id]

Any other ideas?  Is it how Django is implementing sessions or how
mod_python and Apache have their child processes?

Thanks.

Seth


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Weird session

2007-03-14 Thread Seth Buntin

Well this didn't work:

request.session["order_items"] = request.session["order_items"] +
[order_item.id]

Any other ideas?  Is it how Django is implementing sessions or how
mod_python and Apache have their child processes?

Thanks.

Seth


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Common models between two apps

2007-03-03 Thread Seth Buntin

Sorryhit enter too soon.

from blog.models import Category

class Image(models.Model):
category = model.ForeignKey(Category)
...

This way you only have to keep up with the Blog Category model and it
can be used in both apps.  Is that what you mean?

Seth

On Mar 3, 9:36 pm, "nn" <[EMAIL PROTECTED]> wrote:
> My site runs on two apps, a blog and a gallery. However, there are
> several models common to each. I don't want to maintain two copies of
> these models (one in each app), so what would be the best solution to
> this? I've considered consolidating the blog and gallery apps into
> one, but I'd prefer to keep them separate.


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Common models between two apps

2007-03-03 Thread Seth Buntin

I haven't tried this but what if you import the model you need and use
it as a foreign key.  I don't know what you are doing but we'll see...

gallery model.py:
from blog.model import Category

class Image(models.Model):


On Mar 3, 9:36 pm, "nn" <[EMAIL PROTECTED]> wrote:
> My site runs on two apps, a blog and a gallery. However, there are
> several models common to each. I don't want to maintain two copies of
> these models (one in each app), so what would be the best solution to
> this? I've considered consolidating the blog and gallery apps into
> one, but I'd prefer to keep them separate.


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Weird session

2007-03-02 Thread Seth Buntin

I would love to tackle this issue, since it is to my advantage, but
really don't know where to start.  Any ideas?

Seth

On Mar 1, 10:59 pm, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Thu, 2007-03-01 at 20:17 -0800, Graham Dumpleton wrote:
>
> [...]
>
>
>
> I wrote:
> > > > I'm wondering if this may lead to race conditions along the lines of:
>
> > > > thread A creates a session
>
> > > > thread B creates a session
>
> > > > thread A stores "foo = 6" in session
>
> > > > thread B stores "blah = 1" in its session
>
> > > > thread A stores session (which contains foo=6)
>
> > > > thread B stores session (which does NOT have 
> > > > foo=6)
>
> > > > might be happening if you are doing lots of partial updates.
>
> > This doesn't make sense.
>
> Actually it makes a lot of sense now that I look at the code.
>
> > Normally the way sessions work, a second
> > request is usually locked out until the first request has finished
> > with the session object and released it. Thus there can be no
> > overlapping changes unless you are doing silly things like unlocking/
> > locking them yourself during a request. At least this is how
> > mod_python sessions work. How Django sessions (which don't actually
> > use mod_python sessions) work I don't know.
>
> Just to keep things on the right track for debugging Set's problem, I'll
> note that this isn't correct for Django sessions. As can be seen from
> the code in django/contrib/sessions/middleware.py and models.py, we
> don't do any cross-thread or cross-process locking when creating a
> session instance. Maybe we well should be doing something like that for
> people who want to do simultaneous updates -- as might happen in an AJAX
> driven site -- but, right now, we do not.
>
> A lot of Django enhancements like this are historically driven by usage
> patterns: the whole framework was written for one -- fairly broad --
> purpose and is gradually and carefully extended to handle other
> reasonable uses as they come up. This would be a good mini-project for
> somebody to look at doing if they felt so inclined. A bit of design work
> would be required, not just a one-line patch, I supsect, but it's not
> going to be of the "cure cancer" level of difficulty.
>
> Regards,
> Malcolm


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Weird session

2007-03-01 Thread Seth Buntin

What type of debug code could I use?

Seth

On Mar 1, 10:17 pm, "Graham Dumpleton" <[EMAIL PROTECTED]> wrote:
> On Mar 2, 2:57 pm, "Seth Buntin" <[EMAIL PROTECTED]> wrote:
>
> > That probably isn't too far off.  One time it did work and it was
> > weird so I might have actually got one of the threads to fire
> > correctly.  Is there a way to limit the amount of threadsmod_python
> > uses?
>
> The threads are not created by mod_python, they are created by Apache.
> For each client request Apache will handle it in a separate thread
> taken from a pool of threads. If the response for a request needs to
> come from an application running under mod_python, then the call
> through to mod_python/Python simply uses the existing thread that
> Apache created.
>
> The only way to limit the number of threads is by changing the
> configuration of Apache, but on Windows this would be a silly thing to
> do as there is only one Apache process and if you limit your threads
> to 1 to avoid perceived threading issues, all client requests will
> then effectively be serialised which would impact performance and
> would screw badly with AJAX applications that may want to have
> multiple concurrent requests going at the same time.
>
> > > I'm wondering if this may lead to race conditions along the lines of:
>
> > > thread A creates a session
>
> > > thread B creates a session
>
> > > thread A stores "foo = 6" in session
>
> > > thread B stores "blah = 1" in its session
>
> > > thread A stores session (which contains foo=6)
>
> > > thread B stores session (which does NOT have 
> > > foo=6)
>
> > > might be happening if you are doing lots of partial updates.
>
> This doesn't make sense. Normally the way sessions work, a second
> request is usually locked out until the first request has finished
> with the session object and released it. Thus there can be no
> overlapping changes unless you are doing silly things like unlocking/
> locking them yourself during a request. At least this is how
> mod_python sessions work. How Django sessions (which don't actually
> use mod_python sessions) work I don't know.
>
> If there is some problem with locking and concurrent requests changing
> the same actual session object at the same time it should be easy to
> pick up by adding into your code suitable debug logging at start/end
> points related to manipulation of session object and possibly in
> between, which shows identity of request/thread doing the
> manipulation.
>
> Graham


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Weird session

2007-03-01 Thread Seth Buntin

That probably isn't too far off.  One time it did work and it was
weird so I might have actually got one of the threads to fire
correctly.  Is there a way to limit the amount of threads mod_python
uses?

Seth

On Mar 1, 9:48 pm, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> Hi Seth,
>
>
>
> On Fri, 2007-03-02 at 03:35 +, Seth Buntin wrote:
> > I have this:
>
> > request.session["order_items"] = []
>
> > and on certain views I have:
>
> > request.session["order_items"].append(order_item.id)
>
> > In development mode this works fine.  Even when I use Firebug I see
> > everything being sent to the specific views and other areas of the
> > site are being updated correctly (they don't rely on the session
> > variable) and are receiving the variables I send via AJAX.  It is
> > acting like the session variable is just being passed over.  Kinda
> > like the session isn't being saved but I have
> > SESSION_SAVE_EVERY_REQUEST = True in my settings file.'
>
> Thanks for the extra information. Makes things a little clearer.
>
> Slight stab in the dark here, but whilst I think about it some more,
> this may provide some clues for you to think about: one difference
> between the development environment and mod_python is threadedness. In
> the dev environment, everything is being run in a single thread, one
> step at a time. In the mod_python setup, different threads could be
> handling different portions of your processing each time.
>
> I'm wondering if this may lead to race conditions along the lines of:
>
> thread A creates a session
>
> thread B creates a session
>
> thread A stores "foo = 6" in session
>
> thread B stores "blah = 1" in its session
>
> thread A stores session (which contains foo=6)
>
> thread B stores session (which does NOT have foo=6)
>
> might be happening if you are doing lots of partial updates.
>
> Like I said, this is just a gut feeling of something to look at based on
> one known difference between the two environments. Working out whether
> I'm on crack or not may require rummaging through to code to work out
> exactly who is saving what when. In the meantime, I'll let it bounce
> around in my head a bit and see if anything else pops into mind.
>
> Regards,
> Malcolm


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Weird session

2007-03-01 Thread Seth Buntin

I have this:

request.session["order_items"] = []

and on certain views I have:

request.session["order_items"].append(order_item.id)

In development mode this works fine.  Even when I use Firebug I see
everything being sent to the specific views and other areas of the
site are being updated correctly (they don't rely on the session
variable) and are receiving the variables I send via AJAX.  It is
acting like the session variable is just being passed over.  Kinda
like the session isn't being saved but I have
SESSION_SAVE_EVERY_REQUEST = True in my settings file.

Seth

On Mar 1, 9:04 pm, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Thu, 2007-03-01 at 17:02 -0800, Seth Buntin wrote:
> > aren't working...sorry
>
> > On Mar 1, 6:55 pm, "Seth Buntin" <[EMAIL PROTECTED]> wrote:
> > > I am running Apache 2.0.59 and mod_python on Windows.  When I run the
> > > application it looks like the session variables are being set.  If I
> > > go straight in to the development server everything is great!  What am
> > > I missing?
>
> Almost impossible to tell from this information, unfortunately. Do you
> mean that Django's middleware is not running properly, so your code does
> not see the effects of receiving the session? Or do you mean that the
> session cookie is not being passed back to the client?
>
> You may need to use something like "curl -I ..." to see what is being
> sent back and forth (or the handy Web developer's extension in Firefox)
> to determine the latter.
>
> Malcolm


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Weird session

2007-03-01 Thread Seth Buntin

aren't working...sorry

On Mar 1, 6:55 pm, "Seth Buntin" <[EMAIL PROTECTED]> wrote:
> I am running Apache 2.0.59 and mod_python on Windows.  When I run the
> application it looks like the session variables are being set.  If I
> go straight in to the development server everything is great!  What am
> I missing?
>
> Thanks.
>
> Seth


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Weird session

2007-03-01 Thread Seth Buntin

I am running Apache 2.0.59 and mod_python on Windows.  When I run the
application it looks like the session variables are being set.  If I
go straight in to the development server everything is great!  What am
I missing?

Thanks.

Seth


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: session variable

2007-02-23 Thread Seth Buntin

WowI just needed to read a little bit further.

Thanks.

Seth


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: session variable

2007-02-23 Thread Seth Buntin

So I can have for instance:

request.session["order_items"] = []

and then in different view I can have:

request.session["order_items"].append(1)

and that append to the session variable?


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



session variable

2007-02-22 Thread Seth Buntin

Can I have a list as a session variable?

I want to add potential products to a session list and if an order is
placed iterate over that list and add them to an order.

Or are there better ways to do this?

Thanks.

Seth


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Ordering problems

2006-08-25 Thread Seth Buntin

I have this in my model:

class Syllabus(models.Model):
program = models.ForeignKey(SyllabusProgram)
course_number = models.IntegerField()

def __str__(self):
return "%s %s" %(self.program, self.course_number)

class Meta:
ordering = ['program', 'course_number', ]

It orders correctly in my view but when I go to the Admin I get this
error:

OperationalError at /ncate/manager/admin/manager/syllabus/
(1054, "Unknown column 'manager_syllabusprogram.id' in 'order clause'")
Request Method: GET
Request URL:
http://coekate.murraystate.edu/ncate/manager/admin/manager/syllabus/
Exception Type: OperationalError
Exception Value:(1054, "Unknown column 'manager_syllabusprogram.id'
in 'order clause'")

What am I doing wrong?


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Change App name in Django Admin

2006-08-22 Thread Seth Buntin

Can you change the displayed name of the app in the Django admin?


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Reproduce admin search functionality

2006-08-21 Thread Seth Buntin

I got it!:

def search(request):
keywords = request.GET['keyword'].split()
sql = ""
first = True
for word in keywords:
if first:
sql += "(title LIKE '%%" + word + "%%' OR description 
LIKE '%%" +
word + "%%')"
first = False
else:
sql += " AND (title LIKE '%%" + word + "%%' OR 
description LIKE '%%"
+ word + "%%')"

results_list = Resource.objects.extra(where=[sql])
return render_to_response('tick/base_results.html', {'results_list':
results_list})


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Click the back button messes me up...

2006-08-17 Thread Seth Buntin

Now I really feel stupid.  Thanks James.


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Click the back button messes me up...

2006-08-17 Thread Seth Buntin

So how would I send my context with that redirect?  Or am I thinking
about it the wrong way.  The problem is I have a search field and in
the results there are links.  If someone clicks a link it displays the
page but when they click back it give the "Page expired" message.


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Click the back button messes me up...

2006-08-17 Thread Seth Buntin

So I need to redirect to another page and send the contents of the
POSTed data somehow?


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Click the back button messes me up...

2006-08-17 Thread Seth Buntin

Can I solve the IE back button issue (pages needing to be refreshed
with the posted data) with a simple cache system?


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Issue with template tags...

2006-08-16 Thread Seth Buntin

Your right.  My bad.  I must have read it here in the newsgroup.


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Issue with template tags...

2006-08-16 Thread Seth Buntin

Thanks Adrian. That was it.  I think I got that from the documentation.
 Should it be changed?


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Issue with template tags...

2006-08-16 Thread Seth Buntin

I have created a custom template tag that gets specific information
from the database:

linkroll.py:
from django.core import template
from seth_blog.blog.models import Linkroll
register = template.Library()

def linkroll():
links = Linkroll.objects.all()[:5]
return {'links': links}

# Here, register is a django.template.Library instance, as before
register.inclusion_tag('linkroll.html')(linkroll)

I assume that is right.  It is located under app/templatetags/.  The
templatetags folder also contains an __init__.py file.  I have the
linkroll.html file in my applications template directory.I also put
{% load linkroll %} in my base.html template.  When I go to the site I
get this error:

TemplateSyntaxError at /
'linkroll' is not a valid tag library: Could not load template library
from django.templatetags.linkroll, cannot import name template
Request Method: GET
Request URL:http://localhost:8000/
Exception Type: TemplateSyntaxError
Exception Value:'linkroll' is not a valid tag library: Could not load
template library from django.templatetags.linkroll, cannot import name
template
Exception Location:
/usr/lib/python2.4/site-packages/django/template/defaulttags.py in
load, line 692

What am I not doing right?


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Secret Key

2006-08-15 Thread Seth Buntin

This might be a stupid question (and maybe off topic) but what does the
secret key do and why is it there?


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Site-Wide views

2006-08-15 Thread Seth Buntin

Yeah I just want dynamic data on every page, so I guess the custom
template tag will do it.  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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Site-Wide views

2006-08-15 Thread Seth Buntin

Is possible to have a view (and correct me if I am using my teminology
wrong) that is accessible site-wide?

For example:
I have a blog that on the sidebar lists links that I put into the
system when I find them.  Is it possible to fill that block in the
site.html file (base template file) without having to get the
information from the database on each different page?


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Multiple applications One server Big problem.

2006-08-15 Thread Seth Buntin

Not a problem.


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Multiple applications One server Big problem.

2006-08-15 Thread Seth Buntin

Thanks Joseph.

That was it.

Seth


Joseph Kocherhans wrote:
> On 8/15/06, Seth Buntin <[EMAIL PROTECTED]> wrote:
> >
> > When I restart my server, and go to /ncate/manager I get the right
> > application.  But if I log out of that application and go to
> > /kate/tick/ I get the /ncate/manager application.  This will happen
> > visa-versa.  I first go to /kate/tick, logout, go to /ncate/manager and
> > get the /kate/tick/ application.
>
> You'll want to add the PythonInterpreter directive to each Location.
> See this link for details:
>
> http://www.djangoproject.com/documentation/modpython/#multiple-django-installations-on-the-same-apache
> 
> Joseph


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Multiple applications One server Big problem.

2006-08-15 Thread Seth Buntin

What?!


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Multiple applications One server Big problem.

2006-08-15 Thread Seth Buntin

I am having an issue with my implementation of Django.  First of  my
DjangoAppz file directory is outside of the webroot directory.  That
folder contains two application folders, "tick", "ncate".

I have these two declaratives in my httpd.conf file:


SetHandler mod_python
PythonHandler django.core.handlers.modpython
PythonPath "[r'w:\DjangoAppz'] + sys.path"
SetEnv DJANGO_SETTINGS_MODULE ncate.settings
PythonDebug On



SetHandler mod_python
PythonHandler django.core.handlers.modpython
PythonPath "[r'w:\DjangoAppz'] + sys.path"
SetEnv DJANGO_SETTINGS_MODULE kate.settings
PythonDebug On


When I restart my server, and go to /ncate/manager I get the right
application.  But if I log out of that application and go to
/kate/tick/ I get the /ncate/manager application.  This will happen
visa-versa.  I first go to /kate/tick, logout, go to /ncate/manager and
get the /kate/tick/ application.

Any ideas?


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Trouble with view and for loop

2006-08-11 Thread Seth Buntin

The indention is right.  I figured out the issue but still have the
problem.  It is the for loop around levels and the for loop around
content area.  Can a for loop be within another for loop.  I would
think so but I have never done it before.


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Trouble with view and for loop

2006-08-11 Thread Seth Buntin

Here is my view:
def search(request):
results =
Resource.objects.filter(title__icontains=request.POST['keyword'],
description__icontains=request.POST['keyword'])
keyword = request.POST['keyword']
return render_to_response('tick/base_search.html', {'results':
results, 'keyword': keyword,})

Here is my template file "tick/base_search.html":

{% block content %}
{% for result in results %}

{{ result.title }}
{{ result.description }}
Grade: {% for level in 
result.levels
%} {{ level.name }} {% endfor %} | Content Area: {% for
content_area in result.content_areas %} {{ content_area.name }} {%
endfor %}
Display 
Full
Resource Details

{% endfor %}
{% endblock %}

I am getting this error:
Template error

In template W:/DjangoAppz/kate/templates/tick/base_search.html, error
at line 4
Caught an exception while rendering: iteration over non-sequence
1   {% extends "tick/base.html" %}
2
3   {% block content %}
4   {% for result in results %}
5   
6   {{ result.title }}
7   {{ result.description }}
8   Grade: {% for level in
result.levels %} {{ level.name }} {% endfor %} | Content
Area: {% for content_area in result.content_areas %} {{
content_area.name }} {% endfor %}
9   Display Full
Resource Details
10  
11  {% endfor %}
12  {% endblock %}


Here is my traceback:

Traceback (most recent call last):
File "w:\django_src\django\template\__init__.py" in render_node
  706. result = node.render(context)
File "w:\django_src\django\template\defaulttags.py" in render
  118. nodelist.append(node.render(context))
File "w:\django_src\django\template\defaulttags.py" in render
  95. values = list(values)

  TypeError at /kate/tick/search/
  iteration over non-sequence

Any ideas?  It might be simple this is my first try at views.


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Admin Manipulators

2006-08-08 Thread Seth Buntin

Ok.  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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Admin Manipulators

2006-08-08 Thread Seth Buntin

Can this be done?  I just can't seem to find any documentation on
extending the admin module this way.


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: manage.py syncdb error

2006-08-08 Thread Seth Buntin

Are you trying to insert initial data into you db when running this
script?


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Admin Manipulators

2006-08-07 Thread Seth Buntin

Can I extend the admin manipulator?  I want to change one ManyToMany
select box to a text field.

Seth


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Tagging.

2006-08-07 Thread Seth Buntin

Can I extend the form Manipulator or something that will allow me to
change the ManyToMany select field with a text field?  I think I have
seen some examples but I don't quite know how to extend it.


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Tagging.

2006-08-07 Thread Seth Buntin

Thanks Eric.

I have one question though.  If I have a model named Resources how do I
get a field in that that will allow me to define my tags?  I put:

tags = models.GenericRelation(ObjectTag)

But when I go to the admin I get a Formfield not found or something
like that.

Seth


nkeric wrote:
> hi Seth,
>
> here is a link to the tagging models I've done in my project, you may
> want to have a look :)
>
> http://groups.google.com/group/django-users/browse_thread/thread/50b6712cd7738d9d/4b654db1ecaf4b2f?lnk=gst=ObjectTag=1#4b654db1ecaf4b2f
>
> Here is the basic ideas of my tagging app:
>
>  1. a table stores all the tag strings, each tag string is unique
>  2. a table stores the relationship between a content object and its
> tags, a content object could be associated with a tag for **once**;
>  3. another table stores user related info, e.g, who tags which content
> object with what tags.
>
> with this design, there is no redudent data. and with the
> GenericRalation trick, you can tag anything inside your project.
>
> In my actual implementation, my tagging app could deal with tags like
> "WEB2.0" "web 2.0" "wEB$%#2.0" and treat them as one :) since however
> the user writes the "web 2.0", they are the same.
> 
> HTH
> 
> - Eric


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Tagging.

2006-08-07 Thread Seth Buntin

I have a Django project (almost complete) that needs to implement
tagging.  In a previous framework I used a plugin that made this really
easy.  I don't need much.  What was implemented in the framework that
"must not be named" was a simple text field.  The tags where separated
by a space and grouped together with quotes (only if there were more
than one word in the tag).  I think I am going to have to write this
from scratch but I don't know where to start.  Can someone point me in
the right direction?

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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Problem with serializers

2006-08-04 Thread Seth Buntin

Thanks Jacob.

I copied that text off of a webpage and the quotes messed me up.  I
guess I should have realized that when TextMate didn't color them
correctly.

Seth


Jacob Kaplan-Moss wrote:
> On Aug 4, 2006, at 12:05 PM, Seth Buntin wrote:
> > DeprecationWarning: Non-ASCII character '\xe2' in file
> > /Users/sethbuntin/django_projects/kate/tick/ajax_views.py on line 6,
> > but no encoding declared; see http://www.python.org/peps/pep-0263.html
> > for details
> >   return getattr(__import__(mod_name, '', '', ['']), func_name)
>
> That's your problem right there; you've got a weird character in your
> code somewhere.  Turn on "Show Invisibles" (or whatever your editor's
> equivalent is) and you should see it.
>
> Oh, and also:
>
> > data = serializers.serialize("xml", SubFocus.objects.all())
> > return HttpResponse(data, mimetype="text/javascript")
>
> You're using the XML serializer, but returning a mimetype of "text/
> javascript".  One of those is probably wrong.
> 
> Jacob


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Problem with serializers

2006-08-04 Thread Seth Buntin

I just realized that I am also getting an error in my console:

/Users/sethbuntin/django_src/django/core/urlresolvers.py:118:
DeprecationWarning: Non-ASCII character '\xe2' in file
/Users/sethbuntin/django_projects/kate/tick/ajax_views.py on line 6,
but no encoding declared; see http://www.python.org/peps/pep-0263.html
for details
  return getattr(__import__(mod_name, '', '', ['']), func_name)
[04/Aug/2006 12:05:15] "GET /tick/ajax/subfocus/ HTTP/1.1" 500 42746


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Problem with serializers

2006-08-04 Thread Seth Buntin

Here is my setup

ajax_views.py:
from django.core import serializers

def subfocus(request):
data = serializers.serialize("xml", SubFocus.objects.all())
return HttpResponse(data, mimetype="text/javascript")

urls.py:
(r'^tick/ajax/subfocus', 'kate.tick.ajax_views.subfocus'),

When I go to http://localhost:8000/tick/ajax/subfocus I get a
SyntaxError:
SyntaxError at /tick/ajax/subfocus/
invalid syntax (ajax_views.py, line 7)

Request Method: GET
Request URL:http://localhost:8000/tick/ajax/subfocus/
Exception Type: SyntaxError
Exception Value:invalid syntax (ajax_views.py, line 7)

Line 7 being the "data = ..." lin in the ajax_views.py file.  I think I
am doing this right.  I just created this view so I could get data for
an AJAX request.  What is the issue?

Thanks.
Seth


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Ordering by __str__

2006-07-28 Thread Seth Buntin

It is the same model.

Seth


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Ordering by __str__

2006-07-28 Thread Seth Buntin

I have a model class that returns the string as below:

def __str__(self):
return "%s %s" % (self.program, self.course_number)

In the list_display I have:
list_display = ('__str__', 'uploaded')

I want to be able to order by my __str__ value, but I don't know how.

Can this be done?  I have tried doing:
ordering = ['program', 'course_number']

But I get errors like "program.name doesn't exist" but it does and
works fine.

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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



FieldDoesNotExist

2006-07-27 Thread Seth Buntin

I keep on getting "FieldDoesNotExist" errors.  They are saying that a
field, in this case "p", doesn't exist.  I don't know what it is
talking about because I am not trying to call "p".

Any ideas?


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



__str__ concatenation

2006-07-27 Thread Seth Buntin

I am trying to display this EDU 103 using:

def __str__(self):
return self.program, " ", self.course_number

program (EDU) is a foreign key and 103 is an integer field.  I get
this:

(, ' ', 103L)

What do I need to do? If it is a python (not Django) issue just tell
me.  I am new to python and want to learn it more and I will just find
it out.

Thanks.
Seth


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Trying to get app working with Apache with mod_python

2006-07-26 Thread Seth Buntin

I figured it out.

I should have had:

(r'admin/', include('django.contrib.admin.urls')),

not:

(r'^admin/', include('django.contrib.admin.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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Trying to get app working with Apache with mod_python

2006-07-26 Thread Seth Buntin

Here is the error and apache conf.  I don't know what the problem is,
it is the first time I have tried to setup an app through Apache and
not running the development server.  Do I need to modify my urls.py?

Error:

Using the URLconf defined in ncate.urls, Django tried these URL
patterns, in this order:

   1. ^admin/

The current URL, /ncate/manager/, didn't match any of these.

Apache Conf:

SetHandler mod_python
PythonHandler django.core.handlers.modpython
PythonPath "['C:/DjangoAppz'] + sys.path"
SetEnv DJANGO_SETTINGS_MODULE ncate.settings
PythonDebug On



--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Select Box filter

2006-07-25 Thread Seth Buntin

You know...after I posted the second reply...i thought a second and
realized this would be the solution.  Thanks.

Seth


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Select Box filter

2006-07-24 Thread Seth Buntin

I guess what I don't understand is the "hook" part.  How do I change
the onChange event for the auto-generated field in the admin area?


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Select Box filter

2006-07-24 Thread Seth Buntin

I was wondering if anyone has found a way to filter a select box
depending on the value of another select box.  This is really easy with
javascript but I want to use the admin module.  Any suggestions?


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



How customizable is admin?

2006-07-22 Thread Seth Buntin

I was wondering how customizable the admin module is (without changing
admin for other applications).  I want to have an AJAX'ed drill-down
for some drop-down boxes.  Has anyone done this and is it easily done
without have to "repeat" myself?


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Create default data at syncdb

2006-07-21 Thread Seth Buntin

Just what I needed.  Thanks again.


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Create default data at syncdb

2006-07-21 Thread Seth Buntin

Is there a way to create data from a model when running syncdb or
something?  I have a couple of tables that hold the same data and when
I during development I sometime reset my data can I put this in the
model or something and it create the data when the tables are created?


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Users in Django admin

2006-07-21 Thread Seth Buntin

Thanks Adrian.  BTW nice framework!!!  I have thouroghly enjoyed
working with it.


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Users in Django admin

2006-07-21 Thread Seth Buntin

I am new to Django (Rails convert) and I have a quick question.  I am
trying to build a basic CMS for my company.  For each entry into the
system I want to align the user that is logged in to the entry.  I have
a foreign key for the user which works because when I go to the admin I
get a drop-down list of the users but I want it to select the user that
is logged in.  Can I do this with the way the admin is implemented?


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---