Re: Registering a user profile

2012-02-14 Thread Kevin Anthony
Did you include the module in your settings.py?

Kevin
Please excuse brevity, sent from phone
On Feb 14, 2012 1:27 PM, "Christos Jonathan Hayward" <
christos.jonathan.hayw...@gmail.com> wrote:

> Thank you, little master and creecode. I tried 'pim.UserProfile' and
> 'pim.models.UserProfile' and they both errored out. With 'pim.UserProfile',
> which it looks like the documentation calls for, I get:
>
> SiteProfileNotAvailable at /
>
>
> Unable to load the profile model, check AUTH_PROFILE_MODULE in your project 
> settings
>
>  Request Method: GET Request URL: http://localhost:8000/ Django Version:
> 1.3.1 Exception Type: SiteProfileNotAvailable Exception Value:
>
>
> Unable to load the profile model, check AUTH_PROFILE_MODULE in your project 
> settings
>
> Exception Location: 
> /usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/contrib/auth/models.py
> in get_profile, line 380 Python Executable:/usr/local/bin/python Python
> Version:2.7.0 Python Path:
>
>
> ['/Users/jonathan/pim',
>  
> '/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/distribute-0.6.14-py2.7.egg',
>  
> '/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/pip-0.8.1-py2.7.egg',
>  '/usr/local/Cellar/python/2.7/lib/python27.zip',
>  '/usr/local/Cellar/python/2.7/lib/python2.7',
>  '/usr/local/Cellar/python/2.7/lib/python2.7/plat-darwin',
>  '/usr/local/Cellar/python/2.7/lib/python2.7/plat-mac',
>  '/usr/local/Cellar/python/2.7/lib/python2.7/plat-mac/lib-scriptpackages',
>  '/usr/local/Cellar/python/2.7/lib/python2.7/lib-tk',
>  '/usr/local/Cellar/python/2.7/lib/python2.7/lib-old',
>  '/usr/local/Cellar/python/2.7/lib/python2.7/lib-dynload',
>  '/usr/local/Cellar/python/2.7/lib/python2.7/site-packages',
>  '/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/PIL',
>  '/usr/local/lib/python2.7/site-packages',
>  
> '/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg-info']
>
> Server time: Tue, 14 Feb 2012 12:17:42 -0600
>
>
> With 'pim.models.UserProfile' I get a slightly different:
>
> SiteProfileNotAvailable at /
>
>
> app_label and model_name should be separated by a dot in the 
> AUTH_PROFILE_MODULE setting
>
>  Request Method: GET Request URL: http://localhost:8000/ Django Version:
> 1.3.1 Exception Type: SiteProfileNotAvailable Exception Value:
>
>
> app_label and model_name should be separated by a dot in the 
> AUTH_PROFILE_MODULE setting
>
> Exception Location: 
> /usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/contrib/auth/models.py
> in get_profile, line 373 Python Executable:/usr/local/bin/python Python
> Version:2.7.0 Python Path:
>
>
> ['/Users/jonathan/pim',
>  
> '/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/distribute-0.6.14-py2.7.egg',
>  
> '/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/pip-0.8.1-py2.7.egg',
>  '/usr/local/Cellar/python/2.7/lib/python27.zip',
>  '/usr/local/Cellar/python/2.7/lib/python2.7',
>  '/usr/local/Cellar/python/2.7/lib/python2.7/plat-darwin',
>  '/usr/local/Cellar/python/2.7/lib/python2.7/plat-mac',
>  '/usr/local/Cellar/python/2.7/lib/python2.7/plat-mac/lib-scriptpackages',
>  '/usr/local/Cellar/python/2.7/lib/python2.7/lib-tk',
>  '/usr/local/Cellar/python/2.7/lib/python2.7/lib-old',
>  '/usr/local/Cellar/python/2.7/lib/python2.7/lib-dynload',
>  '/usr/local/Cellar/python/2.7/lib/python2.7/site-packages',
>  '/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/PIL',
>  '/usr/local/lib/python2.7/site-packages',
>  
> '/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg-info']
>
> Server time: Tue, 14 Feb 2012 12:25:41 -0600
>
>
> "pim" is the name of the project. Do I need to create a distinct
> application within that project?
>
> On Tue, Feb 14, 2012 at 12:20 PM, creecode  wrote:
>
>> Hello Jonathan,
>>
>> See the "Storing additional information about 
>> users"
>> section in the docs.  There it mentions the expected format of
>> AUTH_PROFILE_MODULE.
>>
>> I suspect what you need to do is wrap your UserProfile model up in it's
>> own app if it isn't in one already.  Alternately you need to change the
>> "models" in AUTH_PROFILE_MODULE to the name of your app.
>>
>> Let us know if that works for you.
>>
>> Toodle-lo..
>> creecode
>>
>>
>>  --
>> 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/-/HSX4NGpn66kJ.
>>
>> 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.
>>
>
>
>
> --
> [image: Christos Jonathan Hayward] 
> Christos Jonathan Hayward, an Orthodox Christian autho

Easy Blog

2012-05-11 Thread Kevin Anthony
Hello,
I am a student and i have an existing django website that i'd like to
add a blog to, what is the simplest way to do this?
Also, it would be nice if i could use a standared CSS file to skin the blog
to look like the rest of my website.

Thanks in advance
Kevin

-- 
Thanks
Kevin Anthony
www.NoSideRacing.com

Do you use Banshee?
Download the Community Extensions:
http://banshee.fm/download/extensions/

-- 
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/Python Circular model reference

2012-06-01 Thread Kevin Anthony
Define it in one and back reference it in the other

Kevin
Please excuse brevity, sent from phone
On Jun 1, 2012 12:38 PM, "Jak"  wrote:

> The problem that I'm having is that the model "Question" is not
> defined since I am referencing it after I use it in the Answer
> model.
>
>
> Thanks
>
> Jak
>
> On Jun 1, 12:08 pm, Javier Guerra Giraldez  wrote:
> > On Fri, Jun 1, 2012 at 10:42 AM, Jak  wrote:
> > > Each answer has
> > > a question, and each question has an answer
> >
> > use OneToOneField relationships
> > (https://docs.djangoproject.com/en/1.4/ref/models/fields/#onetoonefield)
> >
> > --
> > Javier
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

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



Re: Update database with model changes

2012-06-07 Thread Kevin Anthony
Use south

Kevin
Please excuse brevity, sent from phone
On Jun 7, 2012 2:05 PM, "Robert Steckroth" 
wrote:

> Hey Gang, is there a way to update the database with a syncdb or
> other command after a model has been changed? I added a field
> the the model after the syncdb.
>
>
> --
> Bust0ut, Surgemcgee: Systems Engineer ---
> PBDefence.com
> BudTVNetwork.com
> RadioWeedShow.com
> "Bringing entertainment to Unix"
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

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



Re: cookie based sessions or no?

2012-06-13 Thread Kevin Anthony
If you want to see an example, I have a Django app that sends json to both
an andriod app and a desktop app written in C

Django App: http://github.com/KevinAnthony/rchip_website

Desktop App: http://github.com/KevinAnthony/rchip

Android App: http://github.com/KevinAnthony/rchip_android


On Jun 13, 2012 1:30 PM, "Kurtis Mullins"  wrote:

> I wouldn't authenticate on every request. That seems like a lot
> of unnecessary work. Just authenticate once and use Cookies/Authentication
> Tokens to sustain the session. It's already built in so it's pretty easy to
> do. They even have a code snippet that shows how to use a special HTTP
> Header to keep this authenticated session going without relying on dumping
> the {% csrf_token %} on every response. It's written in Javascript but I'm
> sure you could take the same approach and include it in your Desktop
> application.
>
> On Wed, Jun 13, 2012 at 1:24 PM, Mike  wrote:
>
>> I'm working on a desktop app that will communicate with a server.  I have
>> some experience with Django and with the user authentication system but I
>> haven't deployed a Django app with authentication yet.  I'm planning to use
>> django for the server side component of this desktop app and the two will
>> communicate over SSL with JSON.  Using Django, I can authenticate users and
>> hold onto the cookie on the client side for authenticating the views that
>> need it before they return their JSON.  I could also send the userid and
>> password in every GET or POST.  Which method is better?  Is either more
>> secure?  Using cookies I can take advantage of stuff built into Django such
>> as the @login_required() decorator.
>>
>> --
>> 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/-/bt4FuP1zmYEJ.
>> To post to this group, send email to django-users@googlegroups.com.
>> To unsubscribe from this group, send email to
>> django-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/django-users?hl=en.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

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



Cacheing and JSON

2012-07-06 Thread Kevin Anthony
I have a JSON api exposed writen in django, in which remote devices ask if
there are any commands for the device.
 And 99% of the time, the answer is no.
I've played around with database cacheing, and the problem i've run into
is, it can take several minutes until the new command gets sent to the
device.

Does anyone have an idea of the best way of doing something like this.

The commands come in via JSON also, if that helps.

-- 
Thanks
Kevin Anthony
www.NoSideRacing.com

Do you use Banshee?
Download the Community Extensions:
http://banshee.fm/download/extensions/

-- 
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: Plotting a line graph

2012-07-30 Thread Kevin Anthony
I would look into the Google graph API
https://developers.google.com/chart/

On Mon, Jul 30, 2012 at 10:47 AM, Sithembewena Lloyd Dube  wrote:

> Hi all,
>
> I need to draw a simple line graph do to the following:
> - draw a simple line from y, x = 0 going towards x++. In other words, the
> line should begin at bottom left and run diagonally towards upper right.
>
> I have tried looking at ReportLab but I do not have enough time to dig
> through the docs. What plotting solution would anyone suggest?
>
> PS: An image of what I need to do is attached. X axis is miles (or points)
> won and Y axis is items receivable for those points, so if a user has 1
> miles a green dot should appear on the line demarcating 1 miles.
>
> --
> Regards,
> Sithembewena Lloyd Dube
>
> --
> 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.
>



-- 
Thanks
Kevin Anthony
www.NoSideRacing.com

Do you use Banshee?
Download the Community Extensions:
http://banshee.fm/download/extensions/

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



HttpResponseNotModified returning 200 code

2012-08-22 Thread Kevin Anthony
Here is my code:

id = get_id(request)
 if id is not None:
 host = request.GET['host']
 if host!=None:
 command =
command_queue.objects.all().filter(destination_hostname=host,user__id=id)
 if not command.count():
 HttpResponseNotModified()
 retval =
JSONResponse(command.values('command','command_text'),Extra={"success":True})
 command.delete()
 return retval
return HttpResponseForbidden()

I know it's getting to the HttpResponseNotModified, but I'm still getting a
HTTP status code of 200.

Can someone point me in the correct direction?
-- 
Thanks
Kevin Anthony
www.NoSideRacing.com

Do you use Banshee?
Download the Community Extensions:
http://banshee.fm/download/extensions/

-- 
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: HttpResponseNotModified returning 200 code

2012-08-22 Thread Kevin Anthony
wow, that's embarrassing.  thanks.

On Wed, Aug 22, 2012 at 4:16 PM, Alexis Roda <
alexis.roda.villalo...@gmail.com> wrote:

> Al 22/08/12 21:36, En/na Kevin Anthony ha escrit:
>
>> Here is my code:
>>
>> id = get_id(request)
>>   if id is not None:
>>   host = request.GET['host']
>>   if host!=None:
>>   command =
>> command_queue.objects.all().**filter(destination_hostname=**
>> host,user__id=id)
>>   if not command.count():
>>   HttpResponseNotModified()
>>   retval =
>> JSONResponse(command.values('**command','command_text'),**
>> Extra={"success":True})
>>   command.delete()
>>   return retval
>>  return HttpResponseForbidden()
>>
>> I know it's getting to the HttpResponseNotModified, but I'm still
>> getting a HTTP status code of 200.
>>
>> Can someone point me in the correct direction?
>>
>
> return HttpResponseNotModified()
>
>
>
> HTH
>
> --
> 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+unsubscribe@**
> googlegroups.com .
> For more options, visit this group at http://groups.google.com/**
> group/django-users?hl=en<http://groups.google.com/group/django-users?hl=en>
> .
>
>


-- 
Thanks
Kevin Anthony
www.NoSideRacing.com

Do you use Banshee?
Download the Community Extensions:
http://banshee.fm/download/extensions/

-- 
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: bar charts

2011-11-06 Thread Kevin Anthony
Google charts api

Kevin
Please excuse brevity, sent from phone
On Nov 6, 2011 11:57 PM, "kenneth gonsalves"  wrote:

> hi,
>
> what do people use to display bar charts in their sites?
> --
> regards
> Kenneth Gonsalves
>
> --
> regards
> Kenneth Gonsalves
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

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



Authentication over JSON

2012-01-07 Thread Kevin Anthony
I have a small exposed json API, currently it doesn't require
authentication, but i'd like to integrate it with django's authentication.
 A quick google search came up empty, and i was wondering if anyone had
any recommendations on how to do this?

-- 
Thanks
Kevin Anthony
www.NoSideRacing.com

Do you use Banshee?
Download the Community Extensions:
http://banshee.fm/download/extensions/

-- 
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: Authentication over JSON

2012-01-08 Thread Kevin Anthony
https://docs.djangoproject.com/en/1.3/topics/auth/#authentication-in-web-requests

On Sun, Jan 8, 2012 at 12:20 PM, Stodge  wrote:

> This link is giving me a Page Not Found.
>
> On Jan 7, 1:10 pm, Michael Elkins  wrote:
> > On Sat, Jan 07, 2012 at 11:52:26AM -0500, Kevin Anthony wrote:
> > >I have a small exposed json API, currently it doesn't require
> > >authentication, but i'd like to integrate it with django's
> authentication.
> > > A quick google search came up empty, and i was wondering if anyone had
> > >any recommendations on how to do this?
> >
> > I've done this before using forms and POST, but you could easily
> > put the user credentials in your json object and use
> > django.contrib.auth as described here:
> >
> > https://docs.djangoproject.com/en/1.3/topics/Aauth/#authentication-in...
>
> --
> 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.
>
>


-- 
Thanks
Kevin Anthony
www.NoSideRacing.com

Do you use Banshee?
Download the Community Extensions:
http://banshee.fm/download/extensions/

-- 
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: Authentication over JSON

2012-01-08 Thread Kevin Anthony
I'm having a problem with authentication from libcurl in C.  This works
fine from my android/iPhone apps, and from the browser, but libcurl can't
authenticate.
here's how i'm doing it
in django:
authentication function:
user = authenticate(username=username, password=password)
request.session['member_id'] = user.id
typical user function:
id = request.session['member_id']
if id is not None:
Do something useful
else:
Return Error Message

in libcurl: auth function
CURL *session = curl_easy_init(); if (session) { curl_easy_setopt(session,
CURLOPT_URL, url); curl_easy_perform(session); } g_free(url);
curl_easy_cleanup(session);
generic function:
*session = curl_easy_init(); if (session) { char* url =
g_strconcat(URL,"/getremotedevice/",NULL); printf("url:%s\n",url);
curl_easy_setopt(session, CURLOPT_URL, url); curl_easy_setopt(session,
CURLOPT_WRITEFUNCTION, get_active_decives_callback);
curl_easy_perform(session); g_free(url); } curl_easy_cleanup(session);


Am i doing something wrong?

Thanks
Kevin


On Sun, Jan 8, 2012 at 12:22 PM, Kevin Anthony wrote:

>
> https://docs.djangoproject.com/en/1.3/topics/auth/#authentication-in-web-requests
>
> On Sun, Jan 8, 2012 at 12:20 PM, Stodge  wrote:
>
>> This link is giving me a Page Not Found.
>>
>> On Jan 7, 1:10 pm, Michael Elkins  wrote:
>> > On Sat, Jan 07, 2012 at 11:52:26AM -0500, Kevin Anthony wrote:
>> > >I have a small exposed json API, currently it doesn't require
>> > >authentication, but i'd like to integrate it with django's
>> authentication.
>> > > A quick google search came up empty, and i was wondering if anyone had
>> > >any recommendations on how to do this?
>> >
>> > I've done this before using forms and POST, but you could easily
>> > put the user credentials in your json object and use
>> > django.contrib.auth as described here:
>> >
>> > https://docs.djangoproject.com/en/1.3/topics/Aauth/#authentication-in.
>> ..
>>
>> --
>> 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.
>>
>>
>
>
> --
> Thanks
> Kevin Anthony
> www.NoSideRacing.com
>
> Do you use Banshee?
> Download the Community Extensions:
> http://banshee.fm/download/extensions/
>
>


-- 
Thanks
Kevin Anthony
www.NoSideRacing.com

Do you use Banshee?
Download the Community Extensions:
http://banshee.fm/download/extensions/

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



Django Static Files

2011-06-24 Thread Kevin Anthony
I'm having a problem setting up my django static files,
my static files root is at:
/var/www/mysite/static/
here's my alias info
AliasMatch ^/([^/]*\.css) /var/www/mysite/static/$1

Order deny,allow
Allow from all


This is from my settings.py
STATIC_ROOT = '/var/www/mysite/static/'
STATIC_URL = '/static/'

and here is from base.html

which resolves to this on the website


except it 404's from access log
***.***.***.*** - - [24/Jun/2011:23:53:45 -0400] "GET /static/
style.css HTTP/1.1" 404 1322 "http://***.***.***.***/"; "Mozilla/5.0
(X11; Linux i686) AppleWebKit/534.30 (KHTML, like Gecko) Ubuntu/11.04
Chromium/12.0.742.91 Chrome/12.0.742.91 Safari/534.30"

I'm sure i'm missing something stupid, but i can't figure out why it
won't serve with apache
When I serve it using python manage 0.0.0.0:80 the css doesn't 404

Can someone please help me?

Thanks
Kevin Anthony

-- 
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: rss feed question

2011-06-24 Thread Kevin Anthony
http://www.feedparser.org/

On Sat, Jun 25, 2011 at 12:21 AM, raj  wrote:
> I was trying to follow the following guide:
> https://docs.djangoproject.com/en/dev/ref/contrib/syndication/?from=olddocs
> and I had some questions.
>
> I'm not quite sure, but it seems like this guide is showing how to
> create your own feed. How would I go about retrieving the feed instead
> of creating it?
> I want to implement a feed reader on my site that obtains rss feeds
> from other websites.
> Thank you
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To post to this group, send email to django-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.
>
>



-- 
Thanks
Kevin Anthony
www.NoSideRacing.com

-- 
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 Static Files

2011-06-25 Thread Kevin Anthony
I sort of knew that
Can someone post their scrubed conf file?
On Jun 25, 2011 12:54 AM, "Andrew Brookins"  wrote:
> Sorry: posting from phones... Not always awesome.
>
> If the development server serves your static files, but Apache does not,
then the problem is likely somewhere in your Apache conf or server config.
>
> --
> 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/-/oOT5Kiyo5JcJ.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.
>

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



Json and django.contrib.auth.views.login

2011-07-19 Thread Kevin Anthony
i'm trying to use JSON on a website that also has a HTML frontend, but
when i enable this line in urls.py
url(r'^json/sendcommand/','rchip.views.json_send_command'),

i get this message
Caught ViewDoesNotExist while rendering: Tried json_command in module
rchip.views. Error was: 'module' object has no attribute
'json_command'

this is my login URL:
url(r'^accounts/login/$','django.contrib.auth.views.login',
{'template_name': 'main/login.html', }),

-- 
Thanks
Kevin Anthony
www.NoSideRacing.com

-- 
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: Json and django.contrib.auth.views.login

2011-07-19 Thread Kevin Anthony
No, it's there

def 
json_send_command(request,command_in=None,command_text_in=None,source_in=None,method_in=None):
and it works, if i navigate to
mysite.com/json/sendcommand/
i get the correct message telling me i didn't supply a command

On Tue, Jul 19, 2011 at 6:29 PM, Andre Terra  wrote:
> Kevin,
>
> Please open your views.py module located inside the rchip module and
> you will see there is no view named json_send_command.
>
> Please refer to that app's documentation to find more about the
> correct setup for your urls.
>
> Cheers,
> AT
>
> On 7/19/11, Kevin Anthony  wrote:
>> i'm trying to use JSON on a website that also has a HTML frontend, but
>> when i enable this line in urls.py
>> url(r'^json/sendcommand/','rchip.views.json_send_command'),
>>
>> i get this message
>> Caught ViewDoesNotExist while rendering: Tried json_command in module
>> rchip.views. Error was: 'module' object has no attribute
>> 'json_command'
>>
>> this is my login URL:
>> url(r'^accounts/login/$','django.contrib.auth.views.login',
>> {'template_name': 'main/login.html', }),
>>
>> --
>> Thanks
>> Kevin Anthony
>> www.NoSideRacing.com
>>
>> --
>> 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.
>>
>>
>
> --
> Sent from my mobile device
>
> --
> 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.
>
>



-- 
Thanks
Kevin Anthony
www.NoSideRacing.com

-- 
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: import django models without runing the server

2011-07-21 Thread Kevin Anthony
I found the best way to do this is
python manage.py < script.py
On Jul 21, 2011 8:00 PM, "Gelonida N"  wrote:
> On 07/18/2011 04:33 PM, bruno desthuilliers wrote:
>> On Jul 18, 3:33 pm, Alexander Crössmann
>>  wrote:
>>> Hi Malcom,
>>>
>>> I am not sure the management commands are what I want
>>
>> Strange enough, it seems that everyone starts by saying this and ends
>> up writing custom management commands ;)
>>
>
>
> I wrote quite some scripts meanwhile, which just set
> DJANGO_SETTINGS_MODULE and use then the models.
>
> I think if a django model is only a tiny part of a bigger script, then
> management commands are not really advantageous over management commands.
>
> Another issue, that I had is trying to use django under windows with
py2exe.
>
> Management commands are no more found, as django would require the
> python source code in order to find existing management commands.
>
> Perhaps there is an easy work around, but I am not aware of one.
>
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
"Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.
>

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



Django, Json and Android

2011-08-11 Thread Kevin Anthony
i'm trying to interface a django json page with an android application.
it seems most json applications written for android use
www.somepage.com/json.php?this=that&something=anotherthing

But that doesn't work with django,

Has anyone interfaced Django and Android? and if they did, is there
any reading material on it?

-- 
Thanks
Kevin Anthony
www.NoSideRacing.com

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



Deleting a model object then returning it

2011-08-15 Thread Kevin Anthony
Accoding to the documentation all i need to do is

object = someobject.objects.all().filter(somefield=somevalue)
print object
object.delete()
print object


and theoretically, object should be unchanged, since according to the
documentation:
Issues a SQL DELETE for the object. This only deletes the object in the
database; the Python instance will still be around, and will still have data
in its fields.

but when i run this command
i get
[]
[]

so the python instance looses it's data. Is there another way to delete the
data from SQL while still being about to use it in Python?
because after i delete it, i need to serialize the data to JSON

Thanks
Kevin Anthony

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