Re: Static files not served

2013-06-28 Thread der_fenix
Is DEBUG is set to True or False? And can you open static files by paths that are present in page source? I.e. by path which generated from (for exampe) {% static "js/jquery.min.js" %}? > Hi @der_fenix, > > My STATIC_URL setting is as follows: STATIC_URL = '/static/' > > I suspect that Django's

Re: Advanced Search in django

2013-06-28 Thread coded kid
Try django watson https://github.com/etianen/django-watson/ On Thursday, 27 June 2013 09:33:22 UTC+1, Harjot Mann wrote: > > On Thu, Jun 27, 2013 at 1:16 PM, Peith Vergil > > > wrote: > > Try using django-haystack. It's a nice Django app, very easy to use, and > > with good documentation: > h

How create custom template tags and use Forms?

2013-06-28 Thread MacVictor
I create custom django template and used Form (this tag has to be universal): This is file ratings.py use tags: from django import template from django.contrib.contenttypes.models import ContentType from Ratings.forms import RatingsForm register = template.Library() class RatingFormNode(templa

how to properly use the m2m_changed signal?

2013-06-28 Thread Roberto López López
Hi, I am trying to listen to the m2m_changed signal on my models, but I can't make it work. Even the execution flow does not reach the linked method! class Project(models.Model): departments = models.ManyToManyField('department.Department', related_name='projects',

Re: how to properly use the m2m_changed signal?

2013-06-28 Thread Roberto López López
I have tried as well using the post_save signal and overriding the save() method. But in none of those cases Project.departments is populated yet when reaching my code :-/ On 06/28/2013 11:50 AM, Roberto López López wrote: > > Hi, > > I am trying to listen to the m2m_changed signal on my models

search and export the data in .csv format using django

2013-06-28 Thread roopasingh250
In my application i am using a search function which search and display the output.I include search forfromdate and todate,Keyword search etc. I want to export the searched result in a .csv file.Currently i had written a function calledcsv_export and exporting all the report in .csv.I want to

Re: Django-admin-tools unicode problem

2013-06-28 Thread Sandro Dutra
Como o Gilberto postou, pode haver um problema quando o teu editor de textos salva o arquivo do template, tente abrir este template pelo bloco de notas e ao 'salvar como' deve haver um campo lá embaixo para selecionar a 'Codificação', selecione UTF-8 e salve ou tente a configuração relativa no edit

Re: Django-admin-tools unicode problem

2013-06-28 Thread Roberto López López
Hi, I can perfectly understand Portuguese, but it's not the case for many users of this mailing list. Please, stick to English... Cheers, Roberto On 06/28/2013 01:35 PM, Sandro Dutra wrote: > Como o Gilberto postou, pode haver um problema quando o teu editor de > textos salva o arquivo do te

What is the best practice to learn Django 1.5?

2013-06-28 Thread subsnico
Hi all, I am very new to the world of Django and I have a couple questions regarding "how to learn it?": My background is .NET development, mostly developing business logic tiers. I am very fluent with OOP, HTML5, CSS, JavaScript and have an entry-level knowledge of Python. Still, I have no kn

Help in finding how to learn Django

2013-06-28 Thread subsnico
Hi all, What is the best way to learn Django 1.5 thouroughly? I have been a .NET developer and have a really good understanding of OOP, HTML5, CSS and JavaScript. I also have an entry-level knowledge of Python. I am completely new to MVC (or MVT, in this case). I have a need to build apps with

Re: Help in finding how to learn Django

2013-06-28 Thread Roberto López López
https://docs.djangoproject.com/en/1.5/intro/ On 06/28/2013 09:49 AM, subsn...@gmail.com wrote: > Hi all, > > What is the best way to learn Django 1.5 thouroughly? I have been a > .NET developer and have a really good understanding of OOP, HTML5, CSS > and JavaScript. I also have an entry-level

Re: how to properly use the m2m_changed signal?

2013-06-28 Thread Roberto López López
I am doing tests and the m2m_changed signal seems to work perfectly as long as I have not defined a "through" model. Is there any trick here? Thanks! On 06/28/2013 12:14 PM, Roberto López López wrote: > > I have tried as well using the post_save signal and overriding the > save() method. But

standalone script to call a view

2013-06-28 Thread Larry Martell
I am trying to write a standalone script that calls one of my views. I can call the view, but I'm having a problem with proving what it wants. One of the things the view needs is request.user, and that looks like this: (Pdb) type(request.user) (Pdb) type(request) I'm trying to create the object

Re: standalone script to call a view

2013-06-28 Thread Sergiy Khohlov
View is used for serving web requests not for serving bash script . Ok you have called a view and receive a http page. Ia it expected result? I think more easy way is create a function which is be called by view and your script. Many thanks, Serge +380 636150445 skype: skhohlov On Fri,

Re: standalone script to call a view

2013-06-28 Thread Larry Martell
On Fri, Jun 28, 2013 at 7:12 AM, Sergiy Khohlov wrote: > View is used for serving web requests not for serving bash script . Ok > you have called a view and receive a http page. Ia it expected result? > I think more easy way is create a function which is be called by view and > your script.

Re: how to properly use the m2m_changed signal?

2013-06-28 Thread Roberto López López
Changing the m2m_changed signal on Project.departments.through to post_save on ProjectDepartmentMembership did the trick. m2m_changed signal seems to work as long as you don't explicitly define the "through" model. On 06/28/2013 02:06 PM, Roberto López López wrote: > > I am doing tests and the

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

2013-06-28 Thread yeswanth nadella
The way I learned it was by reading the offical free django book. According to me, the tutorial app does not teach you lot of django. The first chapter 8 chapter of the book will give you a solid understanding. Hope that thelps. On Friday, June 28, 2013 2:35:17 AM UTC-5, subs...@gmail.com wrote:

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

2013-06-28 Thread Gabriel
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 ema

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

2013-06-28 Thread Roberto López López
Two scoops of django is also a good book https://django.2scoops.org/ 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

ANNOUNCE: Django 1.6 beta 1 released

2013-06-28 Thread Jacob Kaplan-Moss
Hi folks -- I'm pleased to announce that we've just released Django 1.6 beta 1, the second in our series of preview releases leading up to Django 1.6 (due in August). More information can be found on our blog: https://www.djangoproject.com/weblog/2013/jun/28/django-16-beta-1-released/ And in t

Re: standalone script to call a view

2013-06-28 Thread Javier Guerra Giraldez
On Fri, Jun 28, 2013 at 8:21 AM, Larry Martell wrote: > I don't really understand what you mean by "create a function which is > be called by view and your script." AFAICT, your situation looks like this: you have this: def myview(request, maybesomeparams...): does lots of things

Re: django deploy structure

2013-06-28 Thread coded kid
Man, use GIT. Push to your git repo. Clone from git through your production server. It's easy to do. Hope this helps? :) On Thursday, 27 June 2013 09:08:13 UTC+1, Mulianto wrote: > > Hi, > > If cannot use git, for copy the source you can use rsync or use fabric to > selective upload the file and

Re: standalone script to call a view

2013-06-28 Thread Sergiy Khohlov
for this case you can use django shell Many thanks, Serge +380 636150445 skype: skhohlov On Fri, Jun 28, 2013 at 4:47 PM, Javier Guerra Giraldez wrote: > On Fri, Jun 28, 2013 at 8:21 AM, Larry Martell > wrote: > > I don't really understand what you mean by "create a function which is

Filter more than one level in the related field

2013-06-28 Thread Hélio Miranda
Hi! I have my application django-tastypie as BD and MongoDB But I have a problem, it is unable to filter on more than one level, I will give an example to explain better. I have the following: *class EntrepreneurResource (resources.MongoEngineResource):* ** * country = fields.ReferencedLis

Re: Filter more than one level in the related field

2013-06-28 Thread Gabriel
I'm not familiar with Mongo and Tastypie, but is parsing querystrings in the __ format something that it's supposed to do by default? On Fri, Jun 28, 2013 at 11:20 AM, Hélio Miranda wrote: > Hi! > I have my application django-tastypie as BD and MongoDB > But I have a problem, it is unable to fi

Re: Help in finding how to learn Django

2013-06-28 Thread Mike Dewhirst
On 28/06/2013 5:49pm, subsn...@gmail.com wrote: Hi all, What is the best way to learn Django 1.5 thouroughly? I have been a .NET developer and have a really good understanding of OOP, HTML5, CSS and JavaScript. I also have an entry-level knowledge of Python. I am completely new to MVC (or MVT, i

Re: Filter more than one level in the related field

2013-06-28 Thread Hélio Miranda
is supposed to do research in the related field, as shown here, the documentation http://django-tastypie.readthedocs.org/en/v0.9.15/interacting.html Would filter Entrepreneur by country named Portugal -- You received this message because you are subscribed to the Google Groups "Django users"

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

2013-06-28 Thread Mike Dewhirst
On 28/06/2013 11:47pm, Roberto López López wrote: Two scoops of django is also a good book https://django.2scoops.org/ +1 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 Dja

Re: Filter more than one level in the related field

2013-06-28 Thread Tom Christie
Hi Hélio, As mentioned before, it's not really appropriate to consistently cross-post your questions. Folks on either list won't be aware if there question has already been answered by someone else, it's more difficult for ot

Re: standalone script to call a view

2013-06-28 Thread Larry Martell
On Fri, Jun 28, 2013 at 7:47 AM, Javier Guerra Giraldez wrote: > On Fri, Jun 28, 2013 at 8:21 AM, Larry Martell > wrote: >> I don't really understand what you mean by "create a function which is >> be called by view and your script." > > > AFAICT, your situation looks like this: > > you have thi

Re: Filter more than one level in the related field

2013-06-28 Thread Hélio Miranda
Ok, peço desculpas -- 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@g

Re: Filter more than one level in the related field

2013-06-28 Thread Hélio Miranda
> > Ok, I apologize > > -- 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-u

Re: A PHP framework with some Django features?

2013-06-28 Thread Tiago Almeida
Hi , try Symfony2. Symfony template language has the same syntax as django templates. Only the template filters have different names but similar functions. It does not have an admin as good as django's. There are third party apps (called bundles in the context of symfony) that try to do that (e.

Re: A PHP framework with some Django features?

2013-06-28 Thread Deepak Kumar
I have used symfony2 quite a bit and as very rightly said by *Tiago Almeida *in the thread below that SonataAdminBundle (in sf2 context) serves as very good admin management, till now I am very happy with Symfony2. On Friday, June 28, 2013 2:43:38 AM UTC+5:30, thoms wrote: > > Hello, > > I h

Re: A PHP framework with some Django features?

2013-06-28 Thread Andre Terra
I've heard good anecdotes about http://laravel.com/... but I'd never ever leave Django... Cheers, AT On Fri, Jun 28, 2013 at 12:52 PM, Deepak Kumar wrote: > I have used symfony2 quite a bit and as very rightly said by *Tiago > Almeida *in the thread below that SonataAdminBundle (in sf2 contex

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

2013-06-28 Thread Jason Arnst-Goodrich
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

Re: A PHP framework with some Django features?

2013-06-28 Thread Jason Arnst-Goodrich
Nobody's ever switched FROM Django TO PHP as far as I know :) But like others have already said - there's plenty of good frameworks that accomplish the same things Django does in PHP. Unless you truly love PHP I'd take the time to learn Django instead. :P On Friday, June 28, 2013 10:17:50 AM UT

Re: A PHP framework with some Django features?

2013-06-28 Thread Javier Guerra Giraldez
On Fri, Jun 28, 2013 at 12:54 PM, Jason Arnst-Goodrich wrote: > Nobody's ever switched FROM Django TO PHP as far as I know :) maybe not, but returns to PHP might be common. still many people take PHPs ease of deployment as a failure of other schemes (not realizing that creating a web applicatio

Re: A PHP framework with some Django features?

2013-06-28 Thread Gustavo Carneiro
On Fri, Jun 28, 2013 at 7:04 PM, Javier Guerra Giraldez wrote: > On Fri, Jun 28, 2013 at 12:54 PM, Jason Arnst-Goodrich > wrote: > > Nobody's ever switched FROM Django TO PHP as far as I know :) > > > maybe not, but returns to PHP might be common. > > still many people take PHPs ease of deploymen

Using django tags in a blog post

2013-06-28 Thread Cody Scott
I have a simple model that has a TextField used to store a blog post. body = models.TextField() I would like to be able to use django tags in the blog post, such as {% url '' %} and {% trans "" %}. I tried using the |safe filter and passing a mark_safe() value but they don't convert the djan

Re: A PHP framework with some Django features?

2013-06-28 Thread Javier Guerra Giraldez
On Fri, Jun 28, 2013 at 1:16 PM, Gustavo Carneiro wrote: > I don't know what you mean. You can use apache mod_wsgi to have apache > directly serve Django web apps[1], same as PHP. in most cases, apache out of the box will let you simply drop *.php files anywhere you have static files and they'l

Re: A PHP framework with some Django features?

2013-06-28 Thread Gustavo Carneiro
On Fri, Jun 28, 2013 at 7:26 PM, Javier Guerra Giraldez wrote: > On Fri, Jun 28, 2013 at 1:16 PM, Gustavo Carneiro > wrote: > > I don't know what you mean. You can use apache mod_wsgi to have apache > > directly serve Django web apps[1], same as PHP. > > > in most cases, apache out of the box wi

Re: configure apache for shared hosting using fcgi

2013-06-28 Thread gilberto dos santos alves
please take steps bellow, for understand what is going on. for run django app on shared host where we have apache2 and fcgi module installed like hostgator.com step 01 - create symbolic link for static (css, img, js) 1.1 if in your provid

Re: ANNOUNCE: Django 1.6 beta 1 released

2013-06-28 Thread Marc Aymerich
On Fri, Jun 28, 2013 at 3:48 PM, Jacob Kaplan-Moss wrote: > Hi folks -- > > I'm pleased to announce that we've just released Django 1.6 beta 1, > the second in our series of preview releases leading up to Django 1.6 > (due in August). > > More information can be found on our blog: > > > https://ww

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

2013-06-28 Thread Kakar Arunachal Service
For me, Beginning Django E-commerce by James McGaw was very helpful! Hope this helped you. On Fri, Jun 28, 2013 at 8:08 PM, Mike Dewhirst wrote: > On 28/06/2013 11:47pm, Roberto López López wrote: > >> Two scoops of django is also a good book https://django.2scoops.org/ >> > > +1 > > > >> >> On

Re: ANNOUNCE: Django 1.6 beta 1 released

2013-06-28 Thread Gabriel
Yeah, that new testrunnser may be exactly what I was looking for! Great work! On Fri, Jun 28, 2013 at 4:20 PM, Marc Aymerich wrote: > On Fri, Jun 28, 2013 at 3:48 PM, Jacob Kaplan-Moss > wrote: > > Hi folks -- > > > > I'm pleased to announce that we've just released Django 1.6 beta 1, > > the

Get Form from string?

2013-06-28 Thread MacVictor
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

Re: Get Form from string?

2013-06-28 Thread MacVictor
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

Re: Get Form from string?

2013-06-28 Thread yeswanth nadella
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 M

Ajax

2013-06-28 Thread Nafiul Islam
In which version, will Django natively support Ajax? I'm curious because you need Ajax for almost any site these days, and Django not supporting it natively has become a bit of a hindrance for me. -- You received this message because you are subscribed to the Google Groups "Django users" group

Re: Ajax

2013-06-28 Thread Russell Keith-Magee
I'm not sure what you mean. Django completely supports AJAX right now. Django is a server-side framework, and the only part of AJAX that is server-side is the API call. An API call is just a view that returns JSON/XML instead of HTML. You can write that right now in Django. If you want a library

Re: Ajax

2013-06-28 Thread Gamesbrainiac
Then why does itsay on the website that Django does not support Ajax natively? On Jun 29, 2013 12:03 PM, "Russell Keith-Magee" wrote: > > I'm not sure what you mean. Django completely supports AJAX right now. > > Django is a server-side framework, and the only part of AJAX that is > server-side i