HI,
I'm trying to migrate an application from *Django1.8.5/Python2.7* to *Django
1.10/Python3.6* and having problems with code below:
def clean_password(self):
username = self.cleaned_data.get('username')
password = self.cleaned_data.get('password')
user =
de olho na
views.py vocês vão poder me ajudar
*Marcos Alves*
--
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
Preciso gravar na models User do django um campo denominado "Role" do tipo
boolean. Este campo vai ser True quando for um cliente se cadastrando e
False para quando for um Fornecedor. A principio, no que tange visualmente,
o campo aparece na tela e eu consigo marcar ele, mas seu valor não
<https://lh3.googleusercontent.com/-gF112g_arto/VtRdzT-zGbI/Ajo/Fk9BqLlpj6A/s1600/Captura%2Bde%2Bpantalla%2Bde%2B2016-02-29%2B16%253A02%253A47.png>
El lunes, 29 de febrero de 2016, 14:14:42 (UTC+1), Marcos Serrano escribió:
>
> Hello,
>
> How yo translate the default
Hello,
How yo translate the default permissions django. Keywords (Add, Delete ...
)
http://stackoverflow.com/questions/29398900/django-permissions-and-contenttypes-translations
I tried to do something like this but it has not worked for me.
Thx.
--
You received this message because you are
Changing the database accidentally can be avoided simply by adjusting the
privileges of the database user django uses.
Flexibility in a software project always come out at the expense of
simplicity. So, generally, django developers are right to avoid rarely need
features in exchange for a
For registration I like to use django-registration-redux.
https://django-registration-redux.readthedocs.org/en/latest/
El lunes, 8 de junio de 2015, 15:55:36 (UTC-3), akshat escribió:
>
> I know some applications and have also used them but I want to know what
> other django users use and love?
if it is the best practice, but I think a simple solution.
Thanks C. Kirby.
Hug!
Em segunda-feira, 26 de agosto de 2013 12h40min52s UTC-3, Marcos Luiz
Wilhelm escreveu:
>
> Hello!
> I'm having problems with a view that makes add and update
> The view generates a new record rather
Hello!
I'm having problems with a view that makes add and update
The view generates a new record rather than change a instance.
My code is this: http://pastebin.com/rZNAeN0p
Someone can help me please?
--
You received this message because you are subscribed to the Google Groups
"Django users"
There are several ways to manage sessions, or cache. That's up to you
according to your needs.
You can find documentation about sessions, caching and much more here:
https://docs.djangoproject.com/en/1.5/
Rgds
On Tue, Aug 20, 2013 at 1:12 PM, JAI PRAKASH SINGH <
jaiprakashsingh...@gmail.com>
Did you run collectstatic ?
https://docs.djangoproject.com/en/dev/ref/contrib/staticfiles/#collectstatic
On Tue, May 7, 2013 at 9:41 PM, wrote:
> Hello,
>
> I have site that renders a chart using HighCharts with data from static
> csv files, as well as a link to download
for others looking for an answer, put your value between double quotes:
Previous |
Next
El jueves, 6 de diciembre de 2007 15:44:32 UTC-6, J. Clifford Dyer escribió:
>
> Hello.
>
> I'm trying to get a template to render previous and next links on a series
> of pages, as follows.
>
> Previous |
http://ask.github.io/celery/cookbook/daemonizing.html
On Mon, Apr 8, 2013 at 6:01 AM, sparky wrote:
> Hi Django people,
>
> I'm finding it difficult to get my head around running celeryd as a daemon
> from the docs on Ubuntu. Does anyone know of any good tutorials or
http://invisibleroads.com/tutorials/geodjango-googlemaps-build.html
Like that?
Marcos
On Fri, Sep 14, 2012 at 6:30 AM, Coulson Thabo Kgathi <zeeco...@gmail.com>wrote:
> can i place markers on geodjango maps, cant figure out how to do that
>
> --
> You received this m
If there is, this is a good place to look for it: http://djangopackages.com/
Marcos
On Tue, Apr 17, 2012 at 7:12 AM, James Deng <jtd...@gmail.com> wrote:
> Hi all,
>
> I have a case to manage my staff for customer support, basically I need a
> time based schedule table. th
You can set a hidden input widget to the form field.
Rgds,
Marcos
On Fri, Feb 24, 2012 at 11:26 AM, coded kid <duffleboi...@gmail.com> wrote:
> Hi guys, How can I get rid of the field that's beside django comment
> textarea? (the field, if users fill the field[honeypot] the use
emacs +1
On Mon, Dec 19, 2011 at 1:46 PM, george wrote:
> emacs +1
>
> On Dec 19, 3:42 pm, Masklinn wrote:
> > On 2011-12-19, at 16:30 , Andre Terra wrote:
> >
> >
> >
> > > What do you mean by embedded Django interpreter? An instance of python
> >
Can someone please tell me how can I specify a form to be used by every form
inside an inline formset (if possible)?
Thanks in advance!
Marcos
--
Some people, when confronted with a problem, think “I know, I'll use regular
expressions.” Now they have two problems.
Jamie Zawinski
Dev.
Arch Linux, python2.7, django-1.3, virtualenv, postgresql (if possible),
south, django-extensions, Emacs
Dep.
Ubuntu Server, fabric, Nginx, supervisord, uwsgi
Rgds,
Marcos
On Mon, Aug 22, 2011 at 7:07 PM, Stephen Jackson <
jackson.stephe...@gmail.com> wrote:
> I am new to
__init__.py I just do:
import app_name.signals
Rgds,
Marcos
On Sat, May 28, 2011 at 7:05 AM, Mateusz Harasymczuk <mate...@harasymczuk.pl
> wrote:
> I am thinking about splitting my model's save() method over few signals.
>
> For example, stripping spaces and making string cap
Read the static-files docs
On Sat, Apr 30, 2011 at 4:14 AM, Sunil Chugh wrote:
> how can i used static_root
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to
You need to create a VirtualHost for each one of your projects.
http://httpd.apache.org/docs/2.0/vhosts/
Marcos
On Wed, Apr 6, 2011 at 5:24 AM, ug Charlie <ug.char...@gmail.com> wrote:
> I have tried whole day. And I just got a new django project works.
>
> But I want my old pr
You can write a pre_save signal
http://docs.djangoproject.com/en/dev/ref/signals/#django.db.models.signals.pre_save
Hope it helps,
Marcos
On Wed, Mar 30, 2011 at 8:09 AM, Robert Šmol <smol.rob...@gmail.com> wrote:
> Hi,
>
> is it possible to load fixtures of models that have a
This should work without grabbing the entire table:
[x[0] for x in
Wizard.objects.filter(**filterargs).annotate(wpower=Sum('creatures__power')).order_by('-
wpower').values_list('id', 'wpower')]
Rgds,
Marcos
On Tue, Mar 22, 2011 at 5:25 PM, Andreas Pfrengle <a.pfren...@gmail.com>wrote:
It depends on what you are using. For me is
/usr/lib/python2.7/site-packages/django/contrib/admin/templates/admin/
Hope it helps.
On Wed, Feb 23, 2011 at 6:06 AM, DJ Chung wrote:
> I am going through the tutorial on Djangoproject.com. I'm trying to
> work on templates and
you need to put it in your media folder.
http://docs.djangoproject.com/en/1.2/howto/static-files/
Rgds,
Marcos
On Thu, Feb 17, 2011 at 2:44 PM, hank23 <hversem...@stchas.edu> wrote:
> Is it possible to use external javascript files with a django app? If
> so what folder does the jav
irtualHost
configuration.
Rgds,
Marcos
On Thu, Feb 17, 2011 at 2:23 PM, Ashish Agarwal <agarwal1...@gmail.com>wrote:
> I'm still having trouble. My directory structure is:
>
> /usr/local/www/static
> |
> +- contrib/admin/media -- symlink to django/contrib/admin/media
> |
> +- m
Are you doing: from django.utils.translation import ugettext_lazy as _ ?
or: from django.utils.translation import ugettext as _ ?
The first one shoud work.
Rgds,
Marcos
On Tue, Feb 8, 2011 at 7:11 PM, Ivo Brodien <i...@brodien.de> wrote:
> If I import some tuple which is used fo
On Tue, Feb 8, 2011 at 5:43 PM, Daniel Roseman wrote:
> On Tuesday, February 8, 2011 8:30:54 PM UTC, Karen McNeil wrote:
>>
>> I have three Django sites that I've been working on recently and I've
>> been doing most of the development work in Dreamweaver. I don't use
>>
s/left/leave/
sorry fot the double post.
On Fri, Feb 4, 2011 at 11:37 AM, Marcos Moyano <marcosmoy...@gmail.com>wrote:
> Remove (None, "No Period") from your choices and left the required=False on
> your form field. That should work.
>
> Rgds,
> Marcos
>
>
&g
Remove (None, "No Period") from your choices and left the required=False on
your form field. That should work.
Rgds,
Marcos
On Fri, Feb 4, 2011 at 11:31 AM, Marc Aymerich <glicer...@gmail.com> wrote:
> On Fri, Feb 4, 2011 at 12:12 PM, Tom Evans <tevans...@googlemail.co
I've worked on/with this app
https://github.com/Anue/django-polyglot/
Hope it helps.
Rgds,
Marcos
On Fri, Jan 7, 2011 at 12:20 PM, Mo Mughrabi <mo.mughr...@gmail.com> wrote:
> Hello,
>
> in my design there are some models where I need to store certain fields in
> diff
Hi Danfi, thanks for your reply.
This help me!
On 5 Gen, 10:06, Danfi <tda...@gmail.com> wrote:
> Esame:
> name = models.Foreignkey(User)
> ...
>
> Then queryset=Esame.name.get_rows_with_permission(Ecg(),'add')
>
> On 1月4日, 下午8时02分, MarcoS <marc.se...@gmail.com>
The ModelMultipleChoicheField will return Esame objects
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
Hi people, probably I'm making a mountain out of a molehill but I
can't figure
how to solve this problem;
I've a form with a ModelMultipleChoiceField. The queryset will
contains all models for
which the user has a particular permission
(django.contrib.auth.models.Permission) (can_add).
This is
Take a look at the docs on how to set up valid input formats
http://docs.djangoproject.com/en/dev/ref/settings/?from=olddocs#date-format
Rgds,
Marcos
On Wed, Dec 29, 2010 at 1:39 PM, ckar...@googlemail.com <
ckar...@googlemail.com> wrote:
> Hi everybody,
>
> I'm getting
Hi, I've some models with a ForeignKey like this
class Object1
name = models.varchar(max_length=50)
class Object2
name = models.varchart(max_length=50)
referenced_field = models.ForeignKey(Object1)
class Object3
name = models.varchart(max_length=50)
referenced_field =
Yes, you're correct.
Thank you so much
On 16 Dic, 13:40, Marcos Moyano <marcosmoy...@gmail.com> wrote:
> I think you are looking for object_detail, not
> direct_to_template.http://docs.djangoproject.com/en/dev/ref/generic-views/#django-views-...
>
> Rgds,
> Marcos
>
&g
I think you are looking for object_detail, not direct_to_template.
http://docs.djangoproject.com/en/dev/ref/generic-views/#django-views-generic-list-detail-object-detail
Rgds,
Marcos
On Thu, Dec 16, 2010 at 9:32 AM, MarcoS <marc.se...@gmail.com> wrote:
> Hi people, I want to define
Hi people, I want to define a generic view using
simple.direct_to_template, something like this:
(r'^detail_event/(?P\d+)/$', simple.direct_to_template,
{
'extra_context': {'event': Event.objects.get(id=object_id),}
}),
Of course this doesn't work, django tell me that 'object_id' is
You can use field lookups:
http://docs.djangoproject.com/en/dev/topics/db/queries/#field-lookups-intro
ie: Travels.objects.values('date', 'destination__name')
Rgds,
Marcos
On Mon, Dec 13, 2010 at 6:51 AM, nsbk <pedro...@gmail.com> wrote:
> Hello,
>
> I'm using http://code.goog
before loading all the other admin urls.
Rgds,
Marcos
On Sat, Dec 11, 2010 at 1:33 PM, William Grzybowski <willia...@gmail.com>wrote:
> Hello,
>
> I am trying to extend AdminSite so I can provide custom views, so far
> i have this:
>
> class MyAdminSite(AdminSite):
http://www.djangoproject.com/documentation/models/many_to_many/
Rgds,
Marcos
On Fri, Dec 10, 2010 at 8:54 AM, girish shabadimath <
girishmss.1...@gmail.com> wrote:
> Thanks for the reply,,
> Here are my models
>
> class Checkers(models.Model):
>name = models.CharF
Sure there is. You have to override the template:
django/contrib/admin/templates/admin/base.html
Create an admin folder within your templates folder, copy that template over
that admin folder and remove the "{{ title }}" statement.
Hope it helps.
Marcos
On Fri, Nov 26, 2010 at 7:3
You need to specify the __unicode__ method of the model holding the Fish
object.
ie:
class FishHolder(models.Model):
name = models.CharField(...)
.
def __unicode__(self):
return self.name
That should display the names instead of the ids.
Rgds,
Marcos
On Fri, Nov 19, 2010
class PostForm(forms.ModelForm):
registered_date = forms.DateTimeField(widget=forms.HiddenInput)
class Meta:
model = Post
class PostAdmin(admin.ModelAdmin):
form = PostForm
admin.register(Post, PostAdmin)
Rgds,
Marcos
On Thu, Nov 18, 2010 at 5:11 PM, Anderson Goulart
Use related_name
(http://docs.djangoproject.com/en/dev/ref/models/fields/#django.db.models.ForeignKey.related_name)
Rgds,
Marcos
At Tue, 9 Nov 2010 07:20:45 -0800 (PST),
luckrill wrote:
>
> I write following models:
>
> class article(models.Model):
> created_by = models.F
Hi!
I've a Create-Read-Update-Delete application and some form with
multiple pages created with FormWizard.
How can i allow users to update data using a FormWizard?
With singles forms I'm using generic_views, but I can't figure how to
do this with FormWizards..
--
You received this message
Hi people, I use django.views.generic.create_update.create_object to
save a record and I need to retrieve the id of the record from the
just-saved form.
It's possible to do this using generic views?
--
You received this message because you are subscribed to the Google Groups
"Django users"
[2] (ipython traceback):
can anyone help me with this?
[1]http://paste.pocoo.org/show/219363/
[2]http://paste.pocoo.org/show/219367/
--
Marcos Daniel Petry
http://mdpetry.net
--
You received this message because you are subscribed to the Google Groups
"Django users" grou
Personally I like 2 best, it seems more flexible in case you later decide to
show different kinds of links or other information (like a note that says
the profile is viewable only to friends, etc.)
On Wed, Apr 7, 2010 at 14:02, mtnpaul wrote:
> I have a logged in user.
Hi, I'm not too experienced with django myself so I will let someone else
answer the rest of your questions. But for 2, wouldn't it be fairly simple
to create primary keys for these tables? worst case scenario you just add a
column that is a auto_incremented int and run a script to set it for
Yes, sorry for not mentioning it.
On Tue, Apr 6, 2010 at 08:12, Walt wrote:
> Did you also specify null=True?
>
>
> Walt
>
> -~
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email
Make sure you have installed MySQLdb
http://sourceforge.net/projects/mysql-python/
On Mon, Apr 5, 2010 at 21:31, John wrote:
> Hello all,
>
> I am new to django and am doing the tutorial and when I run the
> command below I get the following error.
>
> Does anyone know how
Hi,
So I have a site where I want the client to be able to add/remove links from
a menu on the site through the admin site. Usually these links are to files
on the server but not always. So I created a Link model which has a name,
file and url field. The plan here is that if a file is given it's
Please disregard this message. It was a dumb mistake on my part and I found
it.
On Wed, Dec 2, 2009 at 16:08, Marcos Marín <marcosma...@gmail.com> wrote:
> Hi,
>
> I have a site where you can create news items that can have attached files.
> I'm using TabularInline so the t
Hi,
I have a site where you can create news items that can have attached files.
I'm using TabularInline so the the admin interface shows attached files in
the same view where you create the news items.
When I create a new news item and attach files it gives no errors, but the
file isn't actually
aig
>
> On Mon, Nov 30, 2009 at 8:50 AM, Marcos Marín <marcosma...@gmail.com>wrote:
>
>> Hi, I'm trying to do a query where I select all rows where a field is
>> divisible by 2. In pure SQL this is what I want:
>> select * from contenido_semestre where
Hi, I'm trying to do a query where I select all rows where a field is
divisible by 2. In pure SQL this is what I want:
select * from contenido_semestre where num % 2 = 0;
which works fine. When trying to do it with Django I do
Semestre.objects.extra(where=['num % 2 = 0'])
But this gets me an empty
is when the user misses one of these filters, I would like to
implement a kind of validation, showing where the error is, something
similar to the debug Django, showing where the line is, not an "Internal
Server Error"
--
Marcos Daniel Petry
http://m
Hi all,
I post a problem, hoping someone can help me:
I want to render a dynamic form which many rows how the number of
entries from a database table
(something similar at the list in the "change_list.html" template in
admin)
This is the model:
class Book(models.Model):
title =
Hi, I've a problem adding views to my admin site using Django 1.1
beta.
I've defined inside my admin.py:
class SeasonAdmin(admin.ModelAdmin):
def get_urls(self):
urls = super(SeasonAdmin, self).get_urls()
my_urls = patterns('',
(r'check_calendar/$',
I'm not sure I understand the problem but I doubt it is a format problem. I
think maybe the server does not have permission to write in the folder you
are trying to save files too.
On Tue, Mar 31, 2009 at 18:44, oregon10 wrote:
>
> DISCLAMER: I'm not a program - only
, 2009 at 17:51, Malcolm Tredinnick
<malc...@pointy-stick.com>wrote:
>
> On Tue, 2009-03-31 at 16:50 -0600, Marcos Marín wrote:
> > I have overridden the user change form, I only want to have the email
> > field however the username field seems to always appear no matter
I have overridden the user change form, I only want to have the email field
however the username field seems to always appear no matter what. Is this a
bug or by design? I'm using the beta.
class EstudianteForm(UserChangeForm):
class Meta(UserChangeForm.Meta):
fields = (
ubject: Re: Conditional Inline in admin interface
On Thu, Mar 26, 2009 at 11:11 AM, Marcos Marin <marcosma...@gmail.com> wrote:
I have an app with three different kinds of users (staff, students and
professors) and each of these have a unique profile model. I was recommended to
u
I have an app with three different kinds of users (staff, students and
professors) and each of these have a unique profile model. I was recommended to
use a proxy class to override get_profile() so that it will return the correct
profile depending on the user's group and this seems to work.
My
the form with the follow field:
date = forms.DateField(widget=DateTextInput(format='d/m/y'),
input_formats=['%d/%m/%y'])
It's correct?
On 18 Mar, 13:45, Adi Sieker <a...@sieker.info> wrote:
> Hi,
>
> On 18.03.2009, at 13:01, MarcoS wrote:
>
>
>
> > Hi Adi, thanks for your
/contrib/admin/media/js/admin/DateTimeShortcuts.js
line 239)...
On Mar 18, 11:53 am, Adi Sieker <a...@sieker.info> wrote:
> Hi,
>
> On 18.03.2009, at 11:43, MarcoS wrote:
>
>
>
> > Hi all,
> > I'm implementing a form in django with a DateField field in forms.p
Hi all,
I'm implementing a form in django with a DateField field in forms.py.
My purpose is to allow a user to insert a date in european format (dd/
mm/) and then, obviously, convert it in the /mm/dd format to
let's django check if it's a valid date and save it in a db.
currently I've a
Sorry, i've posted without finishing the message :)
So, if I call clean(self), Django give me this exception for the
following line:
super(forms.DateField, self).clean()
Exception Type: TypeError
Exception Value:
super(type, obj): obj must be an instance or subtype of type
I solved it!
I was getting drowning in my own spittle!
This is the code in forms.py
class BookForm(forms.Form):
def __init__(self, *args, **kwargs):
super(BookForm, self).__init__(*args, **kwargs)
books = Book.objects.all()
for item in books:
field =
> It sounds like you're looking for a modelform.
I don't think I need modelform 'cause my purpose it's only show books
items details with a checkbox for each one.
I need to obtain html like this:
Book title: "Harry Potter and the
Philosopher's Stone" price: "25.00"
Book title:
> Try using a multiplemodelchoice field with a checkboxselectmultiple widget.
>
> Alex
Ok thanks, I've changed forms.py like this:
-- forms.py --
class BookForm(forms.Form):
book_item = forms.ModelMultipleChoiceField
(queryset=Book.objects.all(),
widget=forms.CheckboxSelectMultiple)
Hi! wondering if someone could point me in the right
direction with this one:
I'm trying to populate fields in a form with data from database:
i.e. suppose I've this model:
-- models.py --
class Book(models.Model):
title = models.CharField(max_length=100)
pages = models.IntegerField()
That smells too much of premature optimisation ;-) If you know your
model slightly, you know when a database hit happens (and it might be
unavoidable anyway, so why worry?).
El sáb, 14-01-2006 a las 13:51 +, Luke Plant escribió:
> One reason for the way it is at the moment is it's easy to
at way.
>
>
> --
> "May the forces of evil become confused on the way to your house."
> -- George Carlin
--
Marcos Sánchez Provencio <[EMAIL PROTECTED]>
- which is, in fact, abstract in C++ sense, I'm
> only going to use Composer/Conductor/Soloist. The SQL generator
> appears broken for the order of the derived classes, or I'm not
> supposed to do such things in a model?
>
> Rails has "single table inheritance" in the sense you can put all
> attributes into one table, and superimpose all classes on it, with an
> extra "type" column as the discriminant/class tag. Any such thing in
> django?
>
--
Marcos Sánchez Provencio <[EMAIL PROTECTED]>
You might try the mod_python list...
¿What does the apache error log say?
El vie, 02-12-2005 a las 21:56 -0800, [EMAIL PROTECTED]
escribió:
> I hava Windows, apache 2.0.55 python 2.4.2 and mod python 3.2.5b
> installed.
>
> I have add to httpd.conf LoadModule for mod_pythone.
>
> But apache
¿Did you google that? install python2.4-dev
peter ma wrote:
OS is debian SID
error: invalid Python installation: unable to open
/usr/lib/python2.4/config/Makefile (No such file or directory)
This has been discussed in this list lately; I Hope the OT does not
offend anyone.
http://24ways.org/advent/auto-selecting-navigation
http://www.djangoproject.com/documentation/legacy_databases/
patrick k wrote:
is there any documentation on how to work with a pre-existing database?
patrick
ntered this situation once, because of the admin manage changes.
> You should delete all django source code, and recheckout the code from
> svn.
>
> --
> I like python!
> My Blog: http://www.donews.net/limodou
> NewEdit Maillist: http://groups.google.com/group/NewEdit
--
Marcos Sánchez Provencio <[EMAIL PROTECTED]>
n which it is running and not on
> 127.0.0.1. I am doing this on the latest svn of django - previously i
> had done this on svn #6xx. Any clues?
--
Marcos Sánchez Provencio <[EMAIL PROTECTED]>
84 matches
Mail list logo