Problen with Custom command and Bash Script
Hey guys, I need a little bit help with a custom manage.py command called *test* I am using it in a virtualenv on a shell script *script.sh*, The script.sh works well out of the cron and Wihiout activate the virtualenv also works well. but if the script is on the crontab give a *Unknown command: 'test'* . Here is the code: http://dpaste.org/hjaVi/ , Any help ? Thank you -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: Problen with Custom command and Bash Script
Hi guys, Thanks everybody for all the answers, really helped me. I *SOLVED the problem.* The problem was I was calling custom enviroment variables into my settings.py . So that enviroments variables exists on bash (thanks to .bashrc) but not in cron ( thanks Branko Majic ) so manage.py failed to load and no load at all . I fixed calling my env variables in cron like this: 2 * * * * * root . $HOME/.basrc; /root/env/project/script.sh Thank you to everybody And sorry about my english. Jesús Lucas El miércoles, 6 de febrero de 2013 14:39:55 UTC+1, Jesús Lucas Flores escribió: > > Hey guys, > > I need a little bit help with a custom manage.py command called *test* > > > I am using it in a virtualenv on a shell script *script.sh*, > > The script.sh works well out of the cron and Wihiout activate the > virtualenv also works well. > > but if the script is on the crontab give a *Unknown command: 'test'* . > > Here is the code: http://dpaste.org/hjaVi/ , > > Any help ? > > Thank you > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Select Multiple in List_filter
Hi I am trying to do a select multiple list filter for django admin but I can't . anybody knows how to make it or have a snippet ? Thank you! -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: Select Multiple in List_filter
any help? El domingo, 24 de febrero de 2013 23:48:39 UTC+1, Jesús Lucas Flores escribió: > > Hi I am trying to do a select multiple list filter for django admin but I > can't . > > anybody knows how to make it or have a snippet ? > > Thank you! > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: error and django forms
You can get the errors of a field: {% for field in form %} {{field}} {% for error in field.errors %} {{ error }} {% endfor %} {% endfor %} 2013/4/21 vijay shanker > hi > > i have a django form like this: > > class AddArtistForm(forms.Form): > fname = forms.CharField() > lname = forms.CharField() > profession = forms.CharField() > dob = forms.DateField() > > i want to display errors as this > {% for field in form %} > {{field}} > # error associated with above field > {% endfor %} > > i want to know how can i get error message with associated field if i want > to loop over forms field. > thanks > > > > > > fields error if its not valid > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-users+unsubscr...@googlegroups.com. > To post to this group, send email to django-users@googlegroups.com. > Visit this group at http://groups.google.com/group/django-users?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- ----- Jesús Lucas Flores *Administrador de Sistemas y Programador Web* *PortfolioJLucas.LibreSysTeam.com <http://JLucas.libresysteam.com>* *Blog: jesuslucas.com* Twitter: @jelukas89 <https://twitter.com/#!/jelukas89> - -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Select2Multiple with list_filter :(
Hi i am looking for a thirth package for a usual funcinality : I want filter for multiple values with list_filter for django admin but I can't . ( I search for something like Select2Multiple ) anybody can help me? Thank you! *Sorry about my english -- 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: Call action with a link in the admin site
Hola Juan Antonio, Es totalmente posible. Puedes ver un ejemplo en alguno de mis proyectos: https://github.com/jelukas/presupy/blob/master/presu/admin.py#L39-L47 Un saludo 2013/7/4 Juan Antonio García Cano > In the admin.py i have this function: > > actions = ['generar_pdf'] > def generar_pdf(self, request, queryset): > > ... (This function make a PDF of the object selected) > > And i show one button in the list_display (of the admin site) with this > function: > > def boton_mail(self,obj): > return mark_safe(' src="http://mypage/static/admin/img/descargar_pdf.png"; alt="Descargar PDF" > width=30 height=25>') > > It is posible to call the function "generar_pdf" with a link (< a >) in > the function "boton_mail"? > > (I want to call the action from a image in the list display in the admin > site) > > -- > 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. > > > -- - Jesús Lucas Flores *Administrador de Sistemas y Programador Web* *Linkedin: **www.linkedin.com/in/jesuslucas* *Github: **github.com/jelukas* Twitter: @jelukas89 <https://twitter.com/#!/jelukas89> - -- 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: example for project with user login
You can watch my code: https://github.com/jelukas/django-usuarios-framework/<https://github.com/jelukas/django-usuarios-framework/tree/master/templates/registration> I am using django-registration with templates. And django 1.4 .. i have to update the code to django 1.5 but it is the same idea. *Jesús Lucas Flores* | *Sysadmin, Web Developer and IT Startups Lover* es.linkedin.com/in/jesuslucas <http://github.com/jelukas> <http://github.com/jelukas> <http://github.com/jelukas> <http://github.com/jelukas> github.com/jelukas <http://github.com/jelukas> @jelukas89 Skype: jelukas89 2013/9/27 Rafael E. Ferrero > in settings.py > in TEMPLATE_DIRS put all your templates folders where django go to find > them > > in MIDDLEWARE_CLASSES = ( > 'django.middleware.common.CommonMiddleware', > 'django.contrib.sessions.middleware.SessionMiddleware', > 'django.middleware.csrf.CsrfViewMiddleware', > 'django.contrib.auth.middleware.AuthenticationMiddleware', > 'django.contrib.messages.middleware.MessageMiddleware', > ) > > in INSTALLED_APPS = ( > 'django.contrib.auth', #important to login and logout > 'django.contrib.contenttypes', > 'django.contrib.sessions', > 'django.contrib.sites', > 'django.contrib.messages', > 'django.contrib.staticfiles', > 'django.contrib.admin', > 'YourProject.YourApp', > ) > > and create this > LOGIN_URL = '/url/to/login/' > LOGOUT_URL = '/url/to/logout/' > LOGIN_REDIRECT_URL = '/url/to/your/view' > > > in your general urls.py > > from django.contrib.auth.views import login, logout_then_login > from django.conf.urls.defaults import patterns, url, include > from django.conf import settings > > from django.contrib import admin > admin.autodiscover() > > urlpatterns = patterns('', > (r'^YourApp/', include('YourProject.YourApp.urls')), > (r'^login/$', login, {'template_name': 'login.djhtml'}), > (r'^logout/$', logout_then_login), > # For admin > url(r'^admin/', include(admin.site.urls)), > ) > > if settings.DEBUG: > urlpatterns += patterns('', > url(r'^media/(?P.*)$', 'django.views.static.serve', { > 'document_root': settings.MEDIA_ROOT, > }), >) > > > > in YourApp/urls.py > from django.conf.urls.defaults import patterns, url > > urlpatterns = patterns('YourProject.YourApp.views', > url(r'^$', 'YourViewName'), > ) > > > > need a base.djhtml in YourTemplateFolder > in YourTemplateFolder/login.djhtml > > {% extends "base.djhtml" %} > {% block cuerpo %} > {% if form.errors %} >Su nombre de usuario y contraseña no coinciden. Por favor > intente nuevamente. > {% endif %} > > {% csrf_token %} > Nombre de Usuario type="text" name="username" maxlength="30" /> > Clave de Usuario name="password" id="id_password" /> > > > > {% endblock %} > > > > > in your YourApp/views.py > > from django.contrib.auth.decorators import login_required > from django.template.context import RequestContext > > @login_required > def yourViewName(Request): > #your code here > return render_to_response('yourTemplate', {'YourDict': yourDict}, > context_instance=RequestContext(Request)) > > > > > I think that something like that will work, its copy of a small project > mine in django 1.3.1, its admin somewher ther but you can eliminate. (in > www.fsorgosuardi.com.ar/dj/login its this code running... to see the site > just go to www.fsorgosuardi.com.ar) > > you can, later, try with > allauth<https://github.com/pennersr/django-allauth>app... its really cool > stuff > > > > 2013/9/27 Joachim Wuttke > >> With user login to the user views. >> I would like to build my application by incrementally modifying a working >> small application >> that is just a little more complete than the poll application from the >> basic tutorial. >> >> -- >> 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
Re: Looking for projects that make Django accessible to novice programmers
I am interested in your proyect. Maybe can i post the new when you relase it in my company's blog: OpenWebinars.net ( sorry is only in Spanish) but almost 8000 unique visitors in last 3 weeks. Let me know when you release it at colab...@openwebinars.net *Jesús Lucas Flores* | *Sysadmin, Web Developer and IT Startups Lover* es.linkedin.com/in/jesuslucas <http://github.com/jelukas> <http://github.com/jelukas> <http://github.com/jelukas> <http://github.com/jelukas> github.com/jelukas <http://github.com/jelukas> @jelukas89 Skype: jelukas89 2013/9/29 R. Eastbourne > I'm developing an open-source toolset for Django that makes it easier to > develop a particular type of website. > > I would like for it to be accessible to people who have some understanding > of web development but don't necessarily have the capability or time to > develop a complex site from scratch. > > So, I am working at simplifying everything I possibly can for this domain, > e.g. by providing: > > - Models to inherit from > - Class-based views to inherit from > - Form classes to inherit from > - HTML templates to inherit from > - Custom project & app templates > - Autogenerated urls.py > - etc > > Does anyone know of other projects that do something like this for a > particular category of website? It would be nice to compare and I might get > some ideas. > > -- > 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.