Re: ANN: django-otp and friends: one-time passwords and trusted agents

2013-07-01 Thread Jason Arnst-Goodrich
I'm glad you saw my message - if nothing else just so you know this project 
is appreciated.

I've got it working with Google's Authenticator.

I had initially planned to use another project out there for my OTP needs 
(there's a small number of them that work 'out of the box') because yours 
took a little extra effort to hook up.

I ended up going back and using yours though because it's truly in another 
class. I have the basics working right now.

I have a couple of questions - I'm trying to make a self service system for 
allowing users to enable two factor authentication.

If I loop django_otp.devices_for_user to allow them to manage their 
existing devices, It's hard to link to a details page for each device. It 
might help to have a get_absolute_url() defined on the model (which can be 
overridden is settings). Right now I'm piping it to a template filter using 
ContentTypes. TBH, I'm pretty new to dealing with this pattern so I might 
be thinking about it wrong.

Lastly, what I'll probably end up doing is building a decorator that 
basically says "require two factor auth if they have it turned on".

I guess if I had a wishlist it would be to see a baseline for allowing uses 
to manage their own OTP devices as well as that decorator built in. I 
understand it's probably out of the scope of what you have right now. I'd 
still like like to see something that ties it up nicely. That's basically 
what I'm building right now except I don't trust my build to work in anyone 
else's setup - although if I have time I'll see if I can go back and 
refactor it.

Anyways, thanks again for the work you've done - it's outstanding.

On Monday, July 1, 2013 9:26:06 PM UTC-7, Peter Sagerson wrote:
>
> Thanks, I'm glad you like it. I can look into some kind of demo, although 
> Authenticator support is pretty simple. The documentation already links to 
> Google's URI scheme[1], which has all of the details. All you have to do is 
> create a TOTP or HOTP device (usually the former), encode the key with 
> base32, build a URI as documented, and render a QR code for the user to 
> scan. Alternatively, the user can also type the base32-encoded key in 
> manually. 
>
>
> [1] http://code.google.com/p/google-authenticator/wiki/KeyUriFormat 
> [2] https://pypi.python.org/pypi/qrcode 
>
>
> On Jun 28, 2013, at 10:23 AM, Jason Arnst-Goodrich 
>  
> wrote: 
>
> > I just stumbled on this and it looks absolutely amazing. I do have one 
> request though: can we get a sample project up that uses Google's 
> authenticator (or anything else). 
> > 
> > This looks like the best solution for two factor authentication for 
> Django but I don't think many people will know where to start when it comes 
> to using it (myself included). 
> > 
> > On Wednesday, September 12, 2012 1:27:26 PM UTC-7, Peter Sagerson wrote: 
> > I recently released a suite of packages to support two-factor 
> authentication in Django by way of one-time passwords. 
> > 
> > The core package is django-otp, which defines the framework and provides 
> all of the shared APIs. Integration is possible at several levels, from 
> low-level APIs (devices_for_user(), match_token(), etc.); to an 
> AuthenticationForm subclass; to a replacement for Django's login view and 
> an OTP-enabled admin site. Other niceties include the otp_required 
> decorator, an analog to login_required. This is not an authentication 
> backend: although it depends on django.contrib.auth for modeling purposes, 
> it operates independently of the normal authentication machinery. 
> > 
> > A given user may have zero or more OTP devices against which we can 
> verify a one-time password. The core project includes Django apps that 
> implement common devices such as HOTP and TOTP (compatible with Google 
> Authenticator, among others) and static passwords (typically used as backup 
> codes). The former include standard features such as tolerance and drift. 
> Separately, django-otp-yubikey provides support for YubiKey devices 
> (locally or remotely verified). django-otp-twilio provides support for 
> Twilio's SMS service for delivering codes by SMS. Implementing support for 
> additional mechanisms is as simple as subclassing an abstract model class 
> and implementing a verification method (and optionally a challenge method). 
> Raw implementations of HOTP and TOTP are provided for convenience along 
> with a few other generally useful utility functions. 
> > 
> > As a companion to these, I've also released django-agent-trust, which 
> uses Django 1.4's signed key APIs to tag user-agents that the user has 
> identified as trustworthy. In other words, this implements the "This is a 
> private/shared computer" option one often sees on sensitive sites. Features 
> include revocation and expiration (both absolute and by inactivity; 
> globally, per-user, and per-agent). django-otp-agents is a project that 
> glues together django-otp and django-agent-trust to assign trust to 
> 

Re: data transfer between databases

2013-07-01 Thread Mike Dewhirst
On Monday, July 1, 2013 10:32:53 PM UTC+10, si...@2ndquadrant.com wrote:

> On 1 July 2013 13:02, Mike Dewhirst  >wrote:
>  
>
>> On 1/07/2013 9:35pm, Tom Evans wrote:
>>
>>> On Sun, Jun 30, 2013 at 11:24 PM, Mike Dewhirst 
>>>  
>>> wrote:
>>>
 mulianto and Avraham

 Thanks for your suggestions. Dumping data isn't the entire problem - 
 which
 is this:

 There will be an *ongoing* need to add new data from tables in one 
 database
 to the same-named tables in another database on a remote machine. Two 
 of the
 tables are in a m2m relationship.

  
> You can use direct access via "foreign tables" the name of the Postgres 
> distributed database feature.
> http://www.postgresql.org/docs/devel/static/sql-createforeigntable.html
>

Simon

I read the 
sql-createforeigntable
 page 
and I think I know what a distributed database is versus a replicated 
database. But I have no idea why I would choose one over the other. Can you 
suggest?

In any case, I'm 99% sure I should "refactor" (if that's the right word) 
the reference tables out of the database into a separate database and get 
to that data via a Django router. Not sure how I'll do that just yet but it 
has to come ahead of a distribute/replicate solution.

Thanks

Mike

 

-- 
 Simon Riggs   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services
 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: ANN: django-otp and friends: one-time passwords and trusted agents

2013-07-01 Thread Peter Sagerson
Thanks, I'm glad you like it. I can look into some kind of demo, although 
Authenticator support is pretty simple. The documentation already links to 
Google's URI scheme[1], which has all of the details. All you have to do is 
create a TOTP or HOTP device (usually the former), encode the key with base32, 
build a URI as documented, and render a QR code for the user to scan. 
Alternatively, the user can also type the base32-encoded key in manually.


[1] http://code.google.com/p/google-authenticator/wiki/KeyUriFormat
[2] https://pypi.python.org/pypi/qrcode


On Jun 28, 2013, at 10:23 AM, Jason Arnst-Goodrich  wrote:

> I just stumbled on this and it looks absolutely amazing. I do have one 
> request though: can we get a sample project up that uses Google's 
> authenticator (or anything else).
> 
> This looks like the best solution for two factor authentication for Django 
> but I don't think many people will know where to start when it comes to using 
> it (myself included).
> 
> On Wednesday, September 12, 2012 1:27:26 PM UTC-7, Peter Sagerson wrote:
> I recently released a suite of packages to support two-factor authentication 
> in Django by way of one-time passwords.
> 
> The core package is django-otp, which defines the framework and provides all 
> of the shared APIs. Integration is possible at several levels, from low-level 
> APIs (devices_for_user(), match_token(), etc.); to an AuthenticationForm 
> subclass; to a replacement for Django's login view and an OTP-enabled admin 
> site. Other niceties include the otp_required decorator, an analog to 
> login_required. This is not an authentication backend: although it depends on 
> django.contrib.auth for modeling purposes, it operates independently of the 
> normal authentication machinery.
> 
> A given user may have zero or more OTP devices against which we can verify a 
> one-time password. The core project includes Django apps that implement 
> common devices such as HOTP and TOTP (compatible with Google Authenticator, 
> among others) and static passwords (typically used as backup codes). The 
> former include standard features such as tolerance and drift. Separately, 
> django-otp-yubikey provides support for YubiKey devices (locally or remotely 
> verified). django-otp-twilio provides support for Twilio's SMS service for 
> delivering codes by SMS. Implementing support for additional mechanisms is as 
> simple as subclassing an abstract model class and implementing a verification 
> method (and optionally a challenge method). Raw implementations of HOTP and 
> TOTP are provided for convenience along with a few other generally useful 
> utility functions.
> 
> As a companion to these, I've also released django-agent-trust, which uses 
> Django 1.4's signed key APIs to tag user-agents that the user has identified 
> as trustworthy. In other words, this implements the "This is a private/shared 
> computer" option one often sees on sensitive sites. Features include 
> revocation and expiration (both absolute and by inactivity; globally, 
> per-user, and per-agent). django-otp-agents is a project that glues together 
> django-otp and django-agent-trust to assign trust to user-agents by way of 
> two-factor authentication (one of the most common scenarios, it seems).
> 
> Documentation: django-otp, django-otp-yubikey, django-otp-twilio, 
> django-agent-trust, django-otp-agents
> Bitbucket: django-otp, django-agent-trust
> 
> As always, the as-is clause in the BSD license isn't kidding. It's early days 
> for these yet and while everything has been carefully documented and 
> unit-tested, not all of the code has had contact with the real world. 
> Feedback is always welcome. The Google group 
> https://groups.google.com/forum/#!forum/django-otp is available for 
> discussion and questions.
> 
> Thanks,
> Peter
> 
> -- 
> You received this message because you are subscribed to a topic in the Google 
> Groups "Django users" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/django-users/b47ONAEWFos/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to 
> django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: Getting URL root

2013-07-01 Thread Mike Dewhirst

On 2/07/2013 10:09am, Larry Martell wrote:

I have an app I distribute to clients.

When I run the app on my local machine I connect to http://127.0.0.1/...
When I'm VPN-ed into a client site I connect to the app on their
machine with http://xx.xx.xx.xx/...
When a client is running locally at their site they connect with
http://myappsname.company.com/

I need to get that initial part of the URL from the python side. Is
there some way to do that? (I may be using the wrong terminology here
when I say 'url root'.)



Try this ...

import socket
def get_fully_qualified_domain_name():
return socket.getfqdn()

This may or may not be what you want.

In any case, you will need to include the domain name of the host (to 
which you distribute your app) in settings.ALLOWED_HOSTS [1]


Additionally, you might want a utility method to return the desired url 
prefix in your get_absolute_url() methods. Perhaps like this if you use 
the contrib.sites app ...


from django.contrib.sites.models import Site
def get_domain():
return Site.objects.get_current()

... which requires that you find some way to include the client domain 
in the Site table and insert that site.id into your various client's 
settings.SITE_ID


Alternatively, you could just parse the fully qualified domain name 
returned by socket.getfqdn() and use it in the above get_domain() or 
your get_absolute_url() methods.


[1] I follow the 2 scoops advice and have separate settings files for 
separate servers. I edit them manually for the very few servers my stuff 
runs on. AND I make sure the sites table is identical on all sites so I 
don't have to think about it ever again. YMMV.


Mike

--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Getting URL root

2013-07-01 Thread Sithembewena Lloyd Dube
It sounds like you want to get the subdomain. Havew a look at the urlparse
module and its usage.

http://stackoverflow.com/questions/6925825/get-subdomain-from-url-using-python


On Tue, Jul 2, 2013 at 2:09 AM, Larry Martell wrote:

> I have an app I distribute to clients.
>
> When I run the app on my local machine I connect to http://127.0.0.1/...
> When I'm VPN-ed into a client site I connect to the app on their
> machine with http://xx.xx.xx.xx/...
> When a client is running locally at their site they connect with
> http://myappsname.company.com/
>
> I need to get that initial part of the URL from the python side. Is
> there some way to do that? (I may be using the wrong terminology here
> when I say 'url root'.)
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>


-- 
Regards,
Sithu Lloyd Dube

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Getting URL root

2013-07-01 Thread Larry Martell
I have an app I distribute to clients.

When I run the app on my local machine I connect to http://127.0.0.1/...
When I'm VPN-ed into a client site I connect to the app on their
machine with http://xx.xx.xx.xx/...
When a client is running locally at their site they connect with
http://myappsname.company.com/

I need to get that initial part of the URL from the python side. Is
there some way to do that? (I may be using the wrong terminology here
when I say 'url root'.)

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: jquery in django

2013-07-01 Thread Marcin Szamotulski
On 13:20 Mon 01 Jul , Christian Erhardt wrote:
> Hey Harjot,
> 
> i can't provide an easy answer to your question. An Ajax enabled search with 
> django is nothing, that one programs in 30 minutes especially not if he has 
> no understanding of query and or ajax.
> 
> I'll try to give you some hints but not a complete plug n play solution. 
> 
> First things first. Jquery is a Javascript framework. One function it 
> provides is to handle ajax requests. In short: Javascript running in the 
> users browser calls the server  and with help of jquery you modify the DOM of 
> the html page. So you don't have to reload the html page for each request. 
> 
> Now django comes to play. Django just handles the request. So you will need a 
> page which will return search results for a query you submitted. If you call 
> a django page it usually returns a html page. For ajax calls you would not 
> work with html. Most pages use json to serialize data. There is a plugin 
> called tasrypie which we use. It provides an ajax endpoint. As i recall it 
> has a built in search function. Maybe you try this first. There are more high 
> sophisticated search engines for django... but i'd give tastypie a try.
> 
> If everything is set up correct you can call an endpoint for your model with 
> a jquery ajax call.
> 
> But this is acomplex task!
> 
> Regards
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> For more options, visit https://groups.google.com/groups/opt_out.
> 

If you will follow the advices to learn AJAX and jQuery and how to use
them with Django then you can check if one of those plugins can help
you:
https://www.djangopackages.com/grids/g/auto-complete/

Best regards,
Marcin

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Overriding CSS class for form widgets with generic editing views

2013-07-01 Thread Branko Majic
Hello all,

I'm interested in finding-out the best practices for overriding the
form widgets styling by assigning appropriate CSS classes to them. In
particular, I'm trying to determine the best place (tm) to modify that
information when using the generic editing views
(CreateView/UpdateView).

Right now I do this by overriding the get_form in a CreateView (for
example), and having code along the lines of:

%
form = super(ProjectCreateView, self).get_form(form_class)
form.fields["name"].widget.attrs["class"] = "span6"
form.fields["description"].widget.attrs["class"] = "span6"

return form
%

Is this a good way to do it in order to reduce writing lots of
boilerplate, or should it be better to use a custom ModelForm +
FormView?

Best regards

-- 
Branko Majic
Jabber: bra...@majic.rs
Please use only Free formats when sending attachments to me.

Бранко Мајић
Џабер: bra...@majic.rs
Молим вас да додатке шаљете искључиво у слободним форматима.


signature.asc
Description: PGP signature


Re: nginx and apache

2013-07-01 Thread Rafael E. Ferrero
i installed apache, its strong but seems to nginx its more faster... i'll
planning change to nginx... are some people using nginx for static server
and apache for app server... others says that nginx with lighttpd its more
faster (and better for concurrency).
For now im using only one web-server.

Cheers


2013/7/1 Kakar Arunachal Service 

> Hi,
> I am very confused with these two. I know about apache, but not much. And
> then i came across nginx and that its much faster and easier than apache.
> Please guide me.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>



-- 
Rafael E. Ferrero
Claro: (03562) 15514856

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




nginx and apache

2013-07-01 Thread Kakar Arunachal Service
Hi,
I am very confused with these two. I know about apache, but not much. And
then i came across nginx and that its much faster and easier than apache.
Please guide me.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Views, Forms not working.

2013-07-01 Thread Nick Dokos
Nigel Legg  writes:

> template datatables.html:
> 
> 
> 
>     Make Tables
> 
>     
>      enctype="multipart/formdata">{% csrf_token %}
>    
>      {{ form.datFile.label_tag }} {{ form.datFile }} 
>      {{ form.structFile.label_tag }} {{ form.structFile }} 
> 
>      {{ form.bannerVar.label_tag}} {{ form.bannerVar }} 
> 
>      {{ form.stubVar.label_tag}} {{ form.stubVar }} 
>      {{ form.stubNets.label_tag }} {{ form.stubNets }} 
>
>     
>
> 
> 
>

Nothing to do with the problem, so just an fyi:  and  are missing.

-- 
Nick

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




jquery in django

2013-07-01 Thread Christian Erhardt
Hey Harjot,

i can't provide an easy answer to your question. An Ajax enabled search with 
django is nothing, that one programs in 30 minutes especially not if he has no 
understanding of query and or ajax.

I'll try to give you some hints but not a complete plug n play solution. 

First things first. Jquery is a Javascript framework. One function it provides 
is to handle ajax requests. In short: Javascript running in the users browser 
calls the server  and with help of jquery you modify the DOM of the html page. 
So you don't have to reload the html page for each request. 

Now django comes to play. Django just handles the request. So you will need a 
page which will return search results for a query you submitted. If you call a 
django page it usually returns a html page. For ajax calls you would not work 
with html. Most pages use json to serialize data. There is a plugin called 
tasrypie which we use. It provides an ajax endpoint. As i recall it has a built 
in search function. Maybe you try this first. There are more high sophisticated 
search engines for django... but i'd give tastypie a try.

If everything is set up correct you can call an endpoint for your model with a 
jquery ajax call.

But this is acomplex task!

Regards

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: URL shorteners

2013-07-01 Thread Larry Martell
On Mon, Jul 1, 2013 at 2:18 PM, Amirouche Boubekki
 wrote:
> Héllo,
>
> Are you looking for an API for a shorturl service or a standalone app to
> make a short url service ?

I was looking for a django package that I could integrate into my app
that would allow me to pass it a long URL and it would return a short
one and then if that short URL was used it would redirect to the
original long one. But I've already implemented something myself and I
have it working.


> 2013/7/1 Larry Martell 
>>
>> I'm looking for a URL shortener I can use with my django project. I
>> want to be able to email a short link to someone that will expand to
>> the 'real' URL. Googling I see there's quite a few different URL
>> shorteners. Anyone here have any experiences with them they would like
>> to share? Which one would be the best for my type of use case?
>>
>> Thanks!
>> -larry
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To post to this group, send email to django-users@googlegroups.com.
>> Visit this group at http://groups.google.com/group/django-users.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: URL shorteners

2013-07-01 Thread Amirouche Boubekki
Héllo,

Are you looking for an API for a shorturl service or a standalone app to
make a short url service ?


Amirouche


2013/7/1 Larry Martell 

> I'm looking for a URL shortener I can use with my django project. I
> want to be able to email a short link to someone that will expand to
> the 'real' URL. Googling I see there's quite a few different URL
> shorteners. Anyone here have any experiences with them they would like
> to share? Which one would be the best for my type of use case?
>
> Thanks!
> -larry
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Freelance Django - London (£1500)

2013-07-01 Thread Denis Chernoshchekov
Hello! My name is Denis and I can help you.


2013/7/1 George Kazarian 

> We are a London based online retail startup (currently in test-launch).
> The website is up and running with a fully functioning payment system. Our
> soft launch is planned for July 25th.
>
> The website requires some changes and UX improvements before we open up to
> public. The following sections on the website need specific attention: my
> account section, homepage and sign-up process.
>
> We are looking for a creative and diligent developer who can dedicate a
> few days per week before our soft launch. Post-launch involvement also
> needed for testings and tweaks.
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: django search query

2013-07-01 Thread Doug Ballance


On Saturday, June 29, 2013 11:32:19 PM UTC-5, Harjot Mann wrote:
>
> Is there any search query in django which can ignore vowels like I want to 
> make a query which displays all the clients name who writes their name as 
> 'amanjit' or 'amanjeet'. 
> It should take take ee=i or anything like this. Please help me I have to 
> finish my task asap. 
>

http://www.postgresql.org/docs/9.1/static/fuzzystrmatch.html 

You should be able to do it with the django .extra() method easy enough.  I 
believe you can also make a soundex index on columns to improve the 
performance.  

The python jellyfish library is nice for pre-calculating phonetic strings 
and storing them in the database to compare against, or for small data sets 
that you want to process in python.

A third option is something like 
https://github.com/niwibe/djorm-ext-pgfulltext  which uses postgres full 
text search.  The full text search uses tokens that are normalized.  I'm 
not sure it it would normalize amanjit to amanjeet with the default 
configuration, and may be overkill for what you want.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: jquery in django

2013-07-01 Thread Rafael E. Ferrero
Harjot... the answer to your question is YES you can use ajax in yours
project... but you do that on yours templates.

you must to download http://code.jquery.com/jquery-2.0.2.min.js in some
directory where django can find when render your template, then in your
template must add this line that Sandro says



or directly use this without download anything (but need an internet
connection):
http://code.jquery.com/jquery-migrate-1.2.1.min.js";>

here http://learn.jquery.com/ you can learn everythin of jquery

Cheers


2013/7/1 Sandro Dutra 

> I really think your problem is not Django related, I suggest you to learn
> JQuery and post your doubts on related group.
>
>
> 2013/7/1 Harjot Mann 
>
>> On Mon, Jul 1, 2013 at 10:50 PM, François Schiettecatte
>>  wrote:
>> > Hi
>> >
>> > jQuery is not a search engine but a JavaScript library which helps you
>> build interactive web pages (and much more, see http://jquery.com ) .
>> >
>> > If you want a search engine, I suggest you look at SOLR, there are a
>> number of python libraries which would help you interact with that. A word
>> of warning, SOLR is very powerful/flexible so there is complexity there.
>>
>>
>> Ok
>> but cant I use AJAX??
>>
>> --
>> Harjot Kaur Mann
>> Blog: http://harjotmann.wordpress.com/
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To post to this group, send email to django-users@googlegroups.com.
>> Visit this group at http://groups.google.com/group/django-users.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>



-- 
Rafael E. Ferrero
Claro: (03562) 15514856

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: jquery in django

2013-07-01 Thread Sandro Dutra
I really think your problem is not Django related, I suggest you to learn
JQuery and post your doubts on related group.


2013/7/1 Harjot Mann 

> On Mon, Jul 1, 2013 at 10:50 PM, François Schiettecatte
>  wrote:
> > Hi
> >
> > jQuery is not a search engine but a JavaScript library which helps you
> build interactive web pages (and much more, see http://jquery.com ) .
> >
> > If you want a search engine, I suggest you look at SOLR, there are a
> number of python libraries which would help you interact with that. A word
> of warning, SOLR is very powerful/flexible so there is complexity there.
>
>
> Ok
> but cant I use AJAX??
>
> --
> Harjot Kaur Mann
> Blog: http://harjotmann.wordpress.com/
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: jquery in django

2013-07-01 Thread Harjot Mann
On Mon, Jul 1, 2013 at 10:50 PM, François Schiettecatte
 wrote:
> Hi
>
> jQuery is not a search engine but a JavaScript library which helps you build 
> interactive web pages (and much more, see http://jquery.com ) .
>
> If you want a search engine, I suggest you look at SOLR, there are a number 
> of python libraries which would help you interact with that. A word of 
> warning, SOLR is very powerful/flexible so there is complexity there.


Ok
but cant I use AJAX??

--
Harjot Kaur Mann
Blog: http://harjotmann.wordpress.com/

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: jquery in django

2013-07-01 Thread Harjot Mann
On Mon, Jul 1, 2013 at 10:41 PM, Harjot Mann  wrote:
> I am workng on an automation project in which I want to make search
> which should be a very good search meanwhile it is working but it is a
> simple search. I want that when I type something in search box it
> should display the clients from database just like google does in its
> serach engine.


please reply, I  don''t know anything about this jquery AJAX.

--
Harjot Kaur Mann
Blog: http://harjotmann.wordpress.com/

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: jquery in django

2013-07-01 Thread François Schiettecatte
Hi

jQuery is not a search engine but a JavaScript library which helps you build 
interactive web pages (and much more, see http://jquery.com ) .

If you want a search engine, I suggest you look at SOLR, there are a number of 
python libraries which would help you interact with that. A word of warning, 
SOLR is very powerful/flexible so there is complexity there.

Best regards

François

On Jul 1, 2013, at 1:11 PM, Harjot Mann  wrote:

> On Mon, Jul 1, 2013 at 10:34 PM, Gabriel  wrote:
>> Hey Harjot,
>> Could you please provide more details on what you're trying to do? I have a
>> feeling it's actually outside of what Django does, but there's still lots of
>> people here who could help you out.
> 
> 
> I am workng on an automation project in which I want to make search
> which should be a very good search meanwhile it is working but it is a
> simple search. I want that when I type something in search box it
> should display the clients from database just like google does in its
> serach engine.
> 
> --
> Harjot Kaur Mann
> Blog: http://harjotmann.wordpress.com/
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> For more options, visit https://groups.google.com/groups/opt_out.
> 
> 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: jquery in django

2013-07-01 Thread Sandro Dutra
Say what you try, show your models and your code and maybe we can help or
try to find a package that suit your needs:
https://www.djangopackages.com/search/?q=search

Your first post was not django related and now is lacking information, we
can't guess what you're doing correctly or wrong.


2013/7/1 Harjot Mann 

> On Mon, Jul 1, 2013 at 10:34 PM, Gabriel  wrote:
> > Hey Harjot,
> > Could you please provide more details on what you're trying to do? I
> have a
> > feeling it's actually outside of what Django does, but there's still
> lots of
> > people here who could help you out.
>
>
> I am workng on an automation project in which I want to make search
> which should be a very good search meanwhile it is working but it is a
> simple search. I want that when I type something in search box it
> should display the clients from database just like google does in its
> serach engine.
>
> --
> Harjot Kaur Mann
> Blog: http://harjotmann.wordpress.com/
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Render dynamic form based on meta data

2013-07-01 Thread François Schiettecatte
Avishay

I am a little confused, the form looks fine to me, are you trying to send the 
content to django for validation when the user clicks the 'Validate' button? 
You can do that using a REST call to django, or POST the form to django, either 
way you are going to have to write some backend code to deal with the input.

François

On Jul 1, 2013, at 3:51 AM, Avishay Balderman  wrote:

> Hi
> I am OK with the javascript side (see the attachment) - I am able to take 
> meta data and render a form.
> My challange is how to use it inside django app.
> Thanks
> 
> On Sunday, June 30, 2013 5:10:12 PM UTC+3, François Schiettecatte wrote:
> Avishay 
> 
> Take a look at http://jquery.com/ , lots of stuff there. 
> 
> The other discussions that have been going on about REST would also be useful 
> to you. 
> 
> Cheers 
> 
> François 
> 
> On Jun 30, 2013, at 4:54 AM, Avishay Balderman  wrote: 
> 
> > Hi  François 
> > Since I am a django "newbe", can you please elaborate or even point me to 
> > refrences in the web that shows the concept of what I am looking for? 
> > Thanks 
> > 
> > Avishay 
> > 
> > On Saturday, June 29, 2013 3:58:32 PM UTC+3, François Schiettecatte wrote: 
> > Django can handle some of that for you but not all, you will need to use 
> > javascript to handle the dynamics on the page itself., I use jquery, and 
> > use django to take the ajax calls and return data. 
> > 
> > If you don't have that much data you could just add it to the HTML page in 
> > javascript structures, would be easier to deal with than making ajax calls. 
> > 
> > Cheers 
> > 
> > François 
> > 
> > On Jun 29, 2013, at 5:28 AM, Avishay Balderman  wrote: 
> > 
> > > Hi 
> > > I need to implement a django app that has the following capabilities: 
> > > 1) When the main page loads it needs to dynamically (Ajax) populate a 
> > > combo () with a list of "form types" 
> > > 2) When the user select an item from the "form types" combo, the app 
> > > should issue Ajax call and fetch meta data. This meta data will bu used 
> > > in order to render a form. 
> > > 
> > > Can you please advice? 
> > > 
> > > Thanks 
> > > 
> > > Avishay 
> > > 
> > > 
> > > -- 
> > > You received this message because you are subscribed to the Google Groups 
> > > "Django users" group. 
> > > To unsubscribe from this group and stop receiving emails from it, send an 
> > > email to django-users...@googlegroups.com. 
> > > To post to this group, send email to django...@googlegroups.com. 
> > > Visit this group at http://groups.google.com/group/django-users. 
> > > For more options, visit https://groups.google.com/groups/opt_out. 
> > >   
> > >   
> > 
> > 
> > -- 
> > You received this message because you are subscribed to the Google Groups 
> > "Django users" group. 
> > To unsubscribe from this group and stop receiving emails from it, send an 
> > email to django-users...@googlegroups.com. 
> > To post to this group, send email to django...@googlegroups.com. 
> > Visit this group at http://groups.google.com/group/django-users. 
> > For more options, visit https://groups.google.com/groups/opt_out. 
> >   
> >   
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  
> 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: jquery in django

2013-07-01 Thread Harjot Mann
On Mon, Jul 1, 2013 at 10:34 PM, Gabriel  wrote:
> Hey Harjot,
> Could you please provide more details on what you're trying to do? I have a
> feeling it's actually outside of what Django does, but there's still lots of
> people here who could help you out.


I am workng on an automation project in which I want to make search
which should be a very good search meanwhile it is working but it is a
simple search. I want that when I type something in search box it
should display the clients from database just like google does in its
serach engine.

--
Harjot Kaur Mann
Blog: http://harjotmann.wordpress.com/

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: jquery in django

2013-07-01 Thread Gabriel
Hey Harjot,
Could you please provide more details on what you're trying to do? I have a
feeling it's actually outside of what Django does, but there's still lots
of people here who could help you out.

- Gabe


On Mon, Jul 1, 2013 at 1:53 PM, Harjot Mann wrote:

> On Mon, Jul 1, 2013 at 9:57 PM, Sandro Dutra  wrote:
> > 
>
>
> Its not working. I want to jquery ajax for search function.
>
> --
> Harjot Kaur Mann
> Blog: http://harjotmann.wordpress.com/
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: no style in admin pages; learning from djangobook.com

2013-07-01 Thread Vineet Naik
Adding to Jacky Tian's reply, if you are running the django dev
server, check if DEBUG is set to True and `django.contrib.staticfiles`
is added to INSTALLED_APPS in settings.py

See docs about these settings here -
https://docs.djangoproject.com/en/dev/howto/static-files/#configuring-static-files

On Mon, Jul 1, 2013 at 10:22 PM, Jacky Tian  wrote:
> Are you using the development server with `python manage.py runserver`? If
> you are, the static files for the admin should just work. If they don't, you
> may have messed up something in your settings.py.
>
> Otherwise, if you're serving your project from a webserver like Apache or
> nginx, run `python manage.py collectstatic` to consolidate the admin static
> files into your STATIC_ROOT directory. You'll probably have to fiddle with
> your web server configuration to serve files from STATIC_URL from
> STATIC_ROOT before you get it to work.
>
>
> On Monday, July 1, 2013 9:05:31 AM UTC-4, Jared Nielsen wrote:
>>
>> Hi all,
>> Just getting started with Django.
>> I'm following the projects on djangobook.com.
>> After activating the admin interface I don't have .css styling.
>> I also have no idea how to enable it.
>> Any help is greatly appreciated.
>> Thanks!
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>



-- 
Vineet Naik

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: jquery in django

2013-07-01 Thread Harjot Mann
On Mon, Jul 1, 2013 at 9:57 PM, Sandro Dutra  wrote:
> 


Its not working. I want to jquery ajax for search function.

--
Harjot Kaur Mann
Blog: http://harjotmann.wordpress.com/

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: no style in admin pages; learning from djangobook.com

2013-07-01 Thread Jacky Tian
Are you using the development server with `python manage.py runserver`? If 
you are, the static files for the admin should just work. If they don't, 
you may have messed up something in your settings.py. 

Otherwise, if you're serving your project from a webserver like Apache or 
nginx, run `python manage.py collectstatic` to consolidate the admin static 
files into your STATIC_ROOT directory. You'll probably have to fiddle with 
your web server configuration to serve files from STATIC_URL from 
STATIC_ROOT before you get it to work.

On Monday, July 1, 2013 9:05:31 AM UTC-4, Jared Nielsen wrote:
>
> Hi all,
> Just getting started with Django.
> I'm following the projects on djangobook.com.
> After activating the admin interface I don't have .css styling. 
> I also have no idea how to enable it.
> Any help is greatly appreciated.
> Thanks!
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: no style in admin pages; learning from djangobook.com

2013-07-01 Thread gilberto dos santos alves
please post details of what you do and what you expected. details django 
version, os and version. etc.

Em segunda-feira, 1 de julho de 2013 10h05min31s UTC-3, Jared Nielsen 
escreveu:
>
> Hi all,
> Just getting started with Django.
> I'm following the projects on djangobook.com.
> After activating the admin interface I don't have .css styling. 
> I also have no idea how to enable it.
> Any help is greatly appreciated.
> Thanks!
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: jquery in django

2013-07-01 Thread Sandro Dutra
Open your template and type:



And code.


2013/7/1 Harjot Mann 

> How can I embed jquery in django for searching???
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




jquery in django

2013-07-01 Thread Harjot Mann
How can I embed jquery in django for searching???

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Views, Forms not working.

2013-07-01 Thread Nigel Legg
Ah yes, thank you.

Regards,
Nigel Legg
07914 740972
http://twitter.com/nigellegg
http://uk.linkedin.com/in/nigellegg



On 1 July 2013 15:53, Mário Idival  wrote:

> Oh, but the url 'list'? remove the url 'list' of actions in forms
>
>
> 2013/7/1 Nigel Legg 
>
>> Tried that, still going back to the index page.
>>
>> Regards,
>> Nigel Legg
>> 07914 740972
>> http://twitter.com/nigellegg
>> http://uk.linkedin.com/in/nigellegg
>>
>>
>>
>> On 1 July 2013 15:33, Mário Idival  wrote:
>>
>>> """
>>> form.is_valid():
>>> model_instance.save()
>>>
>>> """
>>>
>>> form.is_valid():
>>> form.save()
>>>
>>>
>>>
>>>
>>> 2013/7/1 Nigel Legg 
>>>
  So I have:
 views.py:
 def datatables(request):
 if request.method == 'POST':
 form = DataTableForm(request.POST)
 if form.is_valid():
 model_instance.save()
 return redirect('myapp/tabspec.html')
 else:
 form = DataTableForm()
 return render(request, 'myapp/datatables.html', {
 'form': form,
 })

 template datatables.html:
 
 
 
 Make Tables
 
 
 >>> enctype="multipart/formdata">{% csrf_token %}

  {{ form.datFile.label_tag }} {{ form.datFile }} 
  {{ form.structFile.label_tag }} {{ form.structFile }} 
  {{ form.bannerVar.label_tag}} {{ form.bannerVar }} 
  {{ form.stubVar.label_tag}} {{ form.stubVar }} 
  {{ form.stubNets.label_tag }} {{ form.stubNets }} 

 

 
 

 models.py:
 class DataTable(models.Model):
 datFile = models.CharField(max_length = 200)
 structFile = models.CharField(max_length = 200)
 bannerVar = models.CharField(max_length = 50)
 stubVar = models.CharField(max_length = 50)
 stubNets = models.BooleanField()

 and forms.py:
 class DataTableForm(forms.ModelForm):
 class Meta:
 model = DataTable

 The form shows fine (see image), but when I click the button it goes
 back to the index page, which isn't what I wanted to happen.  Any thoughts
 on where I am going wrong?
 Cheers N //

 Regards,
 Nigel Legg
 07914 740972
 http://twitter.com/nigellegg
 http://uk.linkedin.com/in/nigellegg

  --
 You received this message because you are subscribed to the Google
 Groups "Django users" group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to django-users+unsubscr...@googlegroups.com.
 To post to this group, send email to django-users@googlegroups.com.
 Visit this group at http://groups.google.com/group/django-users.
 For more options, visit https://groups.google.com/groups/opt_out.



>>>
>>>
>>>
>>> --
>>> Mário Idival
>>>
>>> *Twitter *: *@marioigd*
>>> *Facebook*: *mario.idival*
>>> *User Linux : **#554446*
>>> Skype*: marioidival*
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to django-users+unsubscr...@googlegroups.com.
>>> To post to this group, send email to django-users@googlegroups.com.
>>> Visit this group at http://groups.google.com/group/django-users.
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>>
>>>
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To post to this group, send email to django-users@googlegroups.com.
>> Visit this group at http://groups.google.com/group/django-users.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>
>
>
> --
> Mário Idival
>
> *Twitter *: *@marioigd*
> *Facebook*: *mario.idival*
> *User Linux : **#554446*
> Skype*: marioidival*
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit 

URL shorteners

2013-07-01 Thread Larry Martell
I'm looking for a URL shortener I can use with my django project. I
want to be able to email a short link to someone that will expand to
the 'real' URL. Googling I see there's quite a few different URL
shorteners. Anyone here have any experiences with them they would like
to share? Which one would be the best for my type of use case?

Thanks!
-larry

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Views, Forms not working.

2013-07-01 Thread Mário Idival
Oh, but the url 'list'? remove the url 'list' of actions in forms


2013/7/1 Nigel Legg 

> Tried that, still going back to the index page.
>
> Regards,
> Nigel Legg
> 07914 740972
> http://twitter.com/nigellegg
> http://uk.linkedin.com/in/nigellegg
>
>
>
> On 1 July 2013 15:33, Mário Idival  wrote:
>
>> """
>> form.is_valid():
>> model_instance.save()
>>
>> """
>>
>> form.is_valid():
>> form.save()
>>
>>
>>
>>
>> 2013/7/1 Nigel Legg 
>>
>>>  So I have:
>>> views.py:
>>> def datatables(request):
>>> if request.method == 'POST':
>>> form = DataTableForm(request.POST)
>>> if form.is_valid():
>>> model_instance.save()
>>> return redirect('myapp/tabspec.html')
>>> else:
>>> form = DataTableForm()
>>> return render(request, 'myapp/datatables.html', {
>>> 'form': form,
>>> })
>>>
>>> template datatables.html:
>>> 
>>> 
>>> 
>>> Make Tables
>>> 
>>> 
>>> >> enctype="multipart/formdata">{% csrf_token %}
>>>
>>>  {{ form.datFile.label_tag }} {{ form.datFile }} 
>>>  {{ form.structFile.label_tag }} {{ form.structFile }} 
>>>  {{ form.bannerVar.label_tag}} {{ form.bannerVar }} 
>>>  {{ form.stubVar.label_tag}} {{ form.stubVar }} 
>>>  {{ form.stubNets.label_tag }} {{ form.stubNets }} 
>>>
>>> 
>>>
>>> 
>>> 
>>>
>>> models.py:
>>> class DataTable(models.Model):
>>> datFile = models.CharField(max_length = 200)
>>> structFile = models.CharField(max_length = 200)
>>> bannerVar = models.CharField(max_length = 50)
>>> stubVar = models.CharField(max_length = 50)
>>> stubNets = models.BooleanField()
>>>
>>> and forms.py:
>>> class DataTableForm(forms.ModelForm):
>>> class Meta:
>>> model = DataTable
>>>
>>> The form shows fine (see image), but when I click the button it goes
>>> back to the index page, which isn't what I wanted to happen.  Any thoughts
>>> on where I am going wrong?
>>> Cheers N //
>>>
>>> Regards,
>>> Nigel Legg
>>> 07914 740972
>>> http://twitter.com/nigellegg
>>> http://uk.linkedin.com/in/nigellegg
>>>
>>>  --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to django-users+unsubscr...@googlegroups.com.
>>> To post to this group, send email to django-users@googlegroups.com.
>>> Visit this group at http://groups.google.com/group/django-users.
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>>
>>>
>>
>>
>>
>> --
>> Mário Idival
>>
>> *Twitter *: *@marioigd*
>> *Facebook*: *mario.idival*
>> *User Linux : **#554446*
>> Skype*: marioidival*
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To post to this group, send email to django-users@googlegroups.com.
>> Visit this group at http://groups.google.com/group/django-users.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>



-- 
Mário Idival

*Twitter *: *@marioigd*
*Facebook*: *mario.idival*
*User Linux : **#554446*
Skype*: marioidival*

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Views, Forms not working.

2013-07-01 Thread Nigel Legg
Tried that, still going back to the index page.

Regards,
Nigel Legg
07914 740972
http://twitter.com/nigellegg
http://uk.linkedin.com/in/nigellegg



On 1 July 2013 15:33, Mário Idival  wrote:

> """
> form.is_valid():
> model_instance.save()
>
> """
>
> form.is_valid():
> form.save()
>
>
>
>
> 2013/7/1 Nigel Legg 
>
>> So I have:
>> views.py:
>> def datatables(request):
>> if request.method == 'POST':
>> form = DataTableForm(request.POST)
>> if form.is_valid():
>> model_instance.save()
>> return redirect('myapp/tabspec.html')
>> else:
>> form = DataTableForm()
>> return render(request, 'myapp/datatables.html', {
>> 'form': form,
>> })
>>
>> template datatables.html:
>> 
>> 
>> 
>> Make Tables
>> 
>> 
>> > enctype="multipart/formdata">{% csrf_token %}
>>
>>  {{ form.datFile.label_tag }} {{ form.datFile }} 
>>  {{ form.structFile.label_tag }} {{ form.structFile }} 
>>  {{ form.bannerVar.label_tag}} {{ form.bannerVar }} 
>>  {{ form.stubVar.label_tag}} {{ form.stubVar }} 
>>  {{ form.stubNets.label_tag }} {{ form.stubNets }} 
>>
>> 
>>
>> 
>> 
>>
>> models.py:
>> class DataTable(models.Model):
>> datFile = models.CharField(max_length = 200)
>> structFile = models.CharField(max_length = 200)
>> bannerVar = models.CharField(max_length = 50)
>> stubVar = models.CharField(max_length = 50)
>> stubNets = models.BooleanField()
>>
>> and forms.py:
>> class DataTableForm(forms.ModelForm):
>> class Meta:
>> model = DataTable
>>
>> The form shows fine (see image), but when I click the button it goes back
>> to the index page, which isn't what I wanted to happen.  Any thoughts on
>> where I am going wrong?
>> Cheers N //
>>
>> Regards,
>> Nigel Legg
>> 07914 740972
>> http://twitter.com/nigellegg
>> http://uk.linkedin.com/in/nigellegg
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To post to this group, send email to django-users@googlegroups.com.
>> Visit this group at http://groups.google.com/group/django-users.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>
>
>
> --
> Mário Idival
>
> *Twitter *: *@marioigd*
> *Facebook*: *mario.idival*
> *User Linux : **#554446*
> Skype*: marioidival*
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Views, Forms not working.

2013-07-01 Thread Mário Idival
"""
form.is_valid():
model_instance.save()

"""

form.is_valid():
form.save()




2013/7/1 Nigel Legg 

> So I have:
> views.py:
> def datatables(request):
> if request.method == 'POST':
> form = DataTableForm(request.POST)
> if form.is_valid():
> model_instance.save()
> return redirect('myapp/tabspec.html')
> else:
> form = DataTableForm()
> return render(request, 'myapp/datatables.html', {
> 'form': form,
> })
>
> template datatables.html:
> 
> 
> 
> Make Tables
> 
> 
>  enctype="multipart/formdata">{% csrf_token %}
>
>  {{ form.datFile.label_tag }} {{ form.datFile }} 
>  {{ form.structFile.label_tag }} {{ form.structFile }} 
>  {{ form.bannerVar.label_tag}} {{ form.bannerVar }} 
>  {{ form.stubVar.label_tag}} {{ form.stubVar }} 
>  {{ form.stubNets.label_tag }} {{ form.stubNets }} 
>
> 
>
> 
> 
>
> models.py:
> class DataTable(models.Model):
> datFile = models.CharField(max_length = 200)
> structFile = models.CharField(max_length = 200)
> bannerVar = models.CharField(max_length = 50)
> stubVar = models.CharField(max_length = 50)
> stubNets = models.BooleanField()
>
> and forms.py:
> class DataTableForm(forms.ModelForm):
> class Meta:
> model = DataTable
>
> The form shows fine (see image), but when I click the button it goes back
> to the index page, which isn't what I wanted to happen.  Any thoughts on
> where I am going wrong?
> Cheers N //
>
> Regards,
> Nigel Legg
> 07914 740972
> http://twitter.com/nigellegg
> http://uk.linkedin.com/in/nigellegg
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>



-- 
Mário Idival

*Twitter *: *@marioigd*
*Facebook*: *mario.idival*
*User Linux : **#554446*
Skype*: marioidival*

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Views, Forms not working.

2013-07-01 Thread Nigel Legg
So I have:
views.py:
def datatables(request):
if request.method == 'POST':
form = DataTableForm(request.POST)
if form.is_valid():
model_instance.save()
return redirect('myapp/tabspec.html')
else:
form = DataTableForm()
return render(request, 'myapp/datatables.html', {
'form': form,
})

template datatables.html:



Make Tables


{% csrf_token %}

 {{ form.datFile.label_tag }} {{ form.datFile }} 
 {{ form.structFile.label_tag }} {{ form.structFile }} 
 {{ form.bannerVar.label_tag}} {{ form.bannerVar }} 
 {{ form.stubVar.label_tag}} {{ form.stubVar }} 
 {{ form.stubNets.label_tag }} {{ form.stubNets }} 






models.py:
class DataTable(models.Model):
datFile = models.CharField(max_length = 200)
structFile = models.CharField(max_length = 200)
bannerVar = models.CharField(max_length = 50)
stubVar = models.CharField(max_length = 50)
stubNets = models.BooleanField()

and forms.py:
class DataTableForm(forms.ModelForm):
class Meta:
model = DataTable

The form shows fine (see image), but when I click the button it goes back
to the index page, which isn't what I wanted to happen.  Any thoughts on
where I am going wrong?
Cheers N //

Regards,
Nigel Legg
07914 740972
http://twitter.com/nigellegg
http://uk.linkedin.com/in/nigellegg

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


<>

Re: What is the best practice to learn Django 1.5?

2013-07-01 Thread Kamil Gałuszka


On Friday, June 28, 2013 3:47:51 PM UTC+2, Roberto López López wrote:
>
> Two scoops of django is also a good book https://django.2scoops.org/ 
>
>
> +1
Two scoops of django is great. This book have many good practices and also 
very good reviews. You should definitely start it after you read 
documentation.

Cheers,
Kamil Gałuszka
 

> On 06/28/2013 03:45 PM, Gabriel wrote: 
> > 
> > Hey, you could also try Getting Started With Djangorest, that's a 
> > series of classes in everything you might need to become a Django dev. 
> > 
> > -Gabe 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> > Groups "Django users" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> > an email to django-users...@googlegroups.com . 
> > To post to this group, send email to 
> > django...@googlegroups.com. 
>
> > Visit this group at http://groups.google.com/group/django-users. 
> > For more options, visit https://groups.google.com/groups/opt_out. 
> >   
> >   
>
>
> -- 
> Kind regards, 
>
> Roberto L�pez L�pez 
>
>
> System Developer 
> Parallab, Uni Computing 
> H�yteknologisenteret, Thorm�hlensgate 55 
> N-5008 Bergen, Norway 
> Tel:(+47) 555 84091 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Freelance Django - London (£1500)

2013-07-01 Thread George Kazarian
We are a London based online retail startup (currently in test-launch). The 
website is up and running with a fully functioning payment system. Our soft 
launch is planned for July 25th.

The website requires some changes and UX improvements before we open up to 
public. The following sections on the website need specific attention: my 
account section, homepage and sign-up process.

We are looking for a creative and diligent developer who can dedicate a few 
days per week before our soft launch. Post-launch involvement also needed 
for testings and tweaks. 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Missing peice before best practises

2013-07-01 Thread Sayth Renshaw
On Monday, July 1, 2013, Tom Evans wrote:

> On Mon, Jul 1, 2013 at 11:37 AM, Sayth Renshaw 
> >
> wrote:
> > Is that good though?
> >
> > Barring 2 scoops there is no new material to recognise and guide users to
> > the new features of Django and to get beginner Django developers on board
> > quicker.
> >
> > It leads to bits of info for each python framework but nothing
> > comprehensive.
> >
> > Sayth
> >
>
> Virtualenv, pip etc are not features of Django, they are features of
> python. It is right that Django mentions them in places, it is doubly
> right that it does not attempt to duplicate the fine documentation
> that pip and virtualenv possess themselves.
>
> Cheers
>
> Tom
>
>
Agreed good tutorials would show steps and then point to resources for
further reading,

At this point though it appears there is a scarcity of good tutorials for
current Django.

Sayth

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




no style in admin pages; learning from djangobook.com

2013-07-01 Thread Jared Nielsen
Hi all,
Just getting started with Django.
I'm following the projects on djangobook.com.
After activating the admin interface I don't have .css styling. 
I also have no idea how to enable it.
Any help is greatly appreciated.
Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: data transfer between databases

2013-07-01 Thread Simon Riggs
On 1 July 2013 13:02, Mike Dewhirst  wrote:


> On 1/07/2013 9:35pm, Tom Evans wrote:
>
>> On Sun, Jun 30, 2013 at 11:24 PM, Mike Dewhirst 
>> wrote:
>>
>>> mulianto and Avraham
>>>
>>> Thanks for your suggestions. Dumping data isn't the entire problem -
>>> which
>>> is this:
>>>
>>> There will be an *ongoing* need to add new data from tables in one
>>> database
>>> to the same-named tables in another database on a remote machine. Two of
>>> the
>>> tables are in a m2m relationship.
>>>
>>>
You can use direct access via "foreign tables" the name of the Postgres
distributed database feature.
http://www.postgresql.org/docs/devel/static/sql-createforeigntable.html

-- 
 Simon Riggs   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: data transfer between databases

2013-07-01 Thread Mike Dewhirst

Tom

I'm not a DBA so I'll need to do some quiet study of those references. 
Thanks for that.


Cheers

Mike

On 1/07/2013 9:35pm, Tom Evans wrote:

On Sun, Jun 30, 2013 at 11:24 PM, Mike Dewhirst  wrote:

mulianto and Avraham

Thanks for your suggestions. Dumping data isn't the entire problem - which
is this:

There will be an *ongoing* need to add new data from tables in one database
to the same-named tables in another database on a remote machine. Two of the
tables are in a m2m relationship.



Sounds like you want replication from one database to another. Recent
versions of Postgres have built in support for what they call "log
shipping" or "streaming replication", where logs of updates are
transferred to backup servers and executed:

http://www.postgresql.org/docs/current/static/warm-standby.html

This requires some manual setup of your servers to transfer the logs.

There are other forms of replication, postgresql actually provide a
useful table listing the various solutions, their pros/cons, and links
on how to implement them. Lots of the solutions are not part of
postgresql itself, but use third party packages like slony to effect
the replication. See here:

http://www.postgresql.org/docs/current/static/different-replication-solutions.html

Cheers

Tom



--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: data transfer between databases

2013-07-01 Thread Tom Evans
On Sun, Jun 30, 2013 at 11:24 PM, Mike Dewhirst  wrote:
> mulianto and Avraham
>
> Thanks for your suggestions. Dumping data isn't the entire problem - which
> is this:
>
> There will be an *ongoing* need to add new data from tables in one database
> to the same-named tables in another database on a remote machine. Two of the
> tables are in a m2m relationship.
>

Sounds like you want replication from one database to another. Recent
versions of Postgres have built in support for what they call "log
shipping" or "streaming replication", where logs of updates are
transferred to backup servers and executed:

http://www.postgresql.org/docs/current/static/warm-standby.html

This requires some manual setup of your servers to transfer the logs.

There are other forms of replication, postgresql actually provide a
useful table listing the various solutions, their pros/cons, and links
on how to implement them. Lots of the solutions are not part of
postgresql itself, but use third party packages like slony to effect
the replication. See here:

http://www.postgresql.org/docs/current/static/different-replication-solutions.html

Cheers

Tom

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Missing peice before best practises

2013-07-01 Thread Tom Evans
On Mon, Jul 1, 2013 at 11:37 AM, Sayth Renshaw  wrote:
> Is that good though?
>
> Barring 2 scoops there is no new material to recognise and guide users to
> the new features of Django and to get beginner Django developers on board
> quicker.
>
> It leads to bits of info for each python framework but nothing
> comprehensive.
>
> Sayth
>

Virtualenv, pip etc are not features of Django, they are features of
python. It is right that Django mentions them in places, it is doubly
right that it does not attempt to duplicate the fine documentation
that pip and virtualenv possess themselves.

Cheers

Tom

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Not showing a model from the models' list in admin

2013-07-01 Thread Victor
Issuing the "localhost:8000/admin"  request in the browser I am presented with 
the list of all registered models.
I don't want one of this  models  to be visualized in that list even though it 
is widely used and referenced by other models. 
How can I do that without unregistering the model?

Ciao
Vittorio

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Missing peice before best practises

2013-07-01 Thread Sayth Renshaw
On Monday, July 1, 2013, Tom Evans wrote:

> On Wed, Jun 26, 2013 at 10:03 PM, Sayth Renshaw 
> >
> wrote:
> > This is oddly the only value difference between rails and django is that
> > there is far more online courses and tutorials to say "come join rails".
>
> Yep, they say "come join rails", and not "come join Ruby". This
> encourages people to look for "rails best practices" and not "ruby
> best practices". Conversely with python/django.
>
> Cheers
>
> Tom
>
>
Is that good though?

Barring 2 scoops there is no new material to recognise and guide users to
the new features of Django and to get beginner Django developers on board
quicker.

It leads to bits of info for each python framework but nothing
comprehensive.

Sayth

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Missing peice before best practises

2013-07-01 Thread Tom Evans
On Wed, Jun 26, 2013 at 10:03 PM, Sayth Renshaw  wrote:
> This is oddly the only value difference between rails and django is that
> there is far more online courses and tutorials to say "come join rails".

Yep, they say "come join rails", and not "come join Ruby". This
encourages people to look for "rails best practices" and not "ruby
best practices". Conversely with python/django.

Cheers

Tom

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Templatetag variable resolution choices (Python literals)

2013-07-01 Thread Marc Kirkwood
OK, so I've got a template tag and a corresponding Node class. In order to 
check the value of two template variables in the Node.render method, I'm 
using the template.Variable class as specified in the docs. However, I'm 
wondering if there is any point to this, given the extra lines of code that 
are required to instantiate the class in the Node.__init__ method, then 
resolve each of the two variables within separate try-except blocks in case 
of a template.VariableDoesNotExist error. Given that both the variables are 
Python literals (boolean and list) and context.get('name', default) works 
as expected without the extra boilerplate, I'm wondering why it's not a 
documented way of doing this.

In summary, the following types of variable lookup give identical results 
when dealing with Python literals -- except that using the context directly 
removes the need for the try-except block and also eliminates the Django 
template.Variable checking code, which is redundant in this case:


class ExampleNode(template.Node):
def __init__(self):
self.a1 = template.Variable('a_variable')

def render(self, context):
try:
a1 = self.a1.resolve(context)
except template.VariableDoesNotExist:
a1 = False

a2 = context.get('a_variable', False)


I'll add once again that these variables are simply set in a view context 
as Python literals.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: django search query

2013-07-01 Thread Amirouche Boubekki
2013/7/1 Harjot Mann 

> On Sun, Jun 30, 2013 at 11:18 PM, Amirouche Boubekki
>  wrote:
> > You can do this by creating an extra field in the model with the name
> > without vowels in it and doing a simple filter on it ? Is that what you
> need
> > ?
>
> I have a search function which is already working in views.py but I
> want to refine it.


Is this search function a query like
MyModel.objects.filter(usernamename=username, ...) or something more
specific ?


> How can I make a model without vowels??
>

the most performant solution would be to use re
subbut str.replace
will work too.


> And what is django-haystack application?


Haystack is a full text search application, it build an index specific for
full text search which means it's not suited for the search you are looking
to do (also it takes a lot of memory).


> Can I use it in my project for refining search or is it a normal searching
> application?
>

It depends... can you write a query in the form of
MyModel.objects.filter(foo=bar, spam=egg) where you document each fields so
that we can know better what your are trying to achieve ? Real data is not
significant, but full scope of the problem you are trying to solve is.



Amirouche

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Render dynamic form based on meta data

2013-07-01 Thread Avishay Balderman
Hi
I am OK with the javascript side (see the attachment) - I am able to take 
meta data and render a form.
My challange is how to use it inside django app.
Thanks

On Sunday, June 30, 2013 5:10:12 PM UTC+3, François Schiettecatte wrote:
>
> Avishay 
>
> Take a look at http://jquery.com/ , lots of stuff there. 
>
> The other discussions that have been going on about REST would also be 
> useful to you. 
>
> Cheers 
>
> François 
>
> On Jun 30, 2013, at 4:54 AM, Avishay Balderman 
>  
> wrote: 
>
> > Hi  François 
> > Since I am a django "newbe", can you please elaborate or even point me 
> to refrences in the web that shows the concept of what I am looking for? 
> > Thanks 
> > 
> > Avishay 
> > 
> > On Saturday, June 29, 2013 3:58:32 PM UTC+3, François Schiettecatte 
> wrote: 
> > Django can handle some of that for you but not all, you will need to use 
> javascript to handle the dynamics on the page itself., I use jquery, and 
> use django to take the ajax calls and return data. 
> > 
> > If you don't have that much data you could just add it to the HTML page 
> in javascript structures, would be easier to deal with than making ajax 
> calls. 
> > 
> > Cheers 
> > 
> > François 
> > 
> > On Jun 29, 2013, at 5:28 AM, Avishay Balderman  
> wrote: 
> > 
> > > Hi 
> > > I need to implement a django app that has the following capabilities: 
> > > 1) When the main page loads it needs to dynamically (Ajax) populate a 
> combo () with a list of "form types" 
> > > 2) When the user select an item from the "form types" combo, the app 
> should issue Ajax call and fetch meta data. This meta data will bu used in 
> order to render a form. 
> > > 
> > > Can you please advice? 
> > > 
> > > Thanks 
> > > 
> > > Avishay 
> > > 
> > > 
> > > -- 
> > > You received this message because you are subscribed to the Google 
> Groups "Django users" group. 
> > > To unsubscribe from this group and stop receiving emails from it, send 
> an email to django-users...@googlegroups.com. 
> > > To post to this group, send email to django...@googlegroups.com. 
> > > Visit this group at http://groups.google.com/group/django-users. 
> > > For more options, visit https://groups.google.com/groups/opt_out. 
> > >   
> > >   
> > 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups "Django users" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> an email to django-users...@googlegroups.com . 
> > To post to this group, send email to 
> > django...@googlegroups.com. 
>
> > Visit this group at http://groups.google.com/group/django-users. 
> > For more options, visit https://groups.google.com/groups/opt_out. 
> >   
> >   
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


<<< text/html; charset=US-ASCII; name=driver.html: Unrecognized >>>


Re: Django 1.6 doesn't install via pip

2013-07-01 Thread Sanjay Bhangar
On Sun, Jun 30, 2013 at 8:00 PM, Lachlan Musicman  wrote:

> Hola,
>
> I read the release notes, and tried to install 1.6. I encountered this
> error:
>
> $ pip install Django==1.6b1
> Downloading/unpacking Django==1.6b1
>   Could not find a version that satisfies the requirement
> Django==1.6b1 (from versions: 1.2.6, 1.3.6, 1.2.7, 1.2.3, 1.2.4,
> 1.4.4, 1.3.3, 1.2.1, 1.3.4, 1.2.2, 1.5, 1.3, 1.4.5, 1.3.1, 1.1.3,
> 1.3.5, 1.2.5, 1.1.4, 1.2, 1.3.2, 1.3.7, 1.4.3, 1.4.1, 1.5.1, 1.4.2,
> 1.4)
> No distributions matching the version for Django==1.6b1
>
>
Hey L :),

fwiw, this should work if you want to install via pip currently:
pip install -e git+https://github.com/django/django.git@1.6b1#egg=django

The docs [0] do say that pip install django==1.6b1 should work though, so
I'm guessing someone is going to push to pypi soon :-)

Cheers,
Sanjay

[0] https://www.djangoproject.com/download/


>
> I presume that the 1.6 alpha/beta hasn't been pushed to pypi yet?
>
> cheers
> L.
>
> --
> We are like a drunk blundering through a crowd of pickpockets. That we
> are not poor and naked already is a testament to either the goodness
> of humanity or the ineptitude of the criminal class.
>
> http://techcrunch.com/2013/06/08/we-asked-for-this/
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Get Form from string?

2013-07-01 Thread Sanjay Bhangar
Hey MacVictor,

So when I needed to do something similar, I landed up hard-coding a dict
with form-name -> form-class in my model definition. Honestly, there is
probably a better way to do it, but that worked fine for my use-case,
though it did feel slightly "not right". Any-how, fwiw, I did something
like:

from forms import FormA, FormB, FormC
class Foo(models.Model):
  ...
  forms = {
'SomeFormA': FormA,
'SomeFormB': FormB,
'SomeFormC': FormC
  }

And then in your view, something like:
form = model.forms[] .. etc..

I'm guessing from your email that what you need is something similar, and
perhaps someone from the list has a better idea than the above to do it ..

Hope that helps, though ..

All the best,
Sanjay


On Sun, Jun 30, 2013 at 1:59 AM, MacVictor  wrote:

> I try in view get the form by name.
> Example:
> this is my url:
>
> /some-url/MyForm/
>
> url(r'^/some-url/(?P[a-zA-Z0-9]+)/', 'my_view', name='my-wiev'),
>
>
> and my view:
>
> def my_view(request, form_name):
> form = how_get_form_name(form_name)
> response = {}
> response['my_form'] = form
> return render_to_response('request/window.html', response)
>
>
> I have create uniwersal view, get my form and send to template. Why form?
> Because my model has more Forms and I want to select which forms.
>
>
>
> W dniu piątek, 28 czerwca 2013 23:06:15 UTC+2 użytkownik yeswanth nadella
> napisał:
>
>> I am afraid, I did not understand your question. Are you trying to
>> generate a form based on your model/ models?
>>
>> On Friday, June 28, 2013 3:23:00 PM UTC-5, MacVictor wrote:
>>>
>>> and how to get only Form (not ModelForm) use string name?
>>>
>>> W dniu piątek, 28 czerwca 2013 22:09:41 UTC+2 użytkownik MacVictor
>>> napisał:

 get the model by string i use:

 from django.db.models.loading import get_model
 def get_model(self, app_label, model_name, seed_cache=True):

 how to get ModelForm by string?

 i try used:

 modelforms = forms.ModelForm.__subclasses__**()

 def get_form(form):
 try:
 for model_form in modelforms:
 try:
 if model_form.Meta.form == form:
 return model_form
 except AttributeError:
 continue
 except IndexError:
 print "Does not exist Model Forms for the object"

 but I must import the form in which I will seek appropriate by name!

>>>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Python Fabric manage.py problem

2013-07-01 Thread Eduardo Basílio


I use Python Fabric to deploy. Works great for accessing the remote server, 
install dependencies, run linux commands, etc..

But when I try to run *file commands manage.py Django*, NOT work!


Example of my fabfile.py:

with prefix ('source/home/user/env/bin/activate'):

with cd ('path/to/your/project/django'):

*run ('python manage.py help --settings=path.for.settings')*


Fatal error: runstrong text() received nonzero return code while executing 
one!


I've tried putting a --noinput but the error remains:

*run ('python manage.py help --settings=caminho.para.settings --noinput')*

Does anyone know how to solve?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




dajaxice file cannot be found

2013-07-01 Thread no body
I am usering django_dajax 0.9.2 and django_dajaxice 0.5.5 for my current
project. This is how I configure it


#settings.py

*MAIN_DIR = os.path.dirname(__file__)
PROJECT_DIR = MAIN_DIR.rsplit(os.sep, 1)[0]

# Example: "/home/media/media.lawrence.com/static/"
STATIC_ROOT = os.path.join(PROJECT_DIR, 'static')

# URL prefix for static files.
# Example: "http://media.lawrence.com/static/;
STATIC_URL = '/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.
os.path.join(MAIN_DIR, 'static'),
)

# List of finder classes that know how to find static files in
# various locations.
STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
'dajaxice.finders.DajaxiceFinder',
)*

and my urls.py
*
from dajaxice.core import dajaxice_autodiscover, dajaxice_config
dajaxice_autodiscover()

if settings.DEBUG:
urlpatterns = patterns('',
(r'^media/(?P.*)$', 'django.views.static.serve',
{'document_root': settings.MEDIA_ROOT}),
)

urlpatterns += patterns('',
url(dajaxice_config.dajaxice_url, include('dajaxice.urls')),
...*


With this settings, I am enable to use these libs in my local machine.
However, when deploying to the client machine, the file dajaxice.core.js
cannot be found (see it on firebug). When use *python manage.py collecstatic
*, I see that that file is saved into the folder temp (*Copying
'/tmp/tmpsiiuMx'*). The rendered link is correct

**

and there is indeed that file under the /static/dajaxice folder, but still
the browser complains about cannot find that file. Do you have any idea
about this ?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.