Re: Global access to request.user

2015-03-26 Thread Esau Rodriguez
I don't see how middleware could be used to avoid passing the user or
request parameter to the inner methods.

As this is part of the view, I'd probably write a custom filter or tag, I dunno.

Regards,
Esau.

On Thu, Mar 26, 2015 at 2:52 PM, Anderson Resende
 wrote:
> You can use middlewares!!! It is a way...
>
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/2c55f576-7012-49a2-bd53-a8e5fdc4754a%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.



-- 
Esaú Rodríguez
esa...@gmail.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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAB4Jw74hOh0O0VxBNY9JbXqFOFKpWSua49p4EK6%2BY-ZqGfmMRw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django Matrimonial Apps,

2014-02-06 Thread Esau Rodriguez
What do you mean by "matrimonial apps"?



On Thu, Feb 6, 2014 at 2:18 PM, Puneet  wrote:
> Guys did you anything on this ? I am looking for one matrimonial app in
> django.
>
> On Saturday, August 14, 2010 5:05:51 PM UTC+5:30, Kenneth Gonsalves wrote:
>>
>> On Sat, 2010-08-14 at 12:28 +0100, Rizwan Mansuri wrote:
>> > I belies in open sources 100%. Anything what I will write would be
>> > 100% open
>> > source.
>>
>> in which case - where is the code - I would like to join
>> --
>> regards
>> Kenneth Gonsalves
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/ed1e6077-4d0b-41d7-a27f-4b8a01d95cca%40googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.



-- 
Esaú Rodríguez
esa...@gmail.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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAB4Jw749%2BGeCdX%2B-ngt6T2pGO3N7_KBg5x1HLJSfxsBnSzDNEQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Newbie question about django-cas

2014-02-19 Thread Esau Rodriguez
Hi there,
you have to put the absolute url for CAS_SERVER_URL

try CAS_SERVER_URL=http://login.oregonstate.edu-dev/login (or https)

Regards,
Esau Rodriguez.


On Wed, Feb 19, 2014 at 6:04 PM, wasingej  wrote:
> Hello.
>
> I am trying to put together a little test application which allows a user to
> log in to a CAS server and then redirects them back to the site after they
> have logged in.  I have followed the instructions on this page:
> https://bitbucket.org/cpcc/django-cas/overview.
>
> The URL for my server is: login.oregonstate.edu-dev/login
>
> However, when I try to access http://127.0.0.1:8000/accounts/login, I get
> redirected to:
> http://127.0.0.1:8000/accounts/login/login.oregonstate.edu-dev/login?service=http%3A%2F%2F127.0.0.1%3A8000%2Faccounts%2Flogin%2F%3Fnext%3D%252F
>
> Can anybody point me in the right direction as to what's going on here?
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/44bfea1a-0a45-44bd-acaf-63a8f717d53a%40googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.



-- 
Esaú Rodríguez
esa...@gmail.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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAB4Jw77Ke0z5DVCMGR8pzJ91Xzsrjb-xu4KdXGVvwz_gaVAHWQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: newcomer to django testing

2014-06-08 Thread Esau Rodriguez
The testing process creates  db itself when using south it migrate all
apps with migrations. Could you have a problem with your migrations
when run from zero?.

Regards
Esau Rodriguez.



On Sun, Jun 8, 2014 at 10:20 AM, monoBOT  wrote:
> Im new on testing ... to be honest its my first django test XD
>
> Now i wanted to test one of my applications and after the innitial tweaking
> of allowing the django user to be able to create databases i get this error:
>
> The error was: relation "usuario_usuario" does not exist
>
> Error in migration: comunidad:0001_initial
> Traceback (most recent call last):
>   File "manage.py", line 10, in 
> execute_from_command_line(sys.argv)
>   File
> "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py",
> line 399, in execute_from_command_line
> utility.execute()
>   File
> "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py",
> line 392, in execute
> self.fetch_command(subcommand).run_from_argv(self.argv)
>   File
> "/usr/local/lib/python2.7/dist-packages/django/core/management/commands/test.py",
> line 50, in run_from_argv
> super(Command, self).run_from_argv(argv)
>   File
> "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py",
> line 242, in run_from_argv
> self.execute(*args, **options.__dict__)
>   File
> "/usr/local/lib/python2.7/dist-packages/django/core/management/commands/test.py",
> line 71, in execute
> super(Command, self).execute(*args, **options)
>   File
> "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py",
> line 285, in execute
> output = self.handle(*args, **options)
>   File
> "/home/monobot/.local/lib/python2.7/site-packages/south/management/commands/test.py",
> line 8, in handle
> super(Command, self).handle(*args, **kwargs)
>   File
> "/usr/local/lib/python2.7/dist-packages/django/core/management/commands/test.py",
> line 88, in handle
> failures = test_runner.run_tests(test_labels)
>   File "/usr/local/lib/python2.7/dist-packages/django/test/runner.py", line
> 145, in run_tests
> old_config = self.setup_databases()
>   File "/usr/local/lib/python2.7/dist-packages/django/test/runner.py", line
> 107, in setup_databases
> return setup_databases(self.verbosity, self.interactive, **kwargs)
>   File "/usr/local/lib/python2.7/dist-packages/django/test/runner.py", line
> 279, in setup_databases
> verbosity, autoclobber=not interactive)
>   File
> "/home/monobot/.local/lib/python2.7/site-packages/south/hacks/django_1_0.py",
> line 104, in wrapper
> return f(*args, **kwargs)
>   File
> "/usr/local/lib/python2.7/dist-packages/django/db/backends/creation.py",
> line 339, in create_test_db
> load_initial_data=False)
>   File
> "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py",
> line 159, in call_command
> return klass.execute(*args, **defaults)
>   File
> "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py",
> line 285, in execute
> output = self.handle(*args, **options)
>   File
> "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py",
> line 415, in handle
> return self.handle_noargs(**options)
>   File
> "/home/monobot/.local/lib/python2.7/site-packages/south/management/commands/syncdb.py",
> line 103, in handle_noargs
> management.call_command('migrate', **options)
>   File
> "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py",
> line 159, in call_command
> return klass.execute(*args, **defaults)
>   File
> "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py",
> line 285, in execute
> output = self.handle(*args, **options)
>   File
> "/home/monobot/.local/lib/python2.7/site-packages/south/management/commands/migrate.py",
> line 111, in handle
> ignore_ghosts = ignore_ghosts,
>   File
> "/home/monobot/.local/lib/python2.7/site-packages/south/migration/__init__.py",
> line 220, in migrate_app
> success = migrator.migrate_many(target, workplan, database)
>   File
> "/home/monobot/.local/lib/python2.7/site-packages/south/migration/migrators.py",
> line 305, in migrate_many
> result = self.migrate(migration, database)
>   File
> "/home/monobot/.local/lib/python2.7/site-packages/south/migration/migrators.py",
> line 134, in migrate
> result = self.run(migration, database)
>   File
> "/home/monobot/.local/lib/python2.7/site

Re: Contacts

2014-07-09 Thread Esau Rodriguez
You need to import classes from models. Try from contacts.models import
Person (or any other class).

Regards,
Esau Rodriguez.
El 10/07/2014 06:44, "Lachlan Musicman"  escribió:

> Hola,
>
> So I need a contact app. I could write one myself, but there are a
> gazillion forks of something that seems quite comprehensive,
> django-contacts.
>
> This is the first time I've used a third party app that adds models to
> my project.
>
> I did (in a dev virtualenv) pip install django-contacts, added to the
> settings and have sync'd against the db.
>
> But there is no directory in my project folder - I can only presume
> that's because it's in /virtualenv/path/lib/python/somewhere
>
> How do I add contacts, without using the Admin interface?
>
> Should I instead just git clone from the django-contacts src/contacts
> folder into my project instead?
>
> cheers
> L.
>
>
>
> --
> The idea is that a beautiful image is frameable. Everything you need
> to see is there: It’s everything you want, and it’s very pleasing
> because there’s no extra information that you don’t get to see.
> Everything’s in a nice package for you. But sublime art is
> unframeable: It’s an image or idea that implies that there’s a bigger
> image or idea that you can’t see: You’re only getting to look at a
> fraction of it, and in that way it’s both beautiful and scary, because
> it’s reminding you that there’s more that you don’t have access to.
> It’s now sort of left the piece itself and it’s become your own
> invention, so it’s personal as well as being scary as well as being
> beautiful, which is what I really like about art like that.
>
> ---
> Adventure Time http://theholenearthecenteroftheworld.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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAGBeqiPV6THzJasTdpdz4NkLsaVS5tvOEydSHh35TuPW_aUHxA%40mail.gmail.com
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAB4Jw75apWqkzcns4SP8NVM2tij4-htLw7-EhbgJh9daw_Xsqw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Are these tests redundant?

2014-07-15 Thread Esau Rodriguez
Imho all but 4 are redundant. That is already tested in django itself.

Regards,
Esau Rodriguez.
El 15/07/2014 16:48, "Tianyi Wang"  escribió:

> Hi,
>
> I have a very simple model:
>
> class Action(models.Model):
> name = models.CharField('Name', max_length=100)
> deleted = models.BooleanField('Deleted', default=False)
>
> def __unicode__(self):
> return self.name
>
> class Meta:
> ordering = ('name',)
>
> My tests for this model is at
> https://gist.github.com/tianyi33/f8c327d8b539a7585cec
>
> Do you think my tests are reasonable or some of them are redundant?
>
> Thanks
>
> Tianyi
>
>  --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/dbe37d7f-c9db-48c6-8757-6251689a1141%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/dbe37d7f-c9db-48c6-8757-6251689a1141%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAB4Jw76CsL0JAimFrXU3FmuroZ-%3D7z9b1oXqJhm7picwVmO2Kw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Use of transactions

2015-10-21 Thread Esau Rodriguez
Hi,
Transactions are a different concept than locks. In few words a transaction
means that the all the sentences within it are done or not done, but can't
be half done (unless you have savepoints, and want to rollback to a
particular point). The locks avoid other for making operations on the table
or row which should prevent from race conditions as no one is allowed to do
modifications or even reads until the operation finished.

So the answer to to your first questions is no, if you are  using id
generation from DB it would take the first free at the moment it runs.

I think the problem you have is that the id generation is outside database,
and probably is based on what is on the DB when you start printing (would
be nice if you put more code about id generations).

Regards,
Esau Rodriguez.

On Wed, Oct 21, 2015 at 4:02 PM, César Bustíos Benites <
cesarbust...@gmail.com> wrote:

> Anyone? T_T
>
> On Tuesday, October 20, 2015 at 1:02:27 PM UTC-5, César Bustíos Benites
> wrote:
>>
>> Hello, first, let me give you an idea of the problem I'm facing. This is
>> a company with a fruit packaging plant, they use several printers for the
>> barcodes they attach in fruit boxes, clamshells and pallets. There is a
>> Django table that keeps track of the current number for each one (caja,
>> clamshell and pallet):
>>
>>
>> <https://lh3.googleusercontent.com/-dmAawvjfCg4/ViZuR_tPlvI/Y08/zD0pPBWATeE/s1600/series.png>
>>
>> They don't want to be holes in the middle, if the current number for a box
>>  is *00071799* then there must be boxes from *0001 *to *00071798*.
>> These numbers are used as primary keys for the Caja, Clamshell and Pallet
>> models.
>>
>> The printing process is using atomic transactions:
>>
>> @transaction.atomic
>> def print_barcodes(request):
>> tid = transaction.savepoint()
>> # lot of code here
>> if error:
>>transaction.savepoint_rollback(tid)
>> # ...
>> return JsonResponse(response)
>>
>>
>> We are getting a lot of these:
>>
>> _mysql_exceptions.IntegrityError: (1062, "Duplicate entry 'XX'
>> for key 'PRIMARY'")
>>
>> Which means we have a fault in the process or maybe we are improperly
>> using transactions. Help will be much appreciated regarding the problem and
>> the following questions:
>>
>>1. If we print 10 boxes from *0001 *to *0010* and say
>>(exaggeratedly) each box takes 1 second to print. Then, another guy wants
>>to print boxes while the first transaction is still active, will he get
>>*0011*? Considering that the numbers are updated during the
>>transaction.
>>2. Do transactions stack and lock the tables?
>>
>> Thanks a lot
>>
>>
>>
>>
>>
>> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/b43184ad-cc06-4244-aea8-624a325c3538%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/b43184ad-cc06-4244-aea8-624a325c3538%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Esaú Rodríguez
esa...@gmail.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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAB4Jw76HcsQQZN05OVWBtN0TsxG-r9LxFRWGsUUOaNLoD1pQrg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Use of transactions

2015-10-21 Thread Esau Rodriguez
Hi,
it's hard to say without seeing more code. In my mind right now is
something like:
* First transaction start
** T1: It reads maximum from DB (lets say is 100)
** T1: It will create 101
** T1: It will create 102
* T2: Let say at this moment second transaction start
** T2: It reads maximum from DB (depending on how you implemented your
transactions could be 100 or 102 if the transaction is the whole block or
every print)
** T2: It tries to create 101 (or 103) if is 101 you get an integration
error
** T1: It tries to create 103 (as T2 already wrote it) you get an
integration error

Regards,
Esau Rodriguez.

On Wed, Oct 21, 2015 at 4:29 PM, César Bustíos Benites <
cesarbust...@gmail.com> wrote:

> Hello! Thank you for answering. So if that's the case then what is
> happening is that (according to question 1) the second transaction is
> getting the same number as the first one and complaining with the
> IntegrityError while trying to save. Is that correct?
>
> On Wednesday, October 21, 2015 at 10:21:50 AM UTC-5, esauro wrote:
>>
>> Hi,
>> Transactions are a different concept than locks. In few words a
>> transaction means that the all the sentences within it are done or not
>> done, but can't be half done (unless you have savepoints, and want to
>> rollback to a particular point). The locks avoid other for making
>> operations on the table or row which should prevent from race conditions as
>> no one is allowed to do modifications or even reads until the operation
>> finished.
>>
>> So the answer to to your first questions is no, if you are  using id
>> generation from DB it would take the first free at the moment it runs.
>>
>> I think the problem you have is that the id generation is outside
>> database, and probably is based on what is on the DB when you start
>> printing (would be nice if you put more code about id generations).
>>
>> Regards,
>> Esau Rodriguez.
>>
>> On Wed, Oct 21, 2015 at 4:02 PM, César Bustíos Benites <
>> cesarb...@gmail.com> wrote:
>>
>>> Anyone? T_T
>>>
>>> On Tuesday, October 20, 2015 at 1:02:27 PM UTC-5, César Bustíos Benites
>>> wrote:
>>>>
>>>> Hello, first, let me give you an idea of the problem I'm facing. This
>>>> is a company with a fruit packaging plant, they use several printers for
>>>> the barcodes they attach in fruit boxes, clamshells and pallets. There is a
>>>> Django table that keeps track of the current number for each one (caja,
>>>> clamshell and pallet):
>>>>
>>>>
>>>> <https://lh3.googleusercontent.com/-dmAawvjfCg4/ViZuR_tPlvI/Y08/zD0pPBWATeE/s1600/series.png>
>>>>
>>>> They don't want to be holes in the middle, if the current number for a
>>>> box is *00071799* then there must be boxes from *0001 *to
>>>> *00071798*.  These numbers are used as primary keys for
>>>> the Caja, Clamshell and Pallet models.
>>>>
>>>> The printing process is using atomic transactions:
>>>>
>>>> @transaction.atomic
>>>> def print_barcodes(request):
>>>> tid = transaction.savepoint()
>>>> # lot of code here
>>>> if error:
>>>>transaction.savepoint_rollback(tid)
>>>> # ...
>>>> return JsonResponse(response)
>>>>
>>>>
>>>> We are getting a lot of these:
>>>>
>>>> _mysql_exceptions.IntegrityError: (1062, "Duplicate entry 'XX'
>>>> for key 'PRIMARY'")
>>>>
>>>> Which means we have a fault in the process or maybe we are improperly
>>>> using transactions. Help will be much appreciated regarding the problem and
>>>> the following questions:
>>>>
>>>>1. If we print 10 boxes from *0001 *to *0010* and say
>>>>(exaggeratedly) each box takes 1 second to print. Then, another guy 
>>>> wants
>>>>to print boxes while the first transaction is still active, will he get
>>>>*0011*? Considering that the numbers are updated during the
>>>>transaction.
>>>>2. Do transactions stack and lock the tables?
>>>>
>>>> Thanks a lot
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django users" group.
>>> To unsubscribe from this group and stop receiving email

Re: Django debug= false throwing 503 error

2015-12-28 Thread Esau Rodriguez
Hi,
I assume the development server is working. If that is the case it could be
that you have a problem with your production stack. I remember a situation
long time ago (like Django 1.1 or so) a project I run with apache +
mod_wsgi and we have a problem like this (I don't remember the error code)
because there were a "print" in the code.

So please confirm you can use "runserver"
* If so, try to put more data on your production stack (web server,
wsgi gateway, etc.)
* If no you'll probably have much more data to fix the problem.

Regards,
Esau.



On Mon, Dec 28, 2015 at 8:46 AM, Web Architect  wrote:

> Hi,
>
> I have set the following in settings.py for our production system:
>
> DEBUG=False
>
> ALLOWED_HOSTS = ['*'] (in fact any value is not working)
>
> The server is throwing "HTTPError = 503".
>
> There are no logs and I am clueless about the reason for the error. I
> tried searching the net and looking into DJango documents but couldn't find
> the possible reason.
>
> Django version is 1.8.3.
>
> Would really appreciate if anyone could help with the above.
>
> 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 https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/a3a76d7c-438c-442d-a68b-3d31859b4708%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Esaú Rodríguez
esa...@gmail.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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAB4Jw77oU1kmem6vbo-y0HJoCqvmx%3DZjnimxtX9x2tSLPyhijA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Could you please share your django-based website source code with me?

2007-07-01 Thread Esau Rodriguez

On Monday 02 July 2007 06:45:38 nick feng wrote:
> Hi All,
>
> I plan to build a django-based website for open-sourcing these days, I have
> read the django-book. Since my limited knowledge of web developing(this is
> my first time to develop website), I find it's still hard to start now.
> Will anybody share your django-based website source code with me ? Thank
> you very much! I promise that your codes is only used for my studying
> django.
>
If you take a look at [1] would see that some of the sites have the source 
code. However you must realize that they are source for full django 
applications at production level.

Regards,
Esau Rodriguez.

>
> Best wishes,
> Nick
> 

[1] http://www.djangosites.org
-- 
==
Esaú Rodríuez Sicilia
Email1: [EMAIL PROTECTED]
Email2: [EMAIL PROTECTED]
IM1: [EMAIL PROTECTED]
IM2: [EMAIL PROTECTED]
IM3: [EMAIL PROTECTED]
C/Callao de Lima 38 3ºizq 38002 S/C de Tenerife
==

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: i18n translation urls in templates

2007-09-22 Thread Esau Rodriguez

On Saturday 22 September 2007 08:51:11 ferran wrote:
> Hi,
>
> I'm trying translate url's in my templates but i don't know how, i'm
> using tags url and trans
> i'm try this
>
> {% url trans "home_url_presentation" %}
> {% url | trans "home_url_presentation" %}
> but do not anything
>
> in locale .po files:
> /en/LC_MESSAGES/django.po
> msgid "home_url_presentation"
> msgstr "en_home_url_presentation"
>
> /es/LC_MESSAGES/django.po
> msgid "home_url_presentation"
> msgstr "es_home_url_presentation"
>
> in urls.py :
> url(r'^presentation/$', 'direct_to_template', {'template':
> 'home_presentation.html'}, name="en_home_url_presentation"),
> url(r'^presentacion/$', 'direct_to_template', {'template':
> 'home_presentation.html'}, name="es_home_url_presentation"),
>
> and how i translate urls in templates with tag URL??
>
> thanks in advance
> Ferran Parra
>
>
> 
I see what you want to get but i'm not sure you can do it using your aproach. 
I probably try to write my own templatetag; however you may rather to use 

{% if es_home_url_presentation %}
something
{% if en_home_url_presentation %}
something else


-- 
==
Esaú Rodríuez Sicilia
Email1: [EMAIL PROTECTED]
Email2: [EMAIL PROTECTED]
IM1: [EMAIL PROTECTED]
IM2: [EMAIL PROTECTED]
IM3: [EMAIL PROTECTED]
C/Callao de Lima 38 3ºizq 38002 S/C de Tenerife
==

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: newforms.BooleanField needs a required=False?

2007-04-22 Thread Esau Rodriguez

Yes I do. I'm using the svn version.

On 4/21/07, Terji7 <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I'm making my first 0.96 application, a Faroe Islands tax calculator
> (it's at gladsheinur.webfactional.com/skattur/, check it out, it's a
> work in progress).
>
> I'm trying to use a BooleanField, but GET requests send nothing back
> to the server if the checkbox is unchecked. That makes the form return
> a "This field is required', although it IS being used (it's only set
> to 'off').
>
> To make things work, I have to hack around using
>
> class MyForm(forms.Form):
> bool = forms.BooleanField(label="boolean", required=False)
>
> which isn't good. Anyone else have this problem with newforms?
>
>
> >
>


-- 
===
Saludos,
Esaú Rodríguez
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
===

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---