How to use both namespace and view paths in template url tags

2012-10-09 Thread Christian Jurk

Hi folks,
some time ago I've create a Django project which has become quite huge 
since then. Now I have a problem regarding the URL resolvers: The view 
paths have become quite long and I'd like to use namespaces to have 
shorter URL references within the templates. Once the "namespace" 
keyword argument has been added to the include() of my main urls.py, URL 
tags in the form of {% url path.to.view %} won't work anymore 
(NoReverseError), while {% url namespace:name %} works. As the apps are 
quite huge and I don't want to migrate all the URLs once, it would be 
nice to be able to use both ways for URLs.


A related example URL config may look like:

  from django.conf.urls.defaults import patterns, include, url

  urlpatterns = patterns('',
  url(r'^$', 'main.views.home'),
  url(r'^app1/', include('app1.urls, namespace='app1'))
  )

  # app1/urls.py
  urlpatterns = patterns('',
  url(r'^$', 'app1.views.home', name='home'),
  )

In that case, {% url app1:home %} will work, but {% url app1.views.home 
%} won't unless namespace is removed from the include() above.


Is there a way to get it working for both ways simultaneously?

--
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: object has no attribute '_state'

2012-10-09 Thread Tom Evans
On Fri, Oct 5, 2012 at 6:13 PM, Demian Brecht  wrote:
> Call me paranoid: https://fuhm.net/super-harmful/

One guys (well publicized) internet rant on why he dislikes super does
not necessarily mean he is correct. Even if he is, follow his own
advice:

  Subclasses must use super if their superclasses do

Django's model classes all use super, so should you when defining
subclasses derived from them.

Cheers

Tom

-- 
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: when is a Context Processor called?

2012-10-09 Thread Tom Evans
On Mon, Oct 8, 2012 at 3:28 PM, Stefano T
 wrote:
> Ok.
> so basically they are called before the rendering of a template.
>
> How can i have an object stored in the request object (if possible)?
>
> Something that lets me to do, in a view: request.user_profile...
>

You can define a simple middleware to put attributes on a request. Eg:

class MyMiddleware(object):
  def process_request(request):
request.profile = None
if request.user.is_authenticated():
  request.profile = request.user.get_profile()

See the documentation on middleware:

https://docs.djangoproject.com/en/1.4/topics/http/middleware/

Note that anything you put in TEMPLATE_CONTEXT_PROCESSORS is run
whenever you render a template, and anything in MIDDLEWARE_CLASSES
will be run on each request, so make sure the things you do in those
places are actually required every time you render a template /
process a request.

Cheers

Tom

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



Is there any small and easy website example available for Django?

2012-10-09 Thread Sarbjit singh
I am very new to Django and I just finished first seven chapters from 
Djangobook.com. I am wondering how can we implement a small static content 
website using Django. I mean website should have Home Page and few other 
pages along with some menu options. I searched a lot on google for example 
of this small website, but was not successful. I could only found examples 
for implementing Wiki, Blog but i am new to Django, so i am looking for an 
easy example.

Can anyone please point me to the link for such example?


-- 
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/-/z8aE98t9ZTUJ.
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: when is a Context Processor called?

2012-10-09 Thread Marek Brzóska
2012/10/9 Stefano Tranquillini 

> ok,
> but in this way when the user logs out i've to remove the object from the
> request, right?
> what if the user closes the browser?
>
No. The request object lives just for one request from browser. User clicks
tries to get certain url in browser, then django creates request object,
which you use in view - as first argument. With this middleware you will be
able to use request.profile if user has profile.
-- 

Marek Brzóska

brzoskama...@gmail.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: Is there any small and easy website example available for Django?

2012-10-09 Thread Jon Crowell
I have just installed Pinry, which is a nice small django project.  It
isn't static, though.  But it is small enough and simple enough that
you can easily look through the source code and understand what is
going on.  I think it is well-suited to learning Django.

You can find Pinry here:

http://overshard.github.com/pinry/
https://github.com/overshard/pinry

Installing on a Mac or Linux machine is straightforward.  (If you run
into trouble with JPEG image support, you can check out my blog post
at: 
http://joncrowell.org/2012/10/installing-pillow-1-7-7-and-solving-the-jpeg-support-not-available-and-_imaging-c-module-error-in-python-pil-errors-all-for-pinry/)

Jon


On Tue, Oct 9, 2012 at 1:46 AM, Sarbjit singh  wrote:
> I am very new to Django and I just finished first seven chapters from
> Djangobook.com. I am wondering how can we implement a small static content
> website using Django. I mean website should have Home Page and few other
> pages along with some menu options. I searched a lot on google for example
> of this small website, but was not successful. I could only found examples
> for implementing Wiki, Blog but i am new to Django, so i am looking for an
> easy example.
>
> Can anyone please point me to the link for such example?
>
>
> --
> 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/-/z8aE98t9ZTUJ.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.

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



Re: Django-SEO issue

2012-10-09 Thread vikas gupta
www.vyomtechnologies.com

On Friday, August 17, 2012 1:16:53 PM UTC-7, jondbaker wrote:
>
> I've successfully installed Django-SEO, but when I try to limit the number 
> of backends (I only need/want my admin to have 'path' and not the other 
> three) I am met with the following error:
> AttributeError at /admin/'NoneType' object has no attribute '_meta'
>
> I am using the documentation here: 
> http://django-seo.readthedocs.org/en/latest/reference/definition.html#Meta.backends
>
> *seo.py*
> from rollyourown import seo
>
> class AppMetadata(seo.Metadata):
> title = seo.Tag(head=True, max_length=68)
> description = seo.MetaTag(max_length=155)
>
> class Meta:
> backends = ('path',)
> #backends = ('path', 'modelinstance', 'model', 'view',) This works 
> but includes all default backends
>
> *admin.py*
> from django.contrib import admin
> from rollyourown.seo.admin import register_seo_admin
>
> from localsite.seo import AppMetadata
>
> register_seo_admin(admin.site, AppMetadata)
>

-- 
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/-/PuFIpucau3QJ.
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: when is a Context Processor called?

2012-10-09 Thread lacrymol...@gmail.com

For this example in particular, if you have django's UserMiddleware active, and 
that code assumes you do, you can always do request.user.get_profile() without 
needing to add this custom middleware

-Mensaje original-
De: Marek Brzóska
Enviados:  09/10/2012 09:28:16
Asunto:  Re: when is a Context Processor called?

2012/10/9 Stefano Tranquillini 

> ok,
> but in this way when the user logs out i've to remove the object from the
> request, right?
> what if the user closes the browser?
>
No. The request object lives just for one request from browser. User clicks
tries to get certain url in browser, then django creates request object,
which you use in view - as first argument. With this middleware you will be
able to use request.profile if user has profile.
-- 

Marek Brzóska

brzoskama...@gmail.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.


-- 
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: Is there any small and easy website example available for Django?

2012-10-09 Thread lacrymol...@gmail.com

First of all, djangobook.com is outdated, and not recommended, at least last 
time i checked it.

Secondly, for what seems to be your need, i'd recommend django-cms or some 
other cms application for django since without some kind of cms app, building a 
static content site would rapidly become, imo, very repetitive and highly 
hardcoded

-Mensaje original-
De: Sarbjit singh
Enviados:  09/10/2012 02:46:26
Asunto:  Is there any small and easy website example available for Django?

I am very new to Django and I just finished first seven chapters from 
Djangobook.com. I am wondering how can we implement a small static content 
website using Django. I mean website should have Home Page and few other 
pages along with some menu options. I searched a lot on google for example 
of this small website, but was not successful. I could only found examples 
for implementing Wiki, Blog but i am new to Django, so i am looking for an 
easy example.

Can anyone please point me to the link for such example?


-- 
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/-/z8aE98t9ZTUJ.
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: Problem with URL configuration - cannot use absolute URLs in my case

2012-10-09 Thread Stephen Anto
hi,

try to user url name instead of using hard coded url link. it may solve
your problem.

On Mon, Oct 8, 2012 at 8:21 PM, Ramiro Morales  wrote:

> On Sat, Oct 6, 2012 at 10:25 PM, Rohit Banga 
> wrote:
> >
> > So how do I code my url conf / view / template in order to be
> independent of
> > mywebsite name.
> > Is there anything wrong with the way I am wiring up my application.
>
> Take a look at the docs for:
>
> URL reversing:
> https://docs.djangoproject.com/en/dev/topics/http/urls/#reverse-resolution-of-urls
>
> Naming URLs:
> https://docs.djangoproject.com/en/dev/topics/http/urls/#naming-url-patterns
>
> These links point to the in-development version of the docs. This is
> because
> there has been a refactor lately to make presentation of these concepts
> more
> clear and because there hasn't been significant changes in this
> functionality
> since Django 1.4.
>
> HTH
>
> --
> Ramiro Morales
>
> --
> 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 & Regards
Stephen S



Website: www.f2finterview.com
Blog:  blog.f2finterview.com
Tutorial:  tutorial.f2finterview.com
Group:www.charvigroups.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: Is there any small and easy website example available for Django?

2012-10-09 Thread Jon Crowell
I am also using djangobook.com.  If it is outdated and not
recommended, then what resource should we use instead? Also, I find it
fairly relevant and easy to follow, so I'm curious what specific
objections there are to it. Incidentally, I'm using the version on
github that is being updated:
https://github.com/jacobian/djangobook.com

Jon


On Tue, Oct 9, 2012 at 9:28 AM, lacrymol...@gmail.com
 wrote:
>
> First of all, djangobook.com is outdated, and not recommended, at least last 
> time i checked it.
>
> Secondly, for what seems to be your need, i'd recommend django-cms or some 
> other cms application for django since without some kind of cms app, building 
> a static content site would rapidly become, imo, very repetitive and highly 
> hardcoded
>
> -Mensaje original-
> De: Sarbjit singh
> Enviados:  09/10/2012 02:46:26
> Asunto:  Is there any small and easy website example available for Django?
>
> I am very new to Django and I just finished first seven chapters from
> Djangobook.com. I am wondering how can we implement a small static content
> website using Django. I mean website should have Home Page and few other
> pages along with some menu options. I searched a lot on google for example
> of this small website, but was not successful. I could only found examples
> for implementing Wiki, Blog but i am new to Django, so i am looking for an
> easy example.
>
> Can anyone please point me to the link for such example?
>
>
> --
> 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/-/z8aE98t9ZTUJ.
> 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.



django socialauth username not showing correctly

2012-10-09 Thread psychok7
So i am using django socialauth and its working fine, except for the part 
where my usernames do not match my Facebook or twitter accounts after i log 
in. In other words for example if i my username is 'john', after i log in 
in my app it shows 'john820579c6960e4677'. What am i doing wrong? how can i 
make it look exactly like my Facebook account? 

-- 
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/-/vkirtfhwQnQJ.
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: Is there any small and easy website example available for Django?

2012-10-09 Thread Stephen Anto
hi,

www.f2finterview.com has been fully developed by Django.

On Tue, Oct 9, 2012 at 7:19 PM, Jon Crowell wrote:

> I am also using djangobook.com.  If it is outdated and not
> recommended, then what resource should we use instead? Also, I find it
> fairly relevant and easy to follow, so I'm curious what specific
> objections there are to it. Incidentally, I'm using the version on
> github that is being updated:
> https://github.com/jacobian/djangobook.com
>
> Jon
>
>
> On Tue, Oct 9, 2012 at 9:28 AM, lacrymol...@gmail.com
>  wrote:
> >
> > First of all, djangobook.com is outdated, and not recommended, at least
> last time i checked it.
> >
> > Secondly, for what seems to be your need, i'd recommend django-cms or
> some other cms application for django since without some kind of cms app,
> building a static content site would rapidly become, imo, very repetitive
> and highly hardcoded
> >
> > -Mensaje original-
> > De: Sarbjit singh
> > Enviados:  09/10/2012 02:46:26
> > Asunto:  Is there any small and easy website example available for
> Django?
> >
> > I am very new to Django and I just finished first seven chapters from
> > Djangobook.com. I am wondering how can we implement a small static
> content
> > website using Django. I mean website should have Home Page and few other
> > pages along with some menu options. I searched a lot on google for
> example
> > of this small website, but was not successful. I could only found
> examples
> > for implementing Wiki, Blog but i am new to Django, so i am looking for
> an
> > easy example.
> >
> > Can anyone please point me to the link for such example?
> >
> >
> > --
> > 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/-/z8aE98t9ZTUJ.
> > 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.
>
>


-- 
Thanks & Regards
Stephen S



Website: www.f2finterview.com
Blog:  blog.f2finterview.com
Tutorial:  tutorial.f2finterview.com
Group:www.charvigroups.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 socialauth username not showing correctly

2012-10-09 Thread Daniel Molina Wegener

On 09/10/12 10:52, psychok7 wrote:

So i am using django socialauth and its working fine, except for the
part where my usernames do not match my Facebook or twitter accounts
after i log in. In other words for example if i my username is 'john',
after i log in in my app it shows 'john820579c6960e4677'. What am i
doing wrong? how can i make it look exactly like my Facebook account?


  You muse the GraphAPI service with the provided Access Token (code)
to access the Facebook Profile and get the real name. The Django
SocialAuth package just provides access services. Also, you must add
some special permissions to access certain profile data.



--

> [SNIP]

Kind regards,
--
Daniel Molina Wegener [dmw at coder dot cl]
@damowe | http://coder.cl/ | https://github.com/dmw

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



Unexpected EOF while calling a stored procedure

2012-10-09 Thread puneet loya
Hi Everyone,

I m facing aproblem while fetching data from MS sql server using a stored 
procedure.

The stored procedure is being called from Django. The problem is, it is not 
fetching data for this particular procedure and all other procedures are 
working fine.

The only error i get is "SyntaxError: unexpected EOF while parsing 
(, line 0)"

There is no detail on the exception. 


I did feel that the data might have special characters in it and that might 
be a problem. I got rid of special characters mainly \n \r \s. 

Did anybody face such a problem while fetching data from the DB?


Thanks :)
 

-- 
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/-/obvUBu3g7KUJ.
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: object has no attribute '_state'

2012-10-09 Thread Demian Brecht

On 12-10-09 02:12 AM, Tom Evans wrote:

On Fri, Oct 5, 2012 at 6:13 PM, Demian Brecht  wrote:

Call me paranoid: https://fuhm.net/super-harmful/


One guys (well publicized) internet rant on why he dislikes super does
not necessarily mean he is correct. Even if he is, follow his own
advice:

   Subclasses must use super if their superclasses do


Good catch, thanks.. Although now I'm interested as to *why* the 
resulting behavior is as detailed in the blog..


--
Demian Brecht
@demianbrecht
http://demianbrecht.github.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: Javascript encoding and python decoding and vice versa

2012-10-09 Thread Kurtis Mullins
You could obfuscate the Javascript; but there's no such thing as security
through obfuscation :)
HTTPs is your best bet in terms of getting it from the server to the client
without someone in the middle reading it.

On Tue, Oct 9, 2012 at 1:20 AM, Mike Dewhirst  wrote:

> On 9/10/2012 4:07pm, Laxmikant Gurnalkar wrote:
>
>>
>> Hi, Guys.
>>
>> Anybody knows to encrypt the content in javascript and decode it using
>> python and vice versa.
>>
>
> Not sure where you see the threat but if it is between the browser and the
> server then I think your server needs to provide https encryption.
>
> http://en.wikipedia.org/wiki/**HTTP_Secure
>
>
>
>  I am doing a high security data transfer. The things are showstopper to
>> transferring data through javascript to the python. Is it possible to
>> hide data or send data over web in that should not be  human readable.
>>
>> 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+unsubscribe@**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+unsubscribe@**
> googlegroups.com .
> For more options, visit this group at http://groups.google.com/**
> group/django-users?hl=en
> .
>
>

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



Re: django socialauth username not showing correctly

2012-10-09 Thread psychok7
hey thanks for the reply. Can you point out some examples here i can get do 
all that in the right way?

On Tuesday, October 9, 2012 3:15:13 PM UTC+1, Daniel Molina Wegener wrote:
>
> On 09/10/12 10:52, psychok7 wrote: 
> > So i am using django socialauth and its working fine, except for the 
> > part where my usernames do not match my Facebook or twitter accounts 
> > after i log in. In other words for example if i my username is 'john', 
> > after i log in in my app it shows 'john820579c6960e4677'. What am i 
> > doing wrong? how can i make it look exactly like my Facebook account? 
>
>You muse the GraphAPI service with the provided Access Token (code) 
> to access the Facebook Profile and get the real name. The Django 
> SocialAuth package just provides access services. Also, you must add 
> some special permissions to access certain profile data. 
>
> > 
> > -- 
>  > [SNIP] 
>
> Kind regards, 
> -- 
> Daniel Molina Wegener [dmw at coder dot cl] 
> @damowe | http://coder.cl/ | https://github.com/dmw 
>

-- 
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/-/HZQbygXaPYIJ.
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: Javascript encoding and python decoding and vice versa

2012-10-09 Thread Javier Guerra Giraldez
On Tue, Oct 9, 2012 at 12:07 AM, Laxmikant Gurnalkar
 wrote:
> I am doing a high security data transfer. The things are showstopper to
> transferring data through javascript to the python. Is it possible to hide
> data or send data over web in that should not be  human readable.

i would start checking these libraries:

Stanford Javascript Crypto Library  http://crypto.stanford.edu/sjcl/
crypto-js  http://code.google.com/p/crypto-js/

but not before reading this:
Javascript Cryptography Considered Harmful
http://www.matasano.com/articles/javascript-cryptography/

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



Re: Javascript encoding and python decoding and vice versa

2012-10-09 Thread Javier Guerra Giraldez
sorry, broken links:


Stanford Javascript Crypto Library
http://crypto.stanford.edu/sjcl/


crypto-js
http://code.google.com/p/crypto-js/



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



/static/ 404

2012-10-09 Thread Jaap van Wingerde
settings.py:
"STATIC_URL = 'http://jaap.custard.shrl.nl:8000/static/'

# Additional locations of static files
STATICFILES_DIRS = (
# Put strings here, like "/home/html/static" or "C:/www/django/static".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
'/home/jaap/data/development/workspace/django/liakoster.nl/static/',
)"

"jaap@jaap:~/data/development/workspace/django/liakoster.nl$ python 
manage.py runserver jaap.custard.shrl.nl:8000
Validating models...

0 errors found
Django version 1.4.1, using settings 'liakosternl.settings'
Development server is running at http://jaap.custard.shrl.nl:8000/
Quit the server with CONTROL-C.
[09/Oct/2012 17:08:23] "GET /admin/data/maker/add/ HTTP/1.1" 200 15449
[09/Oct/2012 17:08:23] "GET 
/static/grappelli/jquery/ui/css/custom-theme/jquery-ui-1.8.18.custom.css 
HTTP/1.1" 404 2573
[09/Oct/2012 17:08:23] "GET /static/grappelli/stylesheets/screen.css 
HTTP/1.1" 404 2477
[09/Oct/2012 17:08:23] "GET 
/static/grappelli/stylesheets/mueller/grid/output.css HTTP/1.1" 404 2516
[09/Oct/2012 17:08:23] "GET /static/grappelli/jquery/jquery-1.7.2.min.js 
HTTP/1.1" 404 2489
[09/Oct/2012 17:08:24] "GET 
/static/grappelli/jquery/ui/js/jquery-ui-1.8.18.custom.min.js HTTP/1.1" 404 
2540
[09/Oct/2012 17:08:24] "GET /static/grappelli/js/grappelli.min.js HTTP/1.1" 
404 2468
[09/Oct/2012 17:08:24] "GET /static/admin/js/core.js HTTP/1.1" 404 2429
[09/Oct/2012 17:08:24] "GET /static/admin/js/admin/RelatedObjectLookups.js 
HTTP/1.1" 404 2495
[09/Oct/2012 17:08:24] "GET /static/admin/js/jquery.js HTTP/1.1" 404 2435
[09/Oct/2012 17:08:24] "GET /admin/jsi18n/ HTTP/1.1" 200 5439
[09/Oct/2012 17:08:24] "GET /static/admin/js/actions.js HTTP/1.1" 404 2438
[09/Oct/2012 17:08:24] "GET /static/admin/js/jquery.init.js HTTP/1.1" 404 
2450
[09/Oct/2012 17:08:24] "GET /static/admin/js/core.js HTTP/1.1" 404 2429
[09/Oct/2012 17:08:24] "GET /static/admin/js/admin/RelatedObjectLookups.js 
HTTP/1.1" 404 2495
[09/Oct/2012 17:08:24] "GET /static/admin/js/jquery.js HTTP/1.1" 404 2435
[09/Oct/2012 17:08:24] "GET /static/admin/js/jquery.init.js HTTP/1.1" 404 
2450
[09/Oct/2012 17:08:24] "GET /static/admin/js/actions.js HTTP/1.1" 404 2438"

What am I doing wrong?


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



accessing django

2012-10-09 Thread Lewis
Hello,
Is it the right way to access django without going through the command 
shell, but instead using ftp -> making new file and edit just like using 
php?



Thanks

-- 
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/-/7S69wHUUPMMJ.
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: accessing django

2012-10-09 Thread Jonathan Baker
When you say "access django", exactly what do you mean?

On Tue, Oct 9, 2012 at 9:25 AM, Lewis  wrote:

> Hello,
> Is it the right way to access django without going through the command
> shell, but instead using ftp -> making new file and edit just like using
> php?
>
>
>
> Thanks
>
>  --
> 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/-/7S69wHUUPMMJ.
> 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.
>



-- 
Jonathan D. Baker
Developer
http://jonathandbaker.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: accessing django

2012-10-09 Thread Lewis Satini
For example, there's a script I want to install and everytime, I need to
access to the command shell to install it, but in the case of php I can
just unzip and upload to the server and access through browser.
Can I do with that way? how is the process?



On Tue, Oct 9, 2012 at 11:27 AM, Jonathan Baker <
jonathandavidba...@gmail.com> wrote:

> When you say "access django", exactly what do you mean?
>
>
> On Tue, Oct 9, 2012 at 9:25 AM, Lewis  wrote:
>
>> Hello,
>> Is it the right way to access django without going through the command
>> shell, but instead using ftp -> making new file and edit just like using
>> php?
>>
>>
>>
>> Thanks
>>
>>  --
>> 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/-/7S69wHUUPMMJ.
>> 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.
>>
>
>
>
> --
> Jonathan D. Baker
> Developer
> http://jonathandbaker.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.
>



-- 
facebook.com/artistbean
SMS at (646) 450-6756

-- 
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: /static/ 404

2012-10-09 Thread Tom Evans
On Tue, Oct 9, 2012 at 4:15 PM, Jaap van Wingerde  wrote:
> settings.py:
> "STATIC_URL = 'http://jaap.custard.shrl.nl:8000/static/'
>
> # Additional locations of static files
> STATICFILES_DIRS = (
> # Put strings here, like "/home/html/static" or "C:/www/django/static".
> # Always use forward slashes, even on Windows.
> # Don't forget to use absolute paths, not relative paths.
> '/home/jaap/data/development/workspace/django/liakoster.nl/static/',
> )"
>
> "jaap@jaap:~/data/development/workspace/django/liakoster.nl$ python
> manage.py runserver jaap.custard.shrl.nl:8000
> Validating models...
>
> 0 errors found
> Django version 1.4.1, using settings 'liakosternl.settings'
> Development server is running at http://jaap.custard.shrl.nl:8000/
> Quit the server with CONTROL-C.
> [09/Oct/2012 17:08:23] "GET /admin/data/maker/add/ HTTP/1.1" 200 15449
> [09/Oct/2012 17:08:23] "GET
> /static/grappelli/jquery/ui/css/custom-theme/jquery-ui-1.8.18.custom.css
> HTTP/1.1" 404 2573
> [09/Oct/2012 17:08:23] "GET /static/grappelli/stylesheets/screen.css
> HTTP/1.1" 404 2477
> [09/Oct/2012 17:08:23] "GET
> /static/grappelli/stylesheets/mueller/grid/output.css HTTP/1.1" 404 2516
> [09/Oct/2012 17:08:23] "GET /static/grappelli/jquery/jquery-1.7.2.min.js
> HTTP/1.1" 404 2489
> [09/Oct/2012 17:08:24] "GET
> /static/grappelli/jquery/ui/js/jquery-ui-1.8.18.custom.min.js HTTP/1.1" 404
> 2540
> [09/Oct/2012 17:08:24] "GET /static/grappelli/js/grappelli.min.js HTTP/1.1"
> 404 2468
> [09/Oct/2012 17:08:24] "GET /static/admin/js/core.js HTTP/1.1" 404 2429
> [09/Oct/2012 17:08:24] "GET /static/admin/js/admin/RelatedObjectLookups.js
> HTTP/1.1" 404 2495
> [09/Oct/2012 17:08:24] "GET /static/admin/js/jquery.js HTTP/1.1" 404 2435
> [09/Oct/2012 17:08:24] "GET /admin/jsi18n/ HTTP/1.1" 200 5439
> [09/Oct/2012 17:08:24] "GET /static/admin/js/actions.js HTTP/1.1" 404 2438
> [09/Oct/2012 17:08:24] "GET /static/admin/js/jquery.init.js HTTP/1.1" 404
> 2450
> [09/Oct/2012 17:08:24] "GET /static/admin/js/core.js HTTP/1.1" 404 2429
> [09/Oct/2012 17:08:24] "GET /static/admin/js/admin/RelatedObjectLookups.js
> HTTP/1.1" 404 2495
> [09/Oct/2012 17:08:24] "GET /static/admin/js/jquery.js HTTP/1.1" 404 2435
> [09/Oct/2012 17:08:24] "GET /static/admin/js/jquery.init.js HTTP/1.1" 404
> 2450
> [09/Oct/2012 17:08:24] "GET /static/admin/js/actions.js HTTP/1.1" 404 2438"
>
> What am I doing wrong?

Well, for starters, you didn't ask a question :)

Assuming your question is "Why am I getting 404's for static content
on my dev server, even though I set STATIC_URL?", have you included
'django.contrib.staticfiles' in INSTALLED_APPS?

What does "python manage.py findstatic admin/js/core.js" return?

Cheers

Tom

-- 
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: accessing django

2012-10-09 Thread Tom Evans
On Tue, Oct 9, 2012 at 4:29 PM, Lewis Satini  wrote:
> For example, there's a script I want to install and everytime, I need to
> access to the command shell to install it, but in the case of php I can just
> unzip and upload to the server and access through browser.
> Can I do with that way? how is the process?
>

Django doesn't work like PHP. In PHP, each PHP file is a single
"program" that is run when the web server loads that 'page'. In
django, there is a single "program" that runs and communicates with
the web server. There are no "Django scripts" for instance, there are
Django packages you can install which add functionality to your Django
"program".

So no, you can't simply upload "scripts" to the web server with ftp, not easily.

Cheers

Tom

-- 
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: accessing django

2012-10-09 Thread Lewis Satini
Thank guys for helping this out.
One more question what is the basic step of installing the package? are
they all the same?

On Tue, Oct 9, 2012 at 11:45 AM, Kurtis Mullins wrote:

> Not really. You could probably use a host that might have some fancy
> control panel for doing something like that; but I'd recommend just using
> the shell. It'll make life a lot easier in the long run.
>
>
> On Tue, Oct 9, 2012 at 11:39 AM, Lewis Satini wrote:
>
>> Hello,
>> I am sorry for misplace script and package. I am new to Django.
>> so everytime when I need to install Django packages. I need to do it
>> through command shell? is there any other way without going through command
>> shell?
>>
>> Thanks
>>
>>
>> On Tue, Oct 9, 2012 at 11:36 AM, Tom Evans wrote:
>>
>>> On Tue, Oct 9, 2012 at 4:29 PM, Lewis Satini 
>>> wrote:
>>> > For example, there's a script I want to install and everytime, I need
>>> to
>>> > access to the command shell to install it, but in the case of php I
>>> can just
>>> > unzip and upload to the server and access through browser.
>>> > Can I do with that way? how is the process?
>>> >
>>>
>>> Django doesn't work like PHP. In PHP, each PHP file is a single
>>> "program" that is run when the web server loads that 'page'. In
>>> django, there is a single "program" that runs and communicates with
>>> the web server. There are no "Django scripts" for instance, there are
>>> Django packages you can install which add functionality to your Django
>>> "program".
>>>
>>> So no, you can't simply upload "scripts" to the web server with ftp, not
>>> easily.
>>>
>>> Cheers
>>>
>>> Tom
>>>
>>> --
>>> 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.
>>>
>>>
>>
>>
>> --
>> facebook.com/artistbean
>> SMS at (646) 450-6756
>>
>> --
>> 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.
>



-- 
facebook.com/artistbean
SMS at (646) 450-6756

-- 
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 socialauth username not showing correctly

2012-10-09 Thread Stefano Tranquillini
Django put numbers because you already have in the db a user with the fb 
username. 
check it.

On Tuesday, October 9, 2012 5:19:00 PM UTC+2, psychok7 wrote:
>
> hey thanks for the reply. Can you point out some examples here i can get 
> do all that in the right way?
>
> On Tuesday, October 9, 2012 3:15:13 PM UTC+1, Daniel Molina Wegener wrote:
>>
>> On 09/10/12 10:52, psychok7 wrote: 
>> > So i am using django socialauth and its working fine, except for the 
>> > part where my usernames do not match my Facebook or twitter accounts 
>> > after i log in. In other words for example if i my username is 'john', 
>> > after i log in in my app it shows 'john820579c6960e4677'. What am i 
>> > doing wrong? how can i make it look exactly like my Facebook account? 
>>
>>You muse the GraphAPI service with the provided Access Token (code) 
>> to access the Facebook Profile and get the real name. The Django 
>> SocialAuth package just provides access services. Also, you must add 
>> some special permissions to access certain profile data. 
>>
>> > 
>> > -- 
>>  > [SNIP] 
>>
>> Kind regards, 
>> -- 
>> Daniel Molina Wegener [dmw at coder dot cl] 
>> @damowe | http://coder.cl/ | https://github.com/dmw 
>>
>

-- 
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/-/ycfrshwTVZQJ.
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: accessing django

2012-10-09 Thread Tom Evans
On Tue, Oct 9, 2012 at 4:39 PM, Lewis Satini  wrote:
> Hello,
> I am sorry for misplace script and package. I am new to Django.
> so everytime when I need to install Django packages. I need to do it through
> command shell? is there any other way without going through command shell?
>
> Thanks
>

As I said, no not really. Certain python packages require compilation
with a C compiler (python-mysql, python imaging library, others), some
are just pure python, and others can do whatever the heck they want
before installing.

With the right setup, you could 'install' pure python packages simply
by creating the right folders, and uploading the files in the right
place, and having your web server notice when this happens and restart
your django application. I wouldn't recommend this, it would be
difficult to setup, and you always run the risk of a package not being
installed correctly. Just install them as they are supposed to be
installed.

Cheers

Tom

-- 
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: accessing django

2012-10-09 Thread Kurtis Mullins
It depends on the computer, but I'd recommend using a Virtual Environment
and the program called 'pip'. Google can be your friend there :) Or if you
run into any specific problems, don't hesitate to ask!

On Tue, Oct 9, 2012 at 11:48 AM, Lewis Satini wrote:

> Thank guys for helping this out.
> One more question what is the basic step of installing the package? are
> they all the same?
>
>
> On Tue, Oct 9, 2012 at 11:45 AM, Kurtis Mullins 
> wrote:
>
>> Not really. You could probably use a host that might have some fancy
>> control panel for doing something like that; but I'd recommend just using
>> the shell. It'll make life a lot easier in the long run.
>>
>>
>> On Tue, Oct 9, 2012 at 11:39 AM, Lewis Satini wrote:
>>
>>> Hello,
>>> I am sorry for misplace script and package. I am new to Django.
>>> so everytime when I need to install Django packages. I need to do it
>>> through command shell? is there any other way without going through command
>>> shell?
>>>
>>> Thanks
>>>
>>>
>>> On Tue, Oct 9, 2012 at 11:36 AM, Tom Evans wrote:
>>>
 On Tue, Oct 9, 2012 at 4:29 PM, Lewis Satini 
 wrote:
 > For example, there's a script I want to install and everytime, I need
 to
 > access to the command shell to install it, but in the case of php I
 can just
 > unzip and upload to the server and access through browser.
 > Can I do with that way? how is the process?
 >

 Django doesn't work like PHP. In PHP, each PHP file is a single
 "program" that is run when the web server loads that 'page'. In
 django, there is a single "program" that runs and communicates with
 the web server. There are no "Django scripts" for instance, there are
 Django packages you can install which add functionality to your Django
 "program".

 So no, you can't simply upload "scripts" to the web server with ftp,
 not easily.

 Cheers

 Tom

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


>>>
>>>
>>> --
>>> facebook.com/artistbean
>>> SMS at (646) 450-6756
>>>
>>> --
>>> 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.
>>
>
>
>
> --
> facebook.com/artistbean
> SMS at (646) 450-6756
>
> --
> 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: accessing django

2012-10-09 Thread Tom Evans
On Tue, Oct 9, 2012 at 4:48 PM, Lewis Satini  wrote:
> Thank guys for helping this out.
> One more question what is the basic step of installing the package? are they
> all the same?

Why don't you install a couple and see?

They are normally similar, but not necessarily so.

Tom

-- 
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: /static/ 404

2012-10-09 Thread Gladson Simplício Brito
# coding: utf-8DEBUG = False or True ?TEMPLATE_DEBUG = DEBUG


if false, it has to serve files with apache, nginx, etc...
if true, and to operate...

2012/10/9 Jaap van Wingerde 

> settings.py:
> "STATIC_URL = 'http://jaap.custard.shrl.nl:8000/static/'
>
> # Additional locations of static files
> STATICFILES_DIRS = (
> # Put strings here, like "/home/html/static" or "C:/www/django/static".
> # Always use forward slashes, even on Windows.
> # Don't forget to use absolute paths, not relative paths.
> '/home/jaap/data/development/workspace/django/liakoster.nl/static/',
> )"
>
> "jaap@jaap:~/data/development/workspace/django/liakoster.nl$ python
> manage.py runserver jaap.custard.shrl.nl:8000
> Validating models...
>
> 0 errors found
> Django version 1.4.1, using settings 'liakosternl.settings'
> Development server is running at http://jaap.custard.shrl.nl:8000/
> Quit the server with CONTROL-C.
> [09/Oct/2012 17:08:23] "GET /admin/data/maker/add/ HTTP/1.1" 200 15449
> [09/Oct/2012 17:08:23] "GET
> /static/grappelli/jquery/ui/css/custom-theme/jquery-ui-1.8.18.custom.css
> HTTP/1.1" 404 2573
> [09/Oct/2012 17:08:23] "GET /static/grappelli/stylesheets/screen.css
> HTTP/1.1" 404 2477
> [09/Oct/2012 17:08:23] "GET
> /static/grappelli/stylesheets/mueller/grid/output.css HTTP/1.1" 404 2516
> [09/Oct/2012 17:08:23] "GET /static/grappelli/jquery/jquery-1.7.2.min.js
> HTTP/1.1" 404 2489
> [09/Oct/2012 17:08:24] "GET
> /static/grappelli/jquery/ui/js/jquery-ui-1.8.18.custom.min.js HTTP/1.1" 404
> 2540
> [09/Oct/2012 17:08:24] "GET /static/grappelli/js/grappelli.min.js
> HTTP/1.1" 404 2468
> [09/Oct/2012 17:08:24] "GET /static/admin/js/core.js HTTP/1.1" 404 2429
> [09/Oct/2012 17:08:24] "GET /static/admin/js/admin/RelatedObjectLookups.js
> HTTP/1.1" 404 2495
> [09/Oct/2012 17:08:24] "GET /static/admin/js/jquery.js HTTP/1.1" 404 2435
> [09/Oct/2012 17:08:24] "GET /admin/jsi18n/ HTTP/1.1" 200 5439
> [09/Oct/2012 17:08:24] "GET /static/admin/js/actions.js HTTP/1.1" 404 2438
> [09/Oct/2012 17:08:24] "GET /static/admin/js/jquery.init.js HTTP/1.1" 404
> 2450
> [09/Oct/2012 17:08:24] "GET /static/admin/js/core.js HTTP/1.1" 404 2429
> [09/Oct/2012 17:08:24] "GET /static/admin/js/admin/RelatedObjectLookups.js
> HTTP/1.1" 404 2495
> [09/Oct/2012 17:08:24] "GET /static/admin/js/jquery.js HTTP/1.1" 404 2435
> [09/Oct/2012 17:08:24] "GET /static/admin/js/jquery.init.js HTTP/1.1" 404
> 2450
> [09/Oct/2012 17:08:24] "GET /static/admin/js/actions.js HTTP/1.1" 404 2438"
>
> What am I doing wrong?
>
>
>  --
> 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/-/utmB9O2bMksJ.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

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



Re: django socialauth username not showing correctly

2012-10-09 Thread psychok7
yes you are right. i deleted the same name user and it works. but how can i 
control this with oauth users and users that register normally?

On Tuesday, October 9, 2012 4:49:21 PM UTC+1, Stefano Tranquillini wrote:
>
> Django put numbers because you already have in the db a user with the fb 
> username. 
> check it.
>
> On Tuesday, October 9, 2012 5:19:00 PM UTC+2, psychok7 wrote:
>>
>> hey thanks for the reply. Can you point out some examples here i can get 
>> do all that in the right way?
>>
>> On Tuesday, October 9, 2012 3:15:13 PM UTC+1, Daniel Molina Wegener wrote:
>>>
>>> On 09/10/12 10:52, psychok7 wrote: 
>>> > So i am using django socialauth and its working fine, except for the 
>>> > part where my usernames do not match my Facebook or twitter accounts 
>>> > after i log in. In other words for example if i my username is 'john', 
>>> > after i log in in my app it shows 'john820579c6960e4677'. What am i 
>>> > doing wrong? how can i make it look exactly like my Facebook account? 
>>>
>>>You muse the GraphAPI service with the provided Access Token (code) 
>>> to access the Facebook Profile and get the real name. The Django 
>>> SocialAuth package just provides access services. Also, you must add 
>>> some special permissions to access certain profile data. 
>>>
>>> > 
>>> > -- 
>>>  > [SNIP] 
>>>
>>> Kind regards, 
>>> -- 
>>> Daniel Molina Wegener [dmw at coder dot cl] 
>>> @damowe | http://coder.cl/ | https://github.com/dmw 
>>>
>>

-- 
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/-/3RyJKocJPRMJ.
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.



connecting to existance mysql

2012-10-09 Thread Lewis
Hello,
I have website that build in php and have the database exists, what is the 
process in using django to connect the existance mysql database? is there 
tutorial about this process?

Thanks

-- 
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/-/Hc3vvjG23m0J.
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: accessing django

2012-10-09 Thread Lewis Satini
Thank you so much all of you and the fast response

On Tue, Oct 9, 2012 at 11:52 AM, Tom Evans  wrote:

> On Tue, Oct 9, 2012 at 4:48 PM, Lewis Satini 
> wrote:
> > Thank guys for helping this out.
> > One more question what is the basic step of installing the package? are
> they
> > all the same?
>
> Why don't you install a couple and see?
>
> They are normally similar, but not necessarily so.
>
> Tom
>
> --
> 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.
>
>


-- 
facebook.com/artistbean
SMS at (646) 450-6756

-- 
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: connecting to existance mysql

2012-10-09 Thread Lee Hinde
On Tue, Oct 9, 2012 at 8:58 AM, Lewis  wrote:
> Hello,
> I have website that build in php and have the database exists, what is the
> process in using django to connect the existance mysql database? is there
> tutorial about this process?

https://docs.djangoproject.com/en/1.4/howto/legacy-databases/

-- 
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: accessing django

2012-10-09 Thread Jonathan Baker
As a former PHP dev who avoided the command line at all cost, the
frustrations during the transition period to Python/Django/CLI were well
worth it. It can seem daunting, but command line syntax quickly becomes
second nature, and I can't imagine going back to the days when I developed
using a mouse.

As for package management, I'd highly recommend using pip within
virtualenv. Here are a few links that helped me get started:

http://mirnazim.org/writings/python-ecosystem-introduction/
http://www.saltycrane.com/blog/2009/05/notes-using-pip-and-virtualenv-django/
http://www.clemesha.org/blog/modern-python-hacker-tools-virtualenv-fabric-pip/

On Tue, Oct 9, 2012 at 9:59 AM, Lewis Satini wrote:

> Thank you so much all of you and the fast response
>
>
> On Tue, Oct 9, 2012 at 11:52 AM, Tom Evans wrote:
>
>> On Tue, Oct 9, 2012 at 4:48 PM, Lewis Satini 
>> wrote:
>> > Thank guys for helping this out.
>> > One more question what is the basic step of installing the package? are
>> they
>> > all the same?
>>
>> Why don't you install a couple and see?
>>
>> They are normally similar, but not necessarily so.
>>
>> Tom
>>
>> --
>> 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.
>>
>>
>
>
> --
> facebook.com/artistbean
> SMS at (646) 450-6756
>
> --
> 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.
>



-- 
Jonathan D. Baker
Developer
http://jonathandbaker.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: connecting to existance mysql

2012-10-09 Thread carlos
first
https://docs.djangoproject.com/en/dev/howto/legacy-databases/#auto-generate-the-models

cheer

On Tue, Oct 9, 2012 at 10:02 AM, Lee Hinde  wrote:

> On Tue, Oct 9, 2012 at 8:58 AM, Lewis  wrote:
> > Hello,
> > I have website that build in php and have the database exists, what is
> the
> > process in using django to connect the existance mysql database? is there
> > tutorial about this process?
>
> https://docs.djangoproject.com/en/1.4/howto/legacy-databases/
>
> --
> 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: /static/ 404

2012-10-09 Thread Jaap van Wingerde
On Tue, 9 Oct 2012 16:31:18 +0100
Tom Evans  wrote:

> Assuming your question is "Why am I getting 404's for static content
> on my dev server, even though I set STATIC_URL?", have you included
> 'django.contrib.staticfiles' in INSTALLED_APPS?
Yes:
"INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'grappelli',
'filebrowser',
'grappelli.dashboard',
# Uncomment the next line to enable the admin:
'django.contrib.admin',
# Uncomment the next line to enable admin documentation:
'django.contrib.admindocs',
#'south',
'data',
)" 
> What does "python manage.py findstatic admin/js/core.js" return?
jaap@jaap:~$
"cd /home/jaap/data/development/workspace/django/liakoster.nl
jaap@jaap:~/data/development/workspace/django/liakoster.nl$ python
manage.py findstatic admin/js/core.js Found 'admin/js/core.js'
here: 
/home/jaap/data/development/workspace/django/liakoster.nl/static/admin/js/core.js
 /usr/local/lib/python2.7/dist-packages/grappelli/static/admin/js/core.js
  /usr/share/pyshared/django/contrib/admin/static/admin/js/core.js
jaap@jaap:~/data/development/workspace/django/liakoster.nl$"

-- 
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: A simple LinkedIn site with django

2012-10-09 Thread David Gomez
When you say is write to the paper, what do you mean? I'm new in 
programming and I just looking for a project, so  I can learn on the fly. 
I'm looking almost the same as linkedin with less option. Like when a user 
go to the website, they see the main page, then they can to register, 
adding their personal information (school, resume, etc...). Also other 
section for employers where they register and after the register they can 
search for future hiring. 

On Monday, October 8, 2012 8:13:46 PM UTC-4, David Gomez wrote:
>
> I have project in mind and I was thinking how hard is to create my 
> project. Is going to be like a LinkedIn, but a simple one. How hard is to 
> make a web application like this? And what is the hardest part? Thanks in 
> advance

-- 
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/-/8NvC31dU5WkJ.
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: /static/ 404

2012-10-09 Thread Jaap van Wingerde
On Tue, 9 Oct 2012 11:33:36 -0400
Gladson Simplício Brito  wrote:

> # coding: utf-8DEBUG = False or True ?TEMPLATE_DEBUG = DEBUG
> 
> 
> if false, it has to serve files with apache, nginx, etc...
> if true, and to operate...
"DEBUG = True
TEMPLATE_DEBUG = DEBUG"

-- 
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: /static/ 404

2012-10-09 Thread Tom Evans
On Tue, Oct 9, 2012 at 6:01 PM, Jaap van Wingerde
 wrote:
> On Tue, 9 Oct 2012 11:33:36 -0400
> Gladson Simplício Brito  wrote:
>
>> # coding: utf-8DEBUG = False or True ?TEMPLATE_DEBUG = DEBUG
>>
>>
>> if false, it has to serve files with apache, nginx, etc...
>> if true, and to operate...
> "DEBUG = True
> TEMPLATE_DEBUG = DEBUG"
>

Are you importing a second settings file perhaps, or is there a later
statement that turns DEBUG off? Your findstatic output shows that
staticfiles is installed and configured correctly, Django
automatically adds staticfiles urls to your urlconf when running in
debug mode, there is very little that can go wrong at that point -
apart from debug being off.

Cheers

Tom

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



c9.io and django admin - the quest for missing templates

2012-10-09 Thread Matteo Suppo
So I'm trying to develop with https://c9.io/

It's basically an online development suite, with terminals and editor and 
stuff.

I installed django via pip and tried something with the admin, but I got 
this ugly error:

TemplateDoesNotExist at /admin/
  admin/login.html

YES, I added the django.contrib.admin app to the settings file.

I investigated and discovered that while in my computer the templates for the 
admin were in the same directory as the python files


venv/lib/python2.7/site-packages/django/contrib/admin/templates/


on c9.io they were in /data/share/django/contrib/admin/templates

while the python files for the app were in 
/data/lib/python/site-packages/django/contrib/admin

That's why the template loader couldn't find them.


I fixed it by copying the templates in the app/templates folder, but it's not 
really a fix...




-- 
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/-/soYT3UrkQCUJ.
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: A simple LinkedIn site with django

2012-10-09 Thread Joel Goldstick
On Tue, Oct 9, 2012 at 1:01 PM, David Gomez  wrote:
> When you say is write to the paper, what do you mean? I'm new in programming
> and I just looking for a project, so  I can learn on the fly. I'm looking
> almost the same as linkedin with less option. Like when a user go to the
> website, they see the main page, then they can to register, adding their
> personal information (school, resume, etc...). Also other section for
> employers where they register and after the register they can search for
> future hiring.

So you want a website that display some (probably static) home page.
It must have a system to allow users to register, setting username,
password and perhaps other information
It must have a system to allow employers to do the same, but
differentiate between the two
You need to understand how to create models in django and learn to use
modelforms to allow users to enter information

If you get that far, come back.  In between there will be a lot of questions.

First step, go through the django tutorial.  Do it two or three times
Second step, search for other tutorials on django programming.  You
will find more than several -- both video and text.
Go through several of these to help your understanding.

Then go back to your project when you think you understand all the
django pieces:
  1. urls.py
  2. settings --
  3. database settings
  4. models
  5. views

When its all done you will need to learn to deploy it on a 'real server'

If you are new to programming, you have a lot in front of you.  Not
days, not weeks, but months

keep at it

Oh, and also read python tutorials, and write python code to learn how
python works.  Django is a python application, so if you can't write
in python, you can't use django

>
>
> On Monday, October 8, 2012 8:13:46 PM UTC-4, David Gomez wrote:
>>
>> I have project in mind and I was thinking how hard is to create my
>> project. Is going to be like a LinkedIn, but a simple one. How hard is to
>> make a web application like this? And what is the hardest part? Thanks in
>> advance
>
> --
> 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/-/8NvC31dU5WkJ.
>
> 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.



-- 
Joel Goldstick

-- 
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 Internal Server Error

2012-10-09 Thread Wnt2bsleepin
Can you explain why it's bad to use uppercase names in Nix systems? I will 
remake the account if I need to. 
Here is the output of python

 

Python 2.4 (#2, Oct  7 2012, 20:19:23)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-52)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import django
Traceback (most recent call last):
  File "", line 1, in ?
ImportError: No module named django
>>>

and under python 2.7
Python 2.7.2 (default, Oct  6 2012, 14:11:15)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-52)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import django
>>> print django.VERSION
(1, 4, 1, 'final', 0)
>>>





-- 
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/-/B-FvesfLhEsJ.
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.



Javascript translation always translates

2012-10-09 Thread Andreas
Hi everybody,
I have a django project with default language 'el'.
I am making translations for English 'en'.
My javascript catalog is created fine and the relevant urls are loading 
fine.
The problem is that it always translates to English. Even when: 

translation.activate('el') is used throughout the view process. (Which I 
shouldn't have to do since 'el' is the default)

My django version is 1.3 but I have tested it with 1.4 also with the same 
results.

Any thoughts?

Thanks a lot.
Andreas

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



Sort Objects by ForeignKey Boolean Field

2012-10-09 Thread JoeLinux
Hey All,

I have the following models:

class Company:
> name = models.CharField(max_length=200)
>
 

> class Event:
> title = models.CharField(max_length=200)
> company = models.ForeignKey(Company)
>
 

> class EventRegistration:
> attended = models.BooleanField(default=False)
> event = models.ForeignKey(Event)


Each Company can have several Events attached to it, and when people 
register for an Event, an EventRegistration is created. If they actually 
attend the Event, then that EventRegistration for that particular user is 
set to "attended=True".

I'm currently generating reports, and what I need is essentially a way to 
have the Company see all of their Events, and sort by the number of 
attendees (EventRegistrations with "attended=True"). I have this SQL that 
accomplishes what I need:

SELECT e.title FROM example_event e LEFT JOIN (SELECT event_id, COUNT(*) 
> attendees FROM example_eventregistration WHERE attended=1 GROUP BY 
> event_id) r ON (e.id=r.event_id) ORDER BY r.attendees DESC;


That gives me exactly what I want, which is a sorted list of Events. Well, 
I really need more than just "e.title"; I actually need the whole object, 
but this gives an idea of what I'm looking for. Is there any way to do this 
in the Django ORM? I would need something like:

events.annotate(attendees=Count('eventregistration__attended=True')).order_by('attendees')


... I'm well aware that won't work, because you can't have conditions 
within the string argument of Count(), but again, this is the idea of what 
I want. Does anyone know the right way to do this? The "events" variable 
needs to always have ALL of the Events from the Company, regardless of 
whether anyone has attended that Event or not. The only difference is how 
those Events are sorted (so events.filter(eventregistration__attended=True)will 
not give me what I want, because that returns only a subset of Events).

Thanks in advance!

-- 
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/-/JOKVPCx00zYJ.
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: A simple LinkedIn site with django

2012-10-09 Thread David Gomez
Waooo, this is the first time that I ask something in a post and somebody 
reply me with what I want. Thanks a lot. Well about Python, I'm a network 
engineer and in my job they encounter an issue that a script was needed, so 
I choose Pyhton and basically in the last month, I been doing python 
automation script for login into routers and grabbing info and either save 
it as a text file or spreadsheet. People at my swear that I have years of 
experience with Python, LOL. Thanks a lot.

On Tuesday, October 9, 2012 1:41:12 PM UTC-4, Joel Goldstick wrote:
>
> On Tue, Oct 9, 2012 at 1:01 PM, David Gomez > 
> wrote: 
> > When you say is write to the paper, what do you mean? I'm new in 
> programming 
> > and I just looking for a project, so  I can learn on the fly. I'm 
> looking 
> > almost the same as linkedin with less option. Like when a user go to the 
> > website, they see the main page, then they can to register, adding their 
> > personal information (school, resume, etc...). Also other section for 
> > employers where they register and after the register they can search for 
> > future hiring. 
>
> So you want a website that display some (probably static) home page. 
> It must have a system to allow users to register, setting username, 
> password and perhaps other information 
> It must have a system to allow employers to do the same, but 
> differentiate between the two 
> You need to understand how to create models in django and learn to use 
> modelforms to allow users to enter information 
>
> If you get that far, come back.  In between there will be a lot of 
> questions. 
>
> First step, go through the django tutorial.  Do it two or three times 
> Second step, search for other tutorials on django programming.  You 
> will find more than several -- both video and text. 
> Go through several of these to help your understanding. 
>
> Then go back to your project when you think you understand all the 
> django pieces: 
>   1. urls.py 
>   2. settings -- 
>   3. database settings 
>   4. models 
>   5. views 
>
> When its all done you will need to learn to deploy it on a 'real server' 
>
> If you are new to programming, you have a lot in front of you.  Not 
> days, not weeks, but months 
>
> keep at it 
>
> Oh, and also read python tutorials, and write python code to learn how 
> python works.  Django is a python application, so if you can't write 
> in python, you can't use django 
>
> > 
> > 
> > On Monday, October 8, 2012 8:13:46 PM UTC-4, David Gomez wrote: 
> >> 
> >> I have project in mind and I was thinking how hard is to create my 
> >> project. Is going to be like a LinkedIn, but a simple one. How hard is 
> to 
> >> make a web application like this? And what is the hardest part? Thanks 
> in 
> >> advance 
> > 
> > -- 
> > 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/-/8NvC31dU5WkJ. 
> > 
> > To post to this group, send email to 
> > django...@googlegroups.com. 
>
> > To unsubscribe from this group, send email to 
> > django-users...@googlegroups.com . 
> > For more options, visit this group at 
> > http://groups.google.com/group/django-users?hl=en. 
>
>
>
> -- 
> Joel Goldstick 
>

-- 
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/-/4Rfh29yJI4AJ.
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.



Drop down menu

2012-10-09 Thread sri
Hi,

I am new to Django/Web development and i am trying to create a drop down 
menu in my sample website and got stuck about the best way to develop it.

My idea is to have a drop down of the city names on the homepage. City 
Names can be selected from the model character field having choices.

The model looks like below :

   CITY_NAMES = (
(u'L', u'London'),
(u'NU', u'Newcastle Upon Tyne'),
(u'M', u'Manchester'),
)
 
class samplemodel(models.Model):
city_names = models.CharField(max_length =2, choices = 
CITY_NAMES,default = 'L')

And my URL file looks like below.

url(r'^(?P\c+)/', 'cityhomepage'),
url(r'^$', 'cityhomepage')

And my views looks like below 

def cityhomepage(request, city_name = 'London'):
  /** do something **/

>From the drop down when user selects a specific city, then i want to call 
the view "cityhomepage" by passing the city_name selected by the user as 
argument.

Could you please suggest, what i need to write in my templates or forms.py 
files to get the outcome.  

Thanks
Sreekanth

-- 
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/-/E5n-baE-Zc0J.
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: Is there any small and easy website example available for Django?

2012-10-09 Thread Joel Goldstick
On Tue, Oct 9, 2012 at 9:54 AM, Stephen Anto  wrote:

> hi,
>
> www.f2finterview.com has been fully developed by Django.
>
>
> On Tue, Oct 9, 2012 at 7:19 PM, Jon Crowell wrote:
>
>> I am also using djangobook.com.  If it is outdated and not
>> recommended, then what resource should we use instead? Also, I find it
>> fairly relevant and easy to follow, so I'm curious what specific
>> objections there are to it. Incidentally, I'm using the version on
>> github that is being updated:
>> https://github.com/jacobian/djangobook.com
>>
>> Jon
>>
>>
>> On Tue, Oct 9, 2012 at 9:28 AM, lacrymol...@gmail.com
>>  wrote:
>> >
>> > First of all, djangobook.com is outdated, and not recommended, at
>> least last time i checked it.
>> >
>>
> I think the django book  is not advised by many because it covers
version1.0.  Django is at 1.4 now.  In the mean time, static files are
treated differently (static (js, css, images) and media  (user uploaded
files) are split).  In 1.4 the structure of a project was changed (adding a
new top level directory).   Also generic view functions are deprecated in
favor of generic class views.

So, if you are using 1.4 and following along with the book there will be
disconnects.  However, I find I keep going back to the book to understand
this or that aspect of how django works.  Its well written.  Just find
newer articles on the web, and refer to djangodocs latest documentation as
your bible for how things work now.
-- 
Joel Goldstick

-- 
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: Drop down menu

2012-10-09 Thread Cal Leeming [Simplicity Media Ltd]
Looks like someone already asked this question (and got an answer);

https://groups.google.com/forum/?fromgroups=#!topic/django-users/ef-Yedt_0uo

Here is a good place to start learning about forms - plenty of examples etc;
https://docs.djangoproject.com/en/dev/ref/forms/api/

Hope this helps!

Cal

On Tue, Oct 9, 2012 at 7:43 PM, sri  wrote:

> Hi,
>
> I am new to Django/Web development and i am trying to create a drop down
> menu in my sample website and got stuck about the best way to develop it.
>
> My idea is to have a drop down of the city names on the homepage. City
> Names can be selected from the model character field having choices.
>
> The model looks like below :
>
>CITY_NAMES = (
> (u'L', u'London'),
> (u'NU', u'Newcastle Upon Tyne'),
> (u'M', u'Manchester'),
> )
>
> class samplemodel(models.Model):
> city_names = models.CharField(max_length =2, choices =
> CITY_NAMES,default = 'L')
>
> And my URL file looks like below.
>
> url(r'^(?P\c+)/', 'cityhomepage'),
> url(r'^$', 'cityhomepage')
>
> And my views looks like below
>
> def cityhomepage(request, city_name = 'London'):
>   /** do something **/
>
> From the drop down when user selects a specific city, then i want to call
> the view "cityhomepage" by passing the city_name selected by the user as
> argument.
>
> Could you please suggest, what i need to write in my templates or forms.py
> files to get the outcome.
>
> Thanks
> Sreekanth
>
> --
> 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/-/E5n-baE-Zc0J.
> 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.



admin geodjango geometry and googlemaps v3

2012-10-09 Thread NiL
Hi list,

googlemaps v2 is deprecated @ google. I'm trying to use the googlemap's 
flavor of GeoAdmin, but to no luck.

The code inside django.contrib.gis.maps.google.GoogleMap refers to the v2 
of the GM API. (I'm using django 1.4.1)

I've googled around but to no luck yet.


Resources I've read so far include:
https://github.com/lambdalisue/django-googlemap-widget/blob/master/README.rst

https://github.com/django/django-old/pull/16
http://www.iknuth.com/2010/04/displaying-a-google-maps-api-v3-map-in-a-django-application-with-geodjango-and-postgis/
http://code.google.com/p/django-gmapi/

https://github.com/alanjds/django/blob/gis_gmaps_v3/django/contrib/gis/maps/google/gmap.py
http://djangosnippets.org/snippets/1144/


The admin page is working nicely w/ openstreetmap, but I really want to use 
googlemaps for editing.

would anyone like to share some experience ?
regards
NiL

-- 
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/-/Gl0uvKGtRA0J.
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 Internal Server Error

2012-10-09 Thread Wnt2bsleepin


On Tuesday, 9 October 2012 13:46:02 UTC-4, Wnt2bsleepin wrote:
>
> Can you explain why it's bad to use uppercase names in Nix systems? I will 
> remake the account if I need to. 
> Here is the output of python
>
>  
>
> Python 2.4 (#2, Oct  7 2012, 20:19:23)
> [GCC 4.1.2 20080704 (Red Hat 4.1.2-52)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import django
> Traceback (most recent call last):
>   File "", line 1, in ?
> ImportError: No module named django
> >>>
>
> and under python 2.7
> Python 2.7.2 (default, Oct  6 2012, 14:11:15)
> [GCC 4.1.2 20080704 (Red Hat 4.1.2-52)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import django
> >>> print django.VERSION
> (1, 4, 1, 'final', 0)
> >>>
>
>
>
>
>
>

-- 
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/-/UmEwj4mqRucJ.
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: Disabling CSRF is not working.

2012-10-09 Thread Bill Freeman
If you can't disable the middleware, you could consider marking the
view with the csrf_exempt decorator from django.views.decorators.csrf
(see https://docs/djangoproject.com/en/1.4/contrib/csrf/#utilities

Bill

On Sun, Oct 7, 2012 at 3:41 AM, Laxmikant Gurnalkar
 wrote:
> Thanks, for the response.
> I had a problem like this
>I was trying to create a  storesite which can be worked without django
> framework but using django. i.e just static template index.html & a
> java-script file. With all the stuff dynamically generated & only urls by
> the django, so that anybody can use my index.html, just calls my server for
> the url to display dynamic content using users information.
> so for this purpose I had a cookies resided in my browser and I was trying
> to create database objecst using javascript with api urls.
>
> When I studied CSRF in detail, I understood that, private dynamic
> javascript cookies cannot be directly used to  retrieve or access the
> database related to your site. Hence, my javascript was considered by django
> as a malicious/attack content and thrown a 403 forbidden error. So I was
> trying to remove the CSRF from my project. But Failed. Due to the same
> reason as you guys have told me.
> So on understanding CSRF  just removed code of cookies & just added
> parameters to url just before when user refreshes the page. And whole thing
> worked.  That was the Great  experience.
>
> anyways,
> Plz tell me if I can hv any other method to do this. adding parameters to
> url is definitely not secure always.
>
> One more thing I am using csrf_exempt to handle api views.
>
> Thanks a lot again.
>
> On Sat, Oct 6, 2012 at 4:38 AM, Bill Freeman  wrote:
>>
>> Right you are.
>>
>> On Fri, Oct 5, 2012 at 6:20 PM, Ian Clelland  wrote:
>> >
>> >
>> > On Friday, October 5, 2012, Bill Freeman wrote:
>> >>
>> >> I believe that I read somewhere that newer Djangos force the CSRF
>> >> middleware even if it's not listed in MIDDLEWARE_CLASSES.
>> >
>> >
>> > You might be thinking of the CSRF context processor, which is always
>> > enabled, no matter what is in settings. Even the most recent docs don't
>> > say
>> > anything about forcing the middleware.
>> >>
>> >>
>> >> You could dive into the middleware code to see how this happens, and
>> >> come up with a stable strategy to circumvent it.  Or you could just
>> >> fix the necessary views and templates.  There is, after all, a chance
>> >> that you will want to be able to upgrade this site without jumping
>> >> through hoops.
>> >>
>> >> On Thu, Oct 4, 2012 at 4:56 AM, Laxmikant Gurnalkar
>> >>  wrote:
>> >> > Hi, Guys
>> >> >
>> >> > Disabling CSRF is not working.
>> >> > These are my midlewares., Removed {% csrf_token %} all templates.
>> >> >
>> >> > MIDDLEWARE_CLASSES = (
>> >> > 'django.middleware.common.CommonMiddleware',
>> >> > 'django.contrib.sessions.middleware.SessionMiddleware',
>> >> ># 'django.middleware.csrf.CsrfViewMiddleware',
>> >> > 'django.contrib.auth.middleware.AuthenticationMiddleware',
>> >> > #'django.contrib.messages.middleware.MessageMiddleware',
>> >> > #'django.middleware.csrf.CsrfResponseMiddleware',
>> >> > # 'igp_acfs.acfs.disablecsrf.DisableCSRF',
>> >> > )
>> >> >
>> >> >
>> >> > Also tried by writing disablecsrf.py like this :
>> >> >
>> >> > class DisableCSRF(object):
>> >> > def process_request(self, request):
>> >> > """
>> >> > """
>> >> > setattr(request, '_dont_enforce_csrf_checks', True)
>> >> >
>> >> >
>> >> > Thanks in Advance!!!
>> >> >
>> >> > Laxmikant
>> >> >
>> >> > --
>> >> > 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.
>> >>
>> >
>> >
>> > --
>> > Regards,
>> > Ian Clelland
>> > 
>> >
>> > --
>> > 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

Re: ANN: django-socketio 0.1.0 released

2012-10-09 Thread rahul jain
Can someone please let me know how to fix this?

On Sun, Oct 7, 2012 at 5:35 PM, rahul jain  wrote:
> Hi Stephen,
>
> I am having issues with the installation. Is this project still
> active? is there any goggle group?
>
> I just downloaded the latest file. Then i tried running the example
> chat application. I can see the messages from the client.
> However, events inside event.py are never getting fired. I think my
> setup is not able to load "events.py". I inserted some print
> statements in both these functions but they never getting printed out
>
> @events.on_message(channel="^room-")
> def message(request, socket, context, message):
>
> @events.on_finish(channel="^room-")
> def finish(request, socket, context):
>
> Please can you let me know how to fix this?
>
> My django version:
>
> (1, 3, 1, 'final', 0)
>
> Messages from the client after running on python manage.py runserver_socketio
>
> 127.0.0.1 - - [2012-10-07 17:02:13] "Socket.IO message: {u'action':
> u'start', u'room': 2, u'name': u'test'}"
> 127.0.0.1 - - [2012-10-07 17:02:54] "Socket.IO message: {u'action':
> u'start', u'room': 2, u'name': u'test'}"
> 127.0.0.1 - - [2012-10-07 17:03:05] "Socket.IO subscribe: room-2"
> 127.0.0.1 - - [2012-10-07 17:03:16] "Socket.IO subscribe: room-2"
> 127.0.0.1 - - [2012-10-07 17:04:23] "Socket.IO subscribe: room-2"
> 127.0.0.1 - - [2012-10-07 17:06:45] "Socket.IO subscribe: room-2"
> 127.0.0.1 - - [2012-10-07 17:06:50] "Socket.IO message: {u'action':
> u'start', u'room': 2, u'name': u'test'}"
> 127.0.0.1 - - [2012-10-07 17:07:52] "Socket.IO subscribe: room-2"
>
> Appreciate your time!
>
> Thanks.
>
> RJ
>
>
>
>
>
> On Fri, Aug 12, 2011 at 9:06 PM, Stephen McDonald  
> wrote:
>> Hi all,
>>
>> Our Django Dash entry http://drawnby.jupo.org made extensive use of
>> Socket.IO (cross-browser websockets) and born out of that I've created a new
>> django-socketio package which is now available:
>>
>> Github: https://github.com/stephenmcd/django-socketio
>> Bitbucket: https://bitbucket.org/stephenmcd/django-socketio
>> PyPI: http://pypi.python.org/pypi/django-socketio/
>>
>> Here's an overview from the docs:
>>
>> django-socketio is a BSD licensed Django application that brings together a
>> variety of features that allow you to use WebSockets seamlessly with any
>> Django project. django-socketio was inspired by Cody Soyland's introductory
>> blog post on using Socket.IO and gevent with Django, and made possible by
>> the work of Jeffrey Gelens' gevent-websocket and gevent-socketio packages.
>> The features provided by django-socketio are:
>>
>> - Installation of required packages from PyPI
>> - A management command for running gevent's pywsgi server with
>> auto-reloading capabilities
>> - A channel subscription and broadcast system that extends Socket.IO
>> allowing WebSockets and events to be partitioned into separate concerns
>> - A signals-like event system that abstracts away the various stages of a
>> Socket.IO request
>> - The required views, urlpatterns, templatetags and tests for all the above
>>
>> Cheers,
>> Steve
>>
>> --
>> Stephen McDonald
>> http://jupo.org
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To post to this group, send email to django-users@googlegroups.com.
>> To unsubscribe from this group, send email to
>> django-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/django-users?hl=en.

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



Re: Django 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: admin geodjango geometry and googlemaps v3

2012-10-09 Thread carlos
i thing the geodjango use openlayer.

cheer

On Tue, Oct 9, 2012 at 1:58 PM, NiL  wrote:

> Hi list,
>
> googlemaps v2 is deprecated @ google. I'm trying to use the googlemap's
> flavor of GeoAdmin, but to no luck.
>
> The code inside django.contrib.gis.maps.google.GoogleMap refers to the v2
> of the GM API. (I'm using django 1.4.1)
>
> I've googled around but to no luck yet.
>
>
> Resources I've read so far include:
>
> https://github.com/lambdalisue/django-googlemap-widget/blob/master/README.rst
>
> https://github.com/django/django-old/pull/16
>
> http://www.iknuth.com/2010/04/displaying-a-google-maps-api-v3-map-in-a-django-application-with-geodjango-and-postgis/
> http://code.google.com/p/django-gmapi/
>
>
> https://github.com/alanjds/django/blob/gis_gmaps_v3/django/contrib/gis/maps/google/gmap.py
> http://djangosnippets.org/snippets/1144/
>
>
> The admin page is working nicely w/ openstreetmap, but I really want to
> use googlemaps for editing.
>
> would anyone like to share some experience ?
> regards
> NiL
>
>  --
> 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/-/Gl0uvKGtRA0J.
> 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: Best practice of subclassing default/3rd part apps?

2012-10-09 Thread Bill Freeman
On Sat, Oct 6, 2012 at 12:04 PM, Xun Yang  wrote:
> Hi ke1g! Thanks a lot for the explanation! I'm currently using both the
> second and third approach for the problem, a utility app for a few things
> and embedding "registration" app in my project (Seeing it hasn't updated for
> years, I suppose it's safe to have it here and modify as I want). At certain
> point I may need to break utility app into new apps as the project goes. I'm
> also getting curious about the "requirements.txt" you talked about, seems
> like I need some good knowledge about version control.

Python has package management stuff.  The older "easy_install" is out
of favor, and people seem to prefer "pip", which is based on the
"distribute" app packaging system.  Both can be found on pypi:

http://pypi.python.org/pip
http://pypi.python.org/distribute

(The former requires the latter to be installed first, if you're not
already using them.)

You can have a "requirements" file, listing a number of packages, and
specifying the desired version number (or allowable range) for each
package.  If you call it "requirements.txt" (the name doesn't matter,
but this seems to be a common choice), then you can say:

   pip install -r requirements.txt

And pip will see to it that you have those versions of those packages
installed (plus any requirements that they specify).  There is syntax
for a requirements file to include others, which I've seen used when
the set of packages needed for, say, Windows is slightly different
than those needed on Linux.  Have a windows.txt and a linux.txt, each
of which include a base.txt, and specify the correct one of the first
two depending on where you're deploying.  I've also seen this used to
add debugging packages on a development server that one doesn't want
in production.  Sort of poor man's configuration management.

(Another possibility is zc.buildout, but that always makes my head
spin.  I'm just not in the right mindset for it.)

We put that file, along with our settings, urls, and custom apps
(manage.py and wsgi.py too) under version control.  Then when I get
something working on my desktop, I check it in to my local Mercurial
repository, push that to our remote development server (for access
from outside our local network) for further testing.  Ssh'ed into the
development server, I tell Mercurial to update to tip, and if I've
added any new packages from the outside world, run pip install -r
requirements.txt, restart apache, and solicit my co-developers to do
further testing.  If all goes well, the production server can pull the
new changes.  If something is later discovered to be broken, on the
production server I can revert to the last revision that worked, so
that it works properly while I figure out what's wrong back on the
development server.


>
> I hope the Django community has a plan of moving the support group out of
> Google Groups, which feels like a last century product and is hard to both
> keep track and read...
>
>
> On Friday, October 5, 2012 10:25:27 PM UTC+2, ke1g wrote:
>>
>> If your changes are limited to templates, there is an easy standard
>> approach:
>>
>> Set TEMPLATE_DIRS to something reasonable.
>> Include the file system template loader in TEMPLATE_LOADERS
>> *before* the app loader.  (This is probably already true.)
>>
>> Copy the templates you need to change to the same sub path of your
>> templates directory as they were to the app's templates directory, and
>> edit your copy.  E.g.; if the foo app calls out a template as
>> "foo/bar.html", and the original is in
>> ".../site-packages/foo/templates/foo/bar.html", and you put your
>> version in ".../templates/foo/bar.html", your version will be found
>> first, and thus will be the one used.
>>
>> If you need to fiddle a view, you need to recreate the view (or, if
>> applicable, create a function that calls the view and massages the
>> arguments and/or the results) in a module of your own that is
>> available from sys.path, e.g.; ".../my_utils/extra_views.py", and fix
>> urls.py to call it instead.  You can do this even if you are
>> "include()"ing the apps urls module from your urls, since you can put
>> an expression that matches a specific on or the app's sub paths before
>> the include, and the other sub paths will still be handled by the
>> app's urls.
>>
>> Fancier changes usually lead to cloning the app into your project
>> directory and putting it under your revision control system, rather
>> than in requirements.txt (or equivalent).  (Your project directory
>> needs to be, and typically will be, earlier on sys.path than
>> site-packages or (yuck) dist-packages.)
>>
>> Installing upgrades to other packages CAN (but usually doesn't) break
>> any of these approaches, requiring you to track down the interaction
>> and edit your copy.
>>
>> On Thu, Oct 4, 2012 at 5:53 AM, Xun Yang  wrote:
>> > Quite often I have to make small changes to the original code when I'm
>> > using
>> > default/3rd part apps. Take 

Re: invalid syntax (admin.py, line 25)

2012-10-09 Thread Nick Dokos
Jim Wombles  wrote:

> I'm working through the Django Tutorial: Photo Organizer and Sharing App and 
> I am getting an invalid syntax error in line 25 of admin.py:
> 
> 1st = [x[1] for x in self.tags.values_list()]
> 

Forget django: just go into the python interpreter and say

1st = 3

Same error, right? :-)

Nick

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



Email new users account details

2012-10-09 Thread Ian Foote
I'm working on a small website for a small walking/mountaineering club. 
We would like to create accounts for our members using the admin site, 
and automatically email their details. I've googled a bit, but it isn't 
obvious to me if I can do this. Ideally, we would add a username (email 
address) and email the user a random password which they change when 
they first log in.


Is this a sensible approach, and how can I do this?

Thanks,
Ian

--
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: Managers, Queryset, inheritance and polymorphism

2012-10-09 Thread Amirouche Boubekki
Thx Lachlan, I'm not sure to understand everything, I think I will have to
track this variables in the code to see how they are used.

I found out about my bug, it was the import of a pyc that made all the
machinery buggy.

Thanks,

Amirouche

-- 
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: Email new users account details

2012-10-09 Thread Bill Freeman
Perhaps what you want to do is generate a password reset email for
them.  We know that you've set their email (or you couldn't mail them)
and username (since that's required for an account?).  There is no
need to set a password.  The reset email contains a link with a magic
number in the urlpath, and it is assumed that only the addressee will
have that information (optimistic, I know).  When that link is
visited, and if the magic number hasn't expired, the user is presented
with a form for setting a new password for his account.  This is all
in place already.

You may want to add a convenient form for sending these things (I
don't remember whether the existing admin form has a password email
button).  But at worst, you can go to the forgotten password page and
enter their email.  You might need to modify the email template to
include the username in the email.

On Tue, Oct 9, 2012 at 5:59 PM, Ian Foote  wrote:
> I'm working on a small website for a small walking/mountaineering club. We
> would like to create accounts for our members using the admin site, and
> automatically email their details. I've googled a bit, but it isn't obvious
> to me if I can do this. Ideally, we would add a username (email address) and
> email the user a random password which they change when they first log in.
>
> Is this a sensible approach, and how can I do this?
>
> Thanks,
> Ian
>
> --
> 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.



Duplicate entry error from syncdb

2012-10-09 Thread Larry Martell
I added a new model and then ran syncdb. It failed with:

django.db.utils.IntegrityError: (1062, "Duplicate entry
'1-add_permission' for key 'content_type_id'")


I removed the new model and ran it again and got the same error. I've
run syncdb many times on this same machine before with no issues.
Anyone know what is going on here?

-larry

-- 
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: Duplicate entry error from syncdb

2012-10-09 Thread Larry Martell
On Tue, Oct 9, 2012 at 5:50 PM, Larry Martell  wrote:
> I added a new model and then ran syncdb. It failed with:
>
> django.db.utils.IntegrityError: (1062, "Duplicate entry
> '1-add_permission' for key 'content_type_id'")
>
>
> I removed the new model and ran it again and got the same error. I've
> run syncdb many times on this same machine before with no issues.
> Anyone know what is going on here?

With the debugger I was able to see the sql that it's executing that
causing the error:

(Pdb) print sql
INSERT INTO `auth_permission` (`name`, `content_type_id`, `codename`)
VALUES (%s, %s, %s), (%s, %s, %s), (%s, %s, %s), (%s, %s, %s), (%s,
%s, %s), (%s, %s, %s), (%s, %s, %s), (%s, %s, %s), (%s, %s, %s)
(Pdb) print params
(u'Can add permission', 1, u'add_permission', u'Can change
permission', 1, u'change_permission', u'Can delete permission', 1,
u'delete_permission', u'Can add group', 2, u'add_group', u'Can change
group', 2, u'change_group', u'Can delete group', 2, u'delete_group',
u'Can add user', 3, u'add_user', u'Can change user', 3,
u'change_user', u'Can delete user', 3, u'delete_user')

Of course, those rows are already there. But why is it suddenly trying
to insert them?

-- 
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: Duplicate entry error from syncdb

2012-10-09 Thread Larry Martell
On Tue, Oct 9, 2012 at 6:22 PM, Larry Martell  wrote:
> On Tue, Oct 9, 2012 at 5:50 PM, Larry Martell  wrote:
>> I added a new model and then ran syncdb. It failed with:
>>
>> django.db.utils.IntegrityError: (1062, "Duplicate entry
>> '1-add_permission' for key 'content_type_id'")
>>
>>
>> I removed the new model and ran it again and got the same error. I've
>> run syncdb many times on this same machine before with no issues.
>> Anyone know what is going on here?
>
> With the debugger I was able to see the sql that it's executing that
> causing the error:
>
> (Pdb) print sql
> INSERT INTO `auth_permission` (`name`, `content_type_id`, `codename`)
> VALUES (%s, %s, %s), (%s, %s, %s), (%s, %s, %s), (%s, %s, %s), (%s,
> %s, %s), (%s, %s, %s), (%s, %s, %s), (%s, %s, %s), (%s, %s, %s)
> (Pdb) print params
> (u'Can add permission', 1, u'add_permission', u'Can change
> permission', 1, u'change_permission', u'Can delete permission', 1,
> u'delete_permission', u'Can add group', 2, u'add_group', u'Can change
> group', 2, u'change_group', u'Can delete group', 2, u'delete_group',
> u'Can add user', 3, u'add_user', u'Can change user', 3,
> u'change_user', u'Can delete user', 3, u'delete_user')
>
> Of course, those rows are already there. But why is it suddenly trying
> to insert them?

I deleted all the rows from auth_permission and then the error went
away. Ran it multiple times, and the error did not reoccur. Weird. I'd
love to know what made this suddenly happen.

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



Object Serializer

2012-10-09 Thread Victor Manuel Quiñones Victor
Hi guys, I need some help here...

I need to serialize some objects and save them into the database. What
library would you suggest for it?

Thank you

-- 
Quiñones Victor Manuel
Tel: +54 0362 15 4 880839
Resistencia - 3500
Argentina

-- 
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 testing strategy

2012-10-09 Thread Lachlan Musicman
This has been a very interesting thread - out of interest, does anyone
have a preference for one of factory-boy or django-dynamic-fixture and
why?

They look similarly up to date and useful, but I've no idea how to
differentiate them.

cheers
L.

-- 
...we look at the present day through a rear-view mirror. This is
something Marshall McLuhan said back in the Sixties, when the world
was in the grip of authentic-seeming future narratives. He said, “We
look at the present through a rear-view mirror. We march backwards
into the future.”

http://www.warrenellis.com/?p=14314

-- 
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: Object Serializer

2012-10-09 Thread Mike Dewhirst

On 10/10/2012 12:10pm, Victor Manuel Quiñones Victor wrote:

Hi guys, I need some help here...

I need to serialize some objects and save them into the database. What
library would you suggest for it?


Have you looked at ...

https://docs.djangoproject.com/en/1.4/topics/serialization/




Thank you

--
Quiñones Victor Manuel
Tel: +54 0362 15 4 880839
Resistencia - 3500
Argentina

--
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: Disabling CSRF is not working.

2012-10-09 Thread Laxmikant Gurnalkar
Yeah, Thanks a lot. now I preferred to work with CSRF.

On Wed, Oct 10, 2012 at 2:24 AM, Bill Freeman  wrote:

> If you can't disable the middleware, you could consider marking the
> view with the csrf_exempt decorator from django.views.decorators.csrf
> (see https://docs/djangoproject.com/en/1.4/contrib/csrf/#utilities
>
> Bill
>
> On Sun, Oct 7, 2012 at 3:41 AM, Laxmikant Gurnalkar
>  wrote:
> > Thanks, for the response.
> > I had a problem like this
> >I was trying to create a  storesite which can be worked without django
> > framework but using django. i.e just static template index.html & a
> > java-script file. With all the stuff dynamically generated & only urls by
> > the django, so that anybody can use my index.html, just calls my server
> for
> > the url to display dynamic content using users information.
> > so for this purpose I had a cookies resided in my browser and I was
> trying
> > to create database objecst using javascript with api urls.
> >
> > When I studied CSRF in detail, I understood that, private dynamic
> > javascript cookies cannot be directly used to  retrieve or access the
> > database related to your site. Hence, my javascript was considered by
> django
> > as a malicious/attack content and thrown a 403 forbidden error. So I was
> > trying to remove the CSRF from my project. But Failed. Due to the same
> > reason as you guys have told me.
> > So on understanding CSRF  just removed code of cookies & just added
> > parameters to url just before when user refreshes the page. And whole
> thing
> > worked.  That was the Great  experience.
> >
> > anyways,
> > Plz tell me if I can hv any other method to do this. adding parameters to
> > url is definitely not secure always.
> >
> > One more thing I am using csrf_exempt to handle api views.
> >
> > Thanks a lot again.
> >
> > On Sat, Oct 6, 2012 at 4:38 AM, Bill Freeman  wrote:
> >>
> >> Right you are.
> >>
> >> On Fri, Oct 5, 2012 at 6:20 PM, Ian Clelland 
> wrote:
> >> >
> >> >
> >> > On Friday, October 5, 2012, Bill Freeman wrote:
> >> >>
> >> >> I believe that I read somewhere that newer Djangos force the CSRF
> >> >> middleware even if it's not listed in MIDDLEWARE_CLASSES.
> >> >
> >> >
> >> > You might be thinking of the CSRF context processor, which is always
> >> > enabled, no matter what is in settings. Even the most recent docs
> don't
> >> > say
> >> > anything about forcing the middleware.
> >> >>
> >> >>
> >> >> You could dive into the middleware code to see how this happens, and
> >> >> come up with a stable strategy to circumvent it.  Or you could just
> >> >> fix the necessary views and templates.  There is, after all, a chance
> >> >> that you will want to be able to upgrade this site without jumping
> >> >> through hoops.
> >> >>
> >> >> On Thu, Oct 4, 2012 at 4:56 AM, Laxmikant Gurnalkar
> >> >>  wrote:
> >> >> > Hi, Guys
> >> >> >
> >> >> > Disabling CSRF is not working.
> >> >> > These are my midlewares., Removed {% csrf_token %} all templates.
> >> >> >
> >> >> > MIDDLEWARE_CLASSES = (
> >> >> > 'django.middleware.common.CommonMiddleware',
> >> >> > 'django.contrib.sessions.middleware.SessionMiddleware',
> >> >> ># 'django.middleware.csrf.CsrfViewMiddleware',
> >> >> > 'django.contrib.auth.middleware.AuthenticationMiddleware',
> >> >> > #'django.contrib.messages.middleware.MessageMiddleware',
> >> >> > #'django.middleware.csrf.CsrfResponseMiddleware',
> >> >> > # 'igp_acfs.acfs.disablecsrf.DisableCSRF',
> >> >> > )
> >> >> >
> >> >> >
> >> >> > Also tried by writing disablecsrf.py like this :
> >> >> >
> >> >> > class DisableCSRF(object):
> >> >> > def process_request(self, request):
> >> >> > """
> >> >> > """
> >> >> > setattr(request, '_dont_enforce_csrf_checks', True)
> >> >> >
> >> >> >
> >> >> > Thanks in Advance!!!
> >> >> >
> >> >> > Laxmikant
> >> >> >
> >> >> > --
> >> >> > 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.
> >> >>
> >> >
> >> >
> >> > --
> >> > Regards,
> >> > Ian Clelland
> >> > 
> >> >
> >> > --
> >> > You received this message because you are subscribed to the Google
> >> > Groups
> >> > "Django users" group.
> >> > To post to this group, send e

A very basic question with Django

2012-10-09 Thread Sarbjit singh
First of all, I am very sorry for asking this basic question. I am not sure 
if this is the right place to put this question but I am very confused.

I am not having much experience with web development, so i don't know where 
the Django fits in here. I searched a lot on internet, few forums suggested 
to use Django for websites and few mentioned that Django is not for web 
development. So i have couple of basic questions and i want to be sure that 
i am on right track in learning Django.

Q: There are simple websites which just serves static contents and other 
site which deals with forms and data base. I have once used PHP for form 
processing and using it with DB. If i have to design such websites using 
Python, Is Django suitable for the following or there are some other 
modules which needs to be used.

Q: Is Django a substitute to CGI for dynamic web generation.

Q: Can i use Django for development of a full fledged website.




-- 
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/-/ksXPpVuDYSkJ.
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: A very basic question with Django

2012-10-09 Thread Tomáš Ehrlich
Hello,
I wouldn't say that Django is not suitable for web development. Even when 
someone says it's not, it's just an opinion, but in general, Django is 
framework for web development.

A1: Django has many batteries included. Database access through object 
relational model and form processing are just two parts from whole bunch. 
Checkout the documentation for latest stable version of 
Django https://docs.djangoproject.com/en/1.4/

A2: I admit that I don't know exactly what CGI means, but you actually can 
deploy Django using FastCGI. I'm using WSGI, which is recommended method 
right now. Please checkout documentation for more 
details https://docs.djangoproject.com/en/1.4/howto/deployment/fastcgi/

A3: I believe you can. Do you know pinterest.com, disgus.com, 
instagram.com? They're all written in Django. Please checkout the homepage 
of Djangoproject for more https://www.djangoproject.com/ (column Sites 
using django) or directly http://www.djangosites.com. Some of these sites 
have source code available.

My conclusion is: Django is suitable for web development. It's a great 
project with perfect documentation and community. Checkout the tutorial, 
it's really helpful https://docs.djangoproject.com/en/1.4/intro/tutorial01/

Cheers,
 Tom

Dne středa, 10. října 2012 7:24:26 UTC+2 Sarbjit singh napsal(a):
>
> First of all, I am very sorry for asking this basic question. I am not 
> sure if this is the right place to put this question but I am very confused.
>
> I am not having much experience with web development, so i don't know 
> where the Django fits in here. I searched a lot on internet, few forums 
> suggested to use Django for websites and few mentioned that Django is not 
> for web development. So i have couple of basic questions and i want to be 
> sure that i am on right track in learning Django.
>
> Q: There are simple websites which just serves static contents and other 
> site which deals with forms and data base. I have once used PHP for form 
> processing and using it with DB. If i have to design such websites using 
> Python, Is Django suitable for the following or there are some other 
> modules which needs to be used.
>
> Q: Is Django a substitute to CGI for dynamic web generation.
>
> Q: Can i use Django for development of a full fledged website.
>
>
>
>
>

-- 
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/-/ZvNZXaaDuWoJ.
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: A very basic question with Django

2012-10-09 Thread Tomáš Ehrlich
Ehm, It's not disgus but http://www.disqus.com ;) Sorry...

Dne středa, 10. října 2012 8:09:07 UTC+2 Tomáš Ehrlich napsal(a):
>
> Hello,
> I wouldn't say that Django is not suitable for web development. Even when 
> someone says it's not, it's just an opinion, but in general, Django is 
> framework for web development.
>
> A1: Django has many batteries included. Database access through object 
> relational model and form processing are just two parts from whole bunch. 
> Checkout the documentation for latest stable version of Django 
> https://docs.djangoproject.com/en/1.4/
>
> A2: I admit that I don't know exactly what CGI means, but you actually can 
> deploy Django using FastCGI. I'm using WSGI, which is recommended method 
> right now. Please checkout documentation for more details 
> https://docs.djangoproject.com/en/1.4/howto/deployment/fastcgi/
>
> A3: I believe you can. Do you know pinterest.com, disgus.com, 
> instagram.com? They're all written in Django. Please checkout the 
> homepage of Djangoproject for more https://www.djangoproject.com/ (column 
> Sites using django) or directly http://www.djangosites.com. Some of these 
> sites have source code available.
>
> My conclusion is: Django is suitable for web development. It's a great 
> project with perfect documentation and community. Checkout the tutorial, 
> it's really helpful 
> https://docs.djangoproject.com/en/1.4/intro/tutorial01/
>
> Cheers,
>  Tom
>
> Dne středa, 10. října 2012 7:24:26 UTC+2 Sarbjit singh napsal(a):
>>
>> First of all, I am very sorry for asking this basic question. I am not 
>> sure if this is the right place to put this question but I am very confused.
>>
>> I am not having much experience with web development, so i don't know 
>> where the Django fits in here. I searched a lot on internet, few forums 
>> suggested to use Django for websites and few mentioned that Django is not 
>> for web development. So i have couple of basic questions and i want to be 
>> sure that i am on right track in learning Django.
>>
>> Q: There are simple websites which just serves static contents and other 
>> site which deals with forms and data base. I have once used PHP for form 
>> processing and using it with DB. If i have to design such websites using 
>> Python, Is Django suitable for the following or there are some other 
>> modules which needs to be used.
>>
>> Q: Is Django a substitute to CGI for dynamic web generation.
>>
>> Q: Can i use Django for development of a full fledged website.
>>
>>
>>
>>
>>

-- 
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/-/bF89jeIqADIJ.
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: A simple LinkedIn site with django

2012-10-09 Thread Sergiy Khohlov
In this case I'm proposing to start from simple things.
 You have saving data from router to the text file ?  Perfect.
 Simple plan:
Write a structure of  the records
 Build a django  model on it
 Try to save your data using django model
  View your data in your browser via  django vie and template

 Need more ?
 Learn javascript  and switch all  view to Ajax

 thanks,
 Serge

2012/10/9 David Gomez :
> Waooo, this is the first time that I ask something in a post and somebody
> reply me with what I want. Thanks a lot. Well about Python, I'm a network
> engineer and in my job they encounter an issue that a script was needed, so
> I choose Pyhton and basically in the last month, I been doing python
> automation script for login into routers and grabbing info and either save
> it as a text file or spreadsheet. People at my swear that I have years of
> experience with Python, LOL. Thanks a lot.
>
> On Tuesday, October 9, 2012 1:41:12 PM UTC-4, Joel Goldstick wrote:
>>
>> On Tue, Oct 9, 2012 at 1:01 PM, David Gomez  wrote:
>> > When you say is write to the paper, what do you mean? I'm new in
>> > programming
>> > and I just looking for a project, so  I can learn on the fly. I'm
>> > looking
>> > almost the same as linkedin with less option. Like when a user go to the
>> > website, they see the main page, then they can to register, adding their
>> > personal information (school, resume, etc...). Also other section for
>> > employers where they register and after the register they can search for
>> > future hiring.
>>
>> So you want a website that display some (probably static) home page.
>> It must have a system to allow users to register, setting username,
>> password and perhaps other information
>> It must have a system to allow employers to do the same, but
>> differentiate between the two
>> You need to understand how to create models in django and learn to use
>> modelforms to allow users to enter information
>>
>> If you get that far, come back.  In between there will be a lot of
>> questions.
>>
>> First step, go through the django tutorial.  Do it two or three times
>> Second step, search for other tutorials on django programming.  You
>> will find more than several -- both video and text.
>> Go through several of these to help your understanding.
>>
>> Then go back to your project when you think you understand all the
>> django pieces:
>>   1. urls.py
>>   2. settings --
>>   3. database settings
>>   4. models
>>   5. views
>>
>> When its all done you will need to learn to deploy it on a 'real server'
>>
>> If you are new to programming, you have a lot in front of you.  Not
>> days, not weeks, but months
>>
>> keep at it
>>
>> Oh, and also read python tutorials, and write python code to learn how
>> python works.  Django is a python application, so if you can't write
>> in python, you can't use django
>>
>> >
>> >
>> > On Monday, October 8, 2012 8:13:46 PM UTC-4, David Gomez wrote:
>> >>
>> >> I have project in mind and I was thinking how hard is to create my
>> >> project. Is going to be like a LinkedIn, but a simple one. How hard is
>> >> to
>> >> make a web application like this? And what is the hardest part? Thanks
>> >> in
>> >> advance
>> >
>> > --
>> > 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/-/8NvC31dU5WkJ.
>> >
>> > To post to this group, send email to django...@googlegroups.com.
>> > To unsubscribe from this group, send email to
>> > django-users...@googlegroups.com.
>> > For more options, visit this group at
>> > http://groups.google.com/group/django-users?hl=en.
>>
>>
>>
>> --
>> Joel Goldstick
>
> --
> 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/-/4Rfh29yJI4AJ.
>
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.

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



Re: Django performance vs others

2012-10-09 Thread Moonlight
I have checked django 
codeused
 in 
this post. It 
is not parsing... just render, here is django template:

{% for row in table %}{% for key, value in row.items 
%}{{ key }}{{ value }}{% endfor %}   
 {% endfor %}


It renders a thousand rows and few columns.

On Friday, October 5, 2012 3:14:43 PM, Kurtis wrote:
>
> Probably the ability to both extend and include (template inheritance)
>
> On Fri, Oct 5, 2012 at 9:24 AM, Amirouche Boubekki 
> 
> > wrote:
>
>> I have had no idea until recently that django template are sooo slow... 
>>> other engines do the same... but spent less time. What the cool feature 
>>> prevent it for rendering it faster?
>>
>>
>> The template parsing I guess, but I'm not sure.
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Django users" group.
>> To post to this group, send email to django...@googlegroups.com
>> .
>> To unsubscribe from this group, send email to 
>> django-users...@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 view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/0XK7poV-brwJ.
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.