--
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.
V
Yeah I figured that its python as per the message. I didn't know I had to
add it to every source that has the chars but thanks for the tip.
I was trying it out to see if the issue was related to the database
encoding or not, a UTF-8 conversion on the data completely fixed my issue.
This is the
I don't think that will work because the default value is unrelated to a
specific instance of a model and you want it to depend on the instance if
I'm not mistaken. Once the instance exists, we're past the point where a
default value will be used.
I think you'll have to handle this in a view.
No, nothing displayed..
Em quinta-feira, 22 de agosto de 2013 13h38min04s UTC-3, Mark escreveu:
>
> Try dropping the .value from referencia. Like {{
> form.instance.idproduto.idmercadoria.referencia }}. Does this work?
>
>
> On Thu, Aug 22, 2013 at 9:35 AM, Fellipe Henrique
>
> > wrote:
>
>> I
Hi Andre,
I just post my current models, the first model it`s just example.
My real model is this: http://pastebin.com/w2TmyLzt as a posted in my last
email.
As I told, if I get the "first" FK value works.. in my real problem, link
above, I try to get "Mercadoria" values, from my "ItensPedid
Hi,
this has nothing to do with Django at all, it's a python thing. The
encoding declaration needs to go on top of EVERY source code file if
you the source code contains non-ASCII encoding. This has NOTHING to do
with Django encoding or the encoding your database uses!
Now, slowly: When you excha
So they will present the RFID Tag to the reader at the time of login
.and logout also? You could do this directly in Python thenCapture
the logout read (same way as login) and use the datetime module to generate
the current time and save it in the Database.
Just trying to understand what i
My users will not be able to logout by closing a browser because they have
no such interaction with the system. They will be passing an RFID tag over
a reader to unlock the door and clock in and a python script will handle
the loging in and out. So if I can get the logout to time stamp a databas
For the record, it's considered a good coding practice to keep everything
in English, including classes, functions and variables. This way it's
easier for people to help you.
Secondly, your Filhos model should really just be Filho.
Finally, don't use obscure names like Brinq. Instead, prefer the
In my html file I have link the css with 'assets', `href="{% static
"assets/css/face.css" %}">`. But there are two folders `assets` and
`admin`, after I made the command collectstatic. Is it the problem? Should
I direct css to `admin`?
On Thu, Aug 22, 2013 at 11:37 PM, Robin Lery wrote:
> STATI
STATICFILES_DIRS = (
('assets','C:/Users/robin/web/facebook/static'),
)
On Thu, Aug 22, 2013 at 11:36 PM, Robin Lery wrote:
> my
>
> STATIC_ROOT = 'C:/Users/robin/web/static_files_for_facebook/'
>
> STATIC_URL = '/static/'
>
> In httpd.conf I have added:
>
> #Serve static files
> AliasMatch
my
STATIC_ROOT = 'C:/Users/robin/web/static_files_for_facebook/'
STATIC_URL = '/static/'
In httpd.conf I have added:
#Serve static files
AliasMatch /static/ C:/Users/robin/web/static_files_for_facebook/
Order deny,allow
Allow from all
After collectstatic command it has collected the s
Hi, I had the same problem, my solution was overwrite the as_p function for
my form class,
and I changed the last line:
mark_safe('\n'.join(output))
--> mark_safe('\n'.join(output).replace(''',"'"))
Mijail
El jueves, 9 de julio de 2009 16:15:16 UTC-5, Tim Sawyer escribió:
>
> Hi,
>
> I'd like
On 2013-08-22, at 9:39 AM, Tom Evans wrote:
> On Thu, Aug 22, 2013 at 5:14 PM, Shahmi Junoh
> wrote:
>> Dear admin,
>>
>> Kindly remove my subscription of this mailing list. Or how do I achieve
>> this?
>
> At the bottom of the email you just forwarded to the list was this text:
>
> You rece
Try changing the first line to {% load static from staticfiles %}
_Nik
On 8/21/2013 6:27 PM, Ideo Rex wrote:
> {% load staticfiles %}
>
>
>
> This is just for my css file (there are other categories under lifestream.
>
> server: https://my.site.com/DJStatic/static/livestream/css/style.css
>
> On
On Thu, Aug 22, 2013 at 5:14 PM, Robin Lery wrote:
> I have configured apache to serve my project. But I can't yet configure it
> to serve static files. Till now in my httpd.conf I have appended the code
> that django documentation provides and its like this:
>
> WSGIScriptAlias / C:/Users/rob
Are your "nome" and "idade" fields displaying? If so, {{
form.instance.brinq.descricao }} should display the descricao field of the
brinq object associated with that Filhos instance bound to the form in the
formset.
On Thu, Aug 22, 2013 at 9:24 AM, Fellipe Henrique wrote:
> Ok, I read that, but
I tried again.. and work if I have just 1 FK, if I have more then one,
doesn't work, like this:
I have this models:
Itens -> produto -> mercadoria
itens:
idproduto = FK (produto)
produto:
idmercadoria = FK(mercadoria)
mercadoria:
referencia = Char
I try to get "referencia" field, as you t
On Thu, Aug 22, 2013 at 5:14 PM, Shahmi Junoh
wrote:
> Dear admin,
>
> Kindly remove my subscription of this mailing list. Or how do I achieve
> this?
At the bottom of the email you just forwarded to the list was this text:
You received this message because you are subscribed to the Google
Group
Try dropping the .value from referencia. Like {{
form.instance.idproduto.idmercadoria.referencia }}. Does this work?
On Thu, Aug 22, 2013 at 9:35 AM, Fellipe Henrique wrote:
> I tried again.. and work if I have just 1 FK, if I have more then one,
> doesn't work, like this:
>
> I have this models
Ok, I read that, but the problem persist.. I try to use as you told, but
nothing show... and no errors appears..
Sorry about my first line.. I just stop here, simple problem, in more then
1 day, and I don't find any solution, anything on internet to...
Cheers
Fellipe
Em quinta-feira, 22 de ago
I have configured apache to serve my project. But I can't yet configure it
to serve static files. Till now in my httpd.conf I have appended the code
that django documentation provides and its like this:
WSGIScriptAlias / C:/Users/robin/web/facebook/facebook/wsgi.py
WSGIPythonPath C:/Users/
# Django settings for mandala project.
# -*- coding: utf-8 -*-
But django says its not declared. Where should I put 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 a
Michael I already have this on top of my settings.py file all along, but
djanog does not pick it up..
#django project
# encoding line is 2nd in settings.py
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop
`Middleware.process_view ` can either return `None` or an `HttpResponse
object [1] thus you could wrap your `AuthManager.ValidateToken(Token)` call
into a try/catch block and return a response early if the service is
unavailable.
[1]
https://docs.djangoproject.com/en/dev/topics/http/middleware
In many posts i submit django code.
I tried to use the < c o d e > < / c o d e > tag but it doesnt format it
very nicely
Is there a other tags to use?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop rec
On Thu, Aug 22, 2013 at 3:28 PM, Fellipe Henrique wrote:
> Hi guys,
>
> I really about to give up from Django,
So should I bother giving you the advice you asked for, since you are
just going to give up on Django?
> because? I try to do something simple
> and I looking, looking around the intern
Hi Radomir,
> So when I changed the encoding in the sql file from LATIN1 to UTF-8 I get
> import errors:
>
> (1 row)
>
> ERROR: invalid byte sequence for encoding "UTF8": 0xe9 0x67 0x75
> CONTEXT: COPY locations_location, line 31
> setval
Well, this is not a UTF8 sequence, but probably iso-8
Doesn't work, I tried this way, but same problem.. that's a simple thing to
do with database, but I see anyone use this in django.. or I doing
something really worng here, or django doesn't work for this type of query.
Em quinta-feira, 22 de agosto de 2013 11h33min37s UTC-3, Raffaele Salmaso
I notice the Django.contrib.Auth has a logout function, is there anyway to
connect a timestamp to a model when the user uses the logout function? My
users will be using the log out function. This is for a time clock I'm
building using RFID tags.
>
> You cannot. The only thing you can do is to
{{ form.brinq.descricao }} ?
On Thu, Aug 22, 2013 at 4:28 PM, Fellipe Henrique wrote:
> Hi guys,
>
> I really about to give up from Django, because? I try to do something simple
> and I looking, looking around the internet and don't find anything about
> this... try this simple example: http://pa
Hi guys,
I really about to give up from Django, because? I try to do something
simple and I looking, looking around the internet and don't find anything
about this... try this simple example: http://pastebin.com/epazpBcZ
I just want to get "descricao" field, from "Brinq" model, using a
inlinef
On Thu, Aug 22, 2013 at 3:06 PM, <7equivale...@gmail.com> wrote:
> I have created a model that gives me a time stamp when a user logs in. I
> connected the 'user_logged_in signal' to a function:
>
> def update_user_login(sender, user), **kwargs):
> user.userlogin_set.create(timestamp=user.las
I have created a model that gives me a time stamp when a user logs in. I
connected the 'user_logged_in signal' to a function:
def update_user_login(sender, user), **kwargs):
user.userlogin_set.create(timestamp=user.last_login)
user.save()
So this basically helps me track the login time,
On 22/08/2013 15:47, Nkansah Rexford wrote:
Here my project urls.py
from django.conf.urls import patterns, include, url
urlpatterns = patterns(''
url(r'^admin/', include(admin.site.urls)),
url(r'^$', include('search.urls')),
)
Hi,
It seems you forgot to add a comma after the two single q
Here's my search app urls.py
from django.conf.urls import patterns, url
from search import views
urlpatterns = patterns('',
#url(r'^$', views.search)
url(r'^search/$', views.detail)
)
Here my project urls.py
from django.conf.urls import patterns, include, url
urlpatterns = patterns(''
url(r
Hello fellow Djangonauts and Djangonistas!
This message is especially for Django developers and friends from Austria.
At the last two DjangoCons in Europe a few people from Austria got to know
each other and at last years conference in Warsaw we spontaneously founded
the Django Friends of Austria
Hi list,
I'm testing Django for a few days now and I have 2 questions.
I created for my tests a simple chat integrated in a base page (one
template for the main page, and one for the chat).
I need to update the chat when an event come but :
1.
If I update my chat sub page, inputs are reset (
Hi,
I tried to change queryset in BaseInLineformset but I got this error:
*metaclass
conflict: the metaclass of a derived class must be a (non-strict) subclass
of the metaclasses of all its bases*
*
*
Here my code:
def BaseItensInlineFormSet(BaseInlineFormSet):
def __init__(self, *args, **
Hello everyone,
I'm running Django 1.5.1 with Apache2/mod_wsgi/Daemon Mode in production.
Idle or stale Daemon processes seem to use up a lot (!) of memory after
a day or so. The ultimate cause for this might be in the web
applications code, but I would like to make sure, there is nothing wrong
Hi,
I've got a webservice built on top Django which requires that every request
(except authentication) include an auth token.
I've implemented this restriction as Middleware...
def process_view(self, request, view_func, view_args, view_kwargs):
if hasattr(view_func, 'NoAuthenticati
Hello,
Django 1.5.1
I use set_language function in template as in example:
https://docs.djangoproject.com/en/1.5/topics/i18n/translation/#the-set-language-redirect-view
It works OK but when Cookies are disabled in browser I get error 500 or
"Failed lookup for key [LANGUAGES] in u"[{'False': Fal
Thanks a bunch. Yeah when I did a full convert to UTF-8 I no longer have
the issue. I still have the case sensitive login issue which came with the
PostgreSQL upgrade. Do you have the same issue? Is this normal?
Logging in as Rad no longer works, I have to use exact case as it is in the
databa
I'm using full utf8.
Whenever I need to import data, I make sure they are utf8 encoded.
an extract from a database dump:
SET statement_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = off;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET escape
This fixed it
iconv -f ISO_8859-1 -t UTF-8 mandala.postgres.sql >
mandala.postgres.utf8.sql
Now it takes the accents in as utf-8. I guess it didnt' like the LATIN1
encoding mixed with UTF-8
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To
Xavier , which encoding do you use for french characters with django?
UTF-8 does not like *é*,
But it says it exists in utf-8:U+00E9éc3 a9LATIN SMALL LETTER E WITH ACUTE
http://www.utf8-chartable.de
--
You received this message because you are subscribed to the Google Groups
"Django users" gr
Xavier, what do you mean file is latin1 encoded? You lost me.
By the way, one of the Non UTF-8 data that it complains about is the accent
over the e in Neguac:
* Néguac* New Brunswick
See my error above given by psql db < file.sql
--
You received this message because you are subscribed to t
So when I changed the encoding in the sql file from LATIN1 to UTF-8 I get
import errors:
(1 row)
ERROR: invalid byte sequence for encoding "UTF8": 0xe9 0x67 0x75
CONTEXT: COPY locations_location, line 31
setval
So what encoding can I use that is safe with french accents but at the same
t
Hi
Le 22 août 2013 à 09:52, Radomir Wojcik a écrit :
> Are french characters UTF-8 Compliant?
As I said, yes. Been using Django + Postgres with french texts and faced no
issue so far.
You also have a decent Django french user base which would have noticed that
sort of issues.
Back on our topi
So is it normal that without adding the u' to a string that contains french
accents will give the error:
ascii' codec can't decode byte 0xc3 in position 10: ordinal not in range(128) ?
Are french characters UTF-8 Compliant?
Would this insertion process not fail if the data contained within t
MySQL would also somehow make the built in django contrib views login case
insensitive, and now its case sensitive. Since it takes the request as a
parameter and request.POST is immutable I will have to write my own login
without using the batteries built in solution since I cannot do a .lower()
This must be my problem all along:
*By the way, if you're using python 2, you shouldn't be using 'string'
notation for character strings and should be using the u'string' one.
'string' is a binary string while u'string' is a text string.
This is misleading with python 2 as there's implicit conv
>
> Russ like I said before, I used COPY to get the data back in and it was
> accepted by postgres with the schema it crated using django (See step 5
> below)
1) Export each table individually from MySQL into csv format.
2) Have Django re-create the models schema from django on its own.
3) E
>
> From what I read, SQLite is production grade and its the most used
> database in the world.. besides the point.
So other than Postgres not picking up my encoding (UTF-8 or Latin-1) , both
did not work. How can I get the login to be case insensitive again? This
will really be a bummer if I
On Thu, Aug 22, 2013 at 2:06 PM, Radomir Wojcik wrote:
> Its not a problem with the conversion process.
>>
>
Well, with all due respect -- yes, it is. Allow me to assure you that
PostgreSQL handles UTF-8 and unicode just fine. If you're getting errors,
it's either a problem with your original sour
Thanks Xavier,
I had this at the top of my settings.py file, tried changing it to latin-1
and it didn't make a difference.
# -*- coding: utf-8 -*-
So right now I am using the UTF-8 database as shown above: mandala |
postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
The data contains speci
56 matches
Mail list logo