Tutorial Django app, part 1

2023-01-24 Thread javier lopez
I'm new with Django. Trying to code te sample of tutorial i got the error that shows in the images. Python version 3.11.1 and 3.9 too. Same error. Anyone can help me? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this

regarding django forms

2022-09-26 Thread Javier Esparis Meza
I'm currently having strange behavior with a django admin form. Somehow the django admin form is not creating the model fields and occasionally a GET request fails because I am trying to change the widget of a field in the __init__ method. I think the error I have is in the django admin class

Re: Deploy Django Project in AAPanel

2022-09-01 Thread Javier L. Camacaro
t;/www/server/panel/pyenv/lib/python3.7/codecs.py", lin.and more* when i try to create a project with python manager 2.0. I can't understand *.* *Thanks again!* El jue, 1 sept 2022 a las 1:55, 'Kasper Laudrup' via Django users (< django-users@googlegroups.com>) escribió: >

Deploy Django Project in AAPanel

2022-08-31 Thread Javier L. Camacaro
Does someone how to deploy a Django Project in AAPanel? I tried Python Maganer 2.0 but impossible for me! I get this error: Sorry, something went wrong: Traceback (most recent call last): File "class/flask_sockets.py", line 30, in *call* handler, values = adapter.match() File

Re: How to use same Models for all apps?

2022-08-29 Thread Javier L. Camacaro
; from appName.models import tableName >> else if you're in the same app >> from .models import tableName >> >> Thanks and Regards >> Lakshyaraj Dash >> >> On Sun, Aug 28, 2022, 04:48 Javier L. Camacaro >> wrote: >> >>> Do i need to rep

How to use same Models for all apps?

2022-08-27 Thread Javier L. Camacaro
Do i need to repeat the models for each app?, Can I use same model for all the apps in my project? I'm a new a DJango programmer, sorry for that Thanks! -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop

Re: Cannot start Daphne / Looking for channels production deployment with daphne/nginx

2021-09-23 Thread Javier Menéndez Rizo
You are missing a main attribute on your asgi.py file. Try with daphne -b 0.0.0.0 -p 8001 mabtest.asgi:application El miércoles, 22 de septiembre de 2021 a las 20:37:50 UTC, mab.mo...@gmail.com escribió: > Hello, > > I am attempting to add asgi/channels to an existing django project/web >

Re: wrong URL for view function

2019-07-10 Thread Javier Rivera
You need to capture parameters in your path definition if they are part of the url. Something like path('/get_courts//', views.get_courts, name="reg4_getcourts') Best regards, Javier. O 10/07/19 ás 08:57, johnf escribiu: Hi, In my app folder I have a view.py which contains a fun

Re: NEWBIE

2019-07-09 Thread Javier Rivera
If you have no previous programing experience, a miracle. If you are already proficient with Python two months are enough to get comfortable with Django, but you will likely still be far from mastery. Best regards, Javier. O 09/07/19 ás 11:34, Afotro Ben escribiu: Hello,i am new

Re: Good afternoon, I need help to generate a PDF of my models in DJANGO

2018-05-29 Thread ALDO JAVIER VIGUERAS
Thanks for help me give me idea where is problem i'm will try it different from but when i finished will put it -- 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

Good afternoon, I need help to generate a PDF of my models in DJANGO

2018-05-29 Thread ALDO JAVIER VIGUERAS
Hallo, I want to do a view to retur me a PDF with my models tah I have in models.py , I habe python 3 Django 2.11 and the models are in POSTGRESQL . The next is my code that a I have, but gived TypeError: pruebapdf() missing 1 required positional argument: 'DesdeJango' 'DesdeJango'= is model

Re: Setting up jQuery in debian with virtualenv

2016-11-09 Thread Javier Guerra Giraldez
On 9 November 2016 at 13:54, Gary Roach <gary719_li...@verizon.net> wrote: > I want to know how to use the pip installed version of the jquery file if > possible. you can check what the admin templates do. probably something like {% url "admin/js/vendor/jquery/jquery.min.j

Re: Negative User ID's

2016-11-06 Thread Javier Guerra Giraldez
On 4 November 2016 at 18:28, <mich...@zanyblue.com> wrote: > > Unfortunately, the apps are currently in different DB's. > > On Friday, November 4, 2016 at 10:26:34 AM UTC-7, Javier Guerra wrote: >> >> that's what foreign keys are for even so, a foreign key fie

Re: Negative User ID's

2016-11-04 Thread Javier Guerra Giraldez
On 4 November 2016 at 17:17, <mich...@zanyblue.com> wrote: > To support future integration, I need to ID's to be common across the two > apps. that's what foreign keys are for -- Javier -- You received this message because you are subscribed to the Google Groups "Dj

Re: Compressing images before saving to database

2016-09-16 Thread Javier Guerra Giraldez
this. Its link to documentation > will be appreciated too. I've used Wand (a binding to imagemagick library) on a background task, since I had to handle HUGE images -- Javier -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscr

Re: Disadvantages of using model name rather than model class for FK field?

2016-09-01 Thread Javier Guerra Giraldez
hlight, autocompleting editors, static analyzers...) to detect typos. -- Javier -- 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...@goo

Re: Best way to keep the current selection

2016-07-27 Thread Javier Guerra Giraldez
_Searchs or something like this, with metadata on the search (user, date, sort critera, etc) and a many2many link to the found records. it makes it easy to repeat a search, keep it for longer, name it, or even share it -- Javier -- You received this message because you are subscribed to the G

Re: deploy django with nginx

2016-07-15 Thread Javier Guerra Giraldez
that it has r/w permissions on that socket -- Javier -- 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

Re: Document storage and data mining

2016-07-15 Thread Javier Guerra Giraldez
n the model, and add a full text index (you can use Watson [2] to help with that). [1] http://django-storages.readthedocs.io/en/latest/ [2] https://github.com/etianen/django-watson -- Javier -- You received this message because you are subscribed to the Google Groups "Django users"

Re: resetting table id (SOLVED)

2016-07-04 Thread Javier Guerra Giraldez
;text file". you did truncate to a single byte ('\n', added by default if you don't use the '-n' option on echo), and it had to be thrown away and recreated. it would've been 'nicer' to just delete it. -- Javier -- You received this message because you are subscribed to the Google Groups

Re: Making queries with custom SQL

2016-06-16 Thread Javier Guerra Giraldez
e are Django packages. -- Javier -- 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

Re: Django Live video streaming from ffserver

2016-05-26 Thread Javier Rivera
You can try to use a proxy. Maybe not the most performance-wise idea in the world, but it could work. You can try this: http://django-http-proxy.readthedocs.io/en/stable/ Best regards, Javier. On 26/05/16 12:38, Jahan Balasubramaniam wrote: Hi I have setup a ffserver which provides live

Re: sub accounts in django

2016-05-19 Thread Javier Guerra Giraldez
his or any package recommendation? that's commonly known as "multitenant" applications. there are several approaches to do it, and quite a few packages to help with either. -- Javier -- You received this message because you are subscribed to the Google Groups "Django users"

Re: MTV and MVC difference

2016-04-19 Thread Javier Guerra Giraldez
plate; so now you have Models, Views and Templates. Note also that Django Views are typically much thinner than MVC views. -- Javier -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receivi

Re: Question about users system

2016-04-15 Thread Javier Guerra Giraldez
problem of managing what in effect is a global variable. not worth it. -- Javier -- 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+unsubs

Re: Debugging DJango app on production for High CPU Usage

2016-02-24 Thread Javier Guerra Giraldez
On 24 February 2016 at 13:18, Avraham Serour <tovm...@gmail.com> wrote: >> sometimes going beyond 100% > > how?? if it's what top reports, 100% refers to a whole core. a multiforking server (like uWSGI) can easily go well beyond that. and that's not a bad thing -- Javier

Re: Why does Django allow Circular Model Relation

2016-02-19 Thread Javier Guerra Giraldez
s complain why would it complain? it might be (sometimes) less than optimal, but it's valid to have circular relationships. -- Javier -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receivin

Re: can't find static file

2015-09-30 Thread José Javier Castro Matamoros
Hi Gary. Did you read the section *Serving static files during development*. If you don't maybe this happen because you didn't add this code in the project/urls.py. rom django.conf import settingsfrom django.conf.urls.static import static urlpatterns = patterns('', # ... the rest of your

Re: Django deployment

2015-09-18 Thread Javier Guerra Giraldez
On Fri, Sep 18, 2015 at 4:51 PM, monoBOT <monobot.s...@gmail.com> wrote: > The guide Mario Gudelj shared is probably the best you can find on internet. (the best if you like gunicorn....) -- Javier -- You received this message because you are subscribed to the Google Groups &quo

Re: Prefetch() with through models

2015-09-17 Thread Javier Guerra Giraldez
ms, it's safer to go the temporary table route. The only one where I haven't been able to hit any limit is PostgreSQL. There i routinely do many thousands of items and it works beautifully. I haven't personally tried "hundreds of thousands", but I guess that if it fits within some maximum text

Re: Angular.js advanced tutorials?

2015-09-11 Thread Javier Guerra Giraldez
nhanced ui, just don't be surprised for the lack of examples, and the feeling that you're killing flies by swinging a big couch. -- Javier -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receivi

Re: What frontend-tools to use for a new CRM project? Shall I use Django OR switch to Meteor.js?

2015-09-09 Thread Javier Guerra Giraldez
On Wed, Sep 9, 2015 at 9:32 AM, 'Tom Evans' via Django users <django-users@googlegroups.com> wrote: > We have (different!) django projects using react, backbone and > angular. and lots more! i've found riot.js a very refreshing foundation for those of us that hate JS. -- Jav

Re: Serving uploaded files from multiple storages

2015-08-11 Thread Javier Guerra Giraldez
e objects. then implement each storage method by stripping the prefix, using it to determine the apropriate backend, and calling it with the rest of the path. -- Javier -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscr

Re: Invalid syntax in url.py

2015-08-06 Thread Javier Guerra Giraldez
e and then the url entry becomes url(r'^', home, name="home"), -- Javier -- 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-user

Re: how to descript the many to one relationship in model when there are more than 1 tables

2015-08-06 Thread Javier Guerra Giraldez
On Thu, Aug 6, 2015 at 8:18 AM, Holland_zwz <holland...@gmail.com> wrote: > But i am not got the main point. The problem is the table C's oid column > data comes from A or B. I don't think SQL works that way. at least, it's very much against any normalization guideline. -- Jav

Re: Using django as a socket server and not HTTP server

2015-08-05 Thread Javier Guerra Giraldez
is not HTTP but it's roughly request-response, then you might be able to create a frontend that calls Django (or any WSGI app) in the back. Maybe by hacking gunicorn, or creating a uWSGI plugin, or using the new async capabilities in the latests Python versions... but it would be the current stack

Re: same field in two classes

2015-08-03 Thread Javier Guerra Giraldez
On Sun, Aug 2, 2015 at 5:54 PM, Robin Lery <robinl...@gmail.com> wrote: > You can use inheritance. Or content type. Or use signals to get the value of > salary from one model and save it to another model. or choose the right place to store it and don't duplicate information.

Re: DB Design question

2015-08-01 Thread Javier Guerra Giraldez
you can get. -- Javier -- 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-

Re: One-time tasks at varying times with Uwsgi Spooler

2015-07-31 Thread Javier Guerra Giraldez
o':'world'}, at=(datetime.now()+timedelta(hours=5).timestamp()) -- Javier -- 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.

Re: How to save data from form FileField to DB Django

2015-07-30 Thread Javier Guerra Giraldez
d the code can stay the same. check DjangoStorages [1], it includes a "Database" backend [2] (and other like S3, libcloud, etc) [1] https://django-storages.readthedocs.org/en/latest/index.html [2] https://django-storages.readthedocs.org/en/latest/backends/database.html -- Javier --

Re: Testing related models without saving

2015-07-16 Thread Javier Guerra Giraldez
onsidered a required infrastructure service, and tests usually assume it works as expected. -- Javier -- 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

Re: Help me for create restful web services

2015-07-06 Thread José Javier Castro Matamoros
Also you can use Django REST framework www. *django-rest-framework*.org On Mon, Jul 6, 2015 at 11:12 AM, Sadaf Noor wrote: > You can try Tastypie (https://django-tastypie.readthedocs.org/en/latest/) > > 2015-07-06 19:00 GMT+06:00

Re: Django formset hidden id field

2015-07-04 Thread Javier Guerra Giraldez
for any user-visible record when there might be several instances of the same code. this way i can merge or split datasets without changing user-visible references. -- Javier -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscrib

Re: Help me develop a Job Tracker (?)

2015-07-03 Thread Javier Guerra Giraldez
next one (if there's any more step(s)). -- Javier -- 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 t

Re: Help me develop a Job Tracker (?)

2015-07-02 Thread Javier Guerra Giraldez
maybe a way to specify preconditions, which makes it easy to show, for a given user, which are the transitions available for a specific process. good luck! -- Javier -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from t

Re: How To Activate Django Server.

2015-06-26 Thread Javier Guerra Giraldez
On Fri, Jun 26, 2015 at 4:56 PM, Steve Burrus <steveburru...@gmail.com> wrote: > I AM able to create a new virtual env. but I gfet this error message when I > try to create a new project! have you installed django in this virtualenv? -- Javier -- You received this message

Re: help with e-library

2015-06-26 Thread Javier Guerra Giraldez
lways ask specific questions here. -- Javier -- 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

Re: Help me develop a Job Tracker (?)

2015-06-26 Thread Javier Guerra Giraldez
n.wikipedia.org/wiki/Workflow_engine [1.1]: https://en.wikipedia.org/wiki/Business_process_modeling [1.2]: https://en.wikipedia.org/wiki/Petri_net [1.3]: https://en.wikipedia.org/wiki/Kahn_process_networks [2]: https://www.djangopackages.com/grids/g/workflow/ -- Javier -- You received this mess

Re: Scaling/Parallel patterns for a View executing complex database transaction

2015-06-14 Thread Javier Guerra Giraldez
et about durability, or distribute the load on several shards while shifting consistency tradeoffs. know what? a good SQL engine gets faster too if you do any of these things. -- Javier -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubsc

Re: "&" string to template adds "" in the html

2015-05-22 Thread Javier Guerra Giraldez
On Fri, May 22, 2015 at 1:11 PM, dk <demi...@gmail.com> wrote: > I fixed doing this > > {% autoescape off %} > {{ my_var_with_& }} > {% endautoescape%} the "right" way is: {{ my_var_with_anything|safe }} -- Javier -- You received this message becau

Re: Logout user on tab closing

2015-05-19 Thread Javier Guerra Giraldez
, uses the 'back' or 'forward' buttons, or even when reloading. that's why most web applications rely on timeout and not on trying to detect the user leaving the application. -- Javier -- You received this message because you are subscribed to the Google Groups "Django users" group.

Re: Embeding HSQLDB in a standalone App

2015-05-19 Thread Javier Guerra Giraldez
ible to call the JVM from Python... or write a standalone Java program and drive it from Python... not what i would call "a proper solution". the cleanest solution seems to be doing your project in Java. -- Javier -- You received this message because you are subscribed to the Google Groups

Re: Multiple databases

2015-05-18 Thread Javier Guerra Giraldez
you considered PostgreSql? it does handle json or xml documents quite well (in fact, arguably better than most "document databases" out there) -- Javier -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this g

Re: The best way to mock querysets

2015-05-01 Thread Javier Guerra Giraldez
the code to work decoupled from the database, then test it in isolation. if not, then the minimal test (and minimal code to pass it) is to assume the database layer is already well tested by the framework (and it is!), and you're free to assume it in the tests. cheers, -- Javier -- You rec

Re: Django runserver needs restart on psql data changes

2015-04-29 Thread Javier Guerra Giraldez
ng with respect to getting > the data from the database and into my view? sounds like you're storing that data in a variable. you should either read it from database on every request, or get some cache invalidation techniques. -- Javier -- You received this message because you are subscr

Re: Migrations During Development

2015-04-25 Thread Javier Guerra Giraldez
On Sat, Apr 25, 2015 at 12:28 PM, Timothy W. Cook <t...@mlhim.org> wrote: > On Sat, Apr 25, 2015 at 2:15 PM, Javier Guerra Giraldez <jav...@guerrag.com> > wrote: >> if you don't store migrations, then you have to generate them on each >> production update, righ

Re: Migrations During Development

2015-04-25 Thread Javier Guerra Giraldez
oduction. haven't tried Django migrations yet; is there any difference that make this more appropriate? if you don't store migrations, then you have to generate them on each production update, right? if so, wouldn't they count as untested code? how about manually tweaked, or data migrations? -- Javi

Re: Concept of partial views to be resolved from other views or template tags

2015-04-25 Thread Javier Guerra Giraldez
sily cache complex pieces that stay constant even if other parts are more variable, or constant on a different variable... [1]: https://www.varnish-cache.org/docs/3.0/tutorial/esi.html [2]: http://nginx.org/en/docs/http/ngx_http_ssi_module.html -- Javier -- You received this message because

Re: Strange error in django

2015-04-22 Thread Cristian Javier Martinez
> > John > > On Apr 22, 2015, at 2:36 PM, Cristian Javier Martinez < > martinezcri...@gmail.com > wrote: > > Hi! I'm using the django rest framework and successfully deployed an > application in a production environment but I'm having an strange error > related

Strange error in django

2015-04-22 Thread Cristian Javier Martinez
Hi! I'm using the django rest framework and successfully deployed an application in a production environment but I'm having an strange error related to threads when I call a method that performs a simple classification task (using a scikit learn classifier) and I have no idea what is causing

Re: Model with two e-mail fields uniques

2015-04-08 Thread Javier Guerra Giraldez
until it runs" here the OP is way, way, behind of the very first normalizations. any consideration of an hypothetical "cost of join" would be much later, if any. -- Javier -- You received this message because you are subscribed to the Google Groups "Django users" g

Re: Model with two e-mail fields uniques

2015-04-07 Thread Javier Guerra Giraldez
el): person = models.ForeignKey(Person) email = models.EmailField(unique=True) -- Javier -- 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

Re: newbie question

2015-03-19 Thread Javier Guerra Giraldez
of your time. -- Javier -- 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-

Re: Future for Django, Jobs, Confused :/

2015-03-04 Thread Javier Guerra Giraldez
as needed. Of course, that doesn't mean we're jumping all around, just that the languages must be tools not barriers. -- Javier -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails fro

Re: Django sometimes shows partial (incomplete) json data in production env

2015-02-24 Thread Javier Guerra Giraldez
on), I wonder what is cutting > conexion ? if so, when this occurs ? check the time needed to generate that response. this sounds like some serve-enforced timeout. (why to send textual data as a picture??) -- Javier -- You received this message because you are subscribed to the Google

Re: Using class based views.

2015-02-24 Thread Javier Guerra Giraldez
ven if you decide to do some CBV, there's no need to use the included classes, as they're unlikely to be the best answer outside of the 'generic view' envelope. -- Javier -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from

Re: Restrict downloading files in Django?

2015-01-31 Thread Javier Guerra Giraldez
e (apache) -- Javier -- 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-use

Re: Model to create forms

2015-01-08 Thread Javier Guerra Giraldez
per data sample, with a foreign key to the experiment record); then fetching the description of the experiment, plus all the related data will be much faster, simpler, more compact and all-around more efficient than having one table per experiment. databases aren't flat files, use them as designed and th

Re: Two Django projects with common models and business logic

2014-12-24 Thread Javier Guerra Giraldez
ode but also the common app -- Javier -- 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

Re: Two Django projects with common models and business logic

2014-12-23 Thread Javier Guerra Giraldez
(business logic) to > be in sync (when models/code is altered). encapsulate those models and code in reusable apps. and since Django apps are just Python modules, you can package and deploy them using Python tools like pip. -- Javier -- You received this message because you are subscribed to

Re: Raw access to cache table

2014-12-18 Thread Javier Guerra Giraldez
already running, exit now" in shell scripts. check the man page, it lists a few ways to do this kind of things. http://linux.die.net/man/1/flock -- Javier -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from

Re: Django and SSL

2014-12-10 Thread Javier Guerra Giraldez
o more needs for SSL, there's no space for SSL between apache and Django. -- Javier -- 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+unsubs

Re: Need help with unique_together - on ForeignKey and Boolean field

2014-11-17 Thread Javier Guerra Giraldez
ORM, but you can simply add as an "ALTER TABLE CREATE UNIQUE INDEX ProductdefaultImage ON app_productimage (image) WHERE is_default_image;" at creation and forget about it. -- Javier -- You received this message because you are subscribed to the Google Groups "Django users&

Re: need precise advice before final decision on Django

2014-11-13 Thread Javier Guerra Giraldez
RPC calls in view code will block the request/response cycle. in principle that would mean you need a good multithreading WSGI container, but maybe some good event-driven-monkeypatching platform can work too. -- Javier -- You received this message because you are subscribed to the Google Groups &quo

Re: Do you think Django's future is threatened by JS frameworks in both client & server?

2014-10-29 Thread Javier Guerra Giraldez
On Wed, Oct 29, 2014 at 1:11 PM, Glen Jungels <glenjung...@gmail.com> wrote: > the javascript frameworks (Node, Angular, etc) differ in that the execution > is done client side Node.js is a server framework. -- Javier -- You received this message because you are subscribed t

Re: Django builds incorrect sql-query

2014-10-20 Thread Javier Guerra Giraldez
On Mon, Oct 20, 2014 at 3:43 AM, Алексей Широков <alexi1...@gmail.com> wrote: > Javier, I am unable combine 2 parameters in a single call filter(), because > It is built on different levels of code. > > Is there another solution??? you can build up a dictionary and ex

Re: Django builds incorrect sql-query

2014-10-20 Thread Javier Guerra Giraldez
an refer to independent `Sending` objects. try: Document.objects.filter(sendings__user=1, sendings__state=0b001) in this case, `sendings__user` and `sendings__state` appear on the same `filter()` call, so they refer to `user` and `state` fields of the same `Sending` object. [1]: https://docs

Re: Unable to store static

2014-10-16 Thread Javier Guerra Giraldez
tic' subdirectory name. in the HTML try -- Javier -- 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

Re: best aproach to pass an email from the url to a view?

2014-10-10 Thread Javier Guerra Giraldez
web user. -- Javier -- 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-use

Re: Config: DB or git?

2014-09-29 Thread Javier Guerra Giraldez
everything, who cares about a couple KB extra storage?) as a set indexed by hostname, which is read from the environment. -- Javier -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails f

Re: What is *the* django 1.7 IDE which is opensource & multiplattform

2014-09-24 Thread Javier Guerra Giraldez
n't want the whole messy project requirements in my shiny workstation. [1] i like Kate, which does have remote access to files via ssh without even sshfs, thanks to KDE. but it still adds a split-second lag when i hit save, so i always edit locally, even if i test remotely. -- Javier -- You rec

Re: What is *the* django 1.7 IDE which is opensource & multiplattform

2014-09-24 Thread Javier Guerra Giraldez
playground project. why bother with VMs when we have virtualenv? -- Javier -- 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+un

Re: Javascript requests after user login

2014-09-09 Thread Javier Guerra Giraldez
esponse content? more likely is that you're missing the csrf token [1]. (happens to me at least twice for each ajax-enable webapp i write) [1] https://docs.djangoproject.com/en/dev/ref/contrib/csrf/#ajax -- Javier -- You received this message because you are subscribed to the Google Groups

Re: Concern about FastCGI deprecation

2014-09-02 Thread Javier Guerra Giraldez
able FastCGI WSGI container, but it's no longer supported, so it's unreasonable to ask the Django foundation to support it. the question is: what options are there to run WSGI under IIS? my first guess would be any HTTP-WSGI container (gunicorn?) and set IIS as a proxy. -- Javier --

Re: Custom management commands provided as only .pyc files?

2014-08-13 Thread Javier Guerra Giraldez
ngo finds the .py files as usual. it not only follows the letter of the requirement ("thou shalt not give your .py files unto others"), but highlights how inappropriate it is. -- Javier -- You received this message because you are subscribed to the Google Groups "Django users&quo

Re: What is the difference between running manage.py and ./manage.py?

2014-08-03 Thread Javier Guerra Giraldez
ault PATH value. -- Javier -- 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 em

Re: django beginner

2014-07-07 Thread Javier Guerra Giraldez
On Mon, Jul 7, 2014 at 8:17 AM, ngangsia akumbo <ngang...@gmail.com> wrote: > But i have just created a separate app call photo, but when i run syncdb > nothing happens have you added it to INSTALLED_APPS in settings.py? -- Javier -- You received this message because you ar

Re: Unicode Str error [Beginner question]

2014-07-03 Thread José Javier Castro Matamoros
Could you please put all the code of the model. On Thu, Jul 3, 2014 at 1:08 PM, Lian Tombing wrote: > When I tried to implement the example, > > class Poll(models.Model): > # ... > def __unicode__(self): # Python 3: def __str__(self): > return self.question > >

Re: Advanced SQL Question

2014-06-19 Thread Javier Guerra Giraldez
On Thu, Jun 19, 2014 at 4:49 PM, G Z <zuk...@gmail.com> wrote: > how do I deal with concatenated foreign keys to form a primary key how do i > even register that in the models.py? i guess you mean composite keys. if so, then no; the Django ORM doesn't support composite primary keys.

Re: Re: Django Python roop

2014-06-11 Thread Javier Guerra Giraldez
uot;[]" doesn't do what you think. -- Javier -- 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

Re: execute a code at a particular date and time (aperidic task) in django

2014-06-10 Thread Javier Guerra Giraldez
apply_async(eta=) option [1] [1]: http://docs.celeryproject.org/en/latest/userguide/calling.html#id3 -- Javier -- 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

Re: problem with django, nginx and gunicorn

2014-05-01 Thread Javier Guerra Giraldez
: taskid}) def resulturl(request, taskid): resultfilename = queue.taskresult(taskid) return rendertemplate('processready.html', {'resultfilename': resultfilename}) -- Javier -- You received this message because you are subscribed to the Google Groups "Django users" group.

Re: Relationships exposed over RESTful interface

2014-04-11 Thread Javier Guerra Giraldez
ig to report all queries to console or logfiles. (https://docs.djangoproject.com/en/1.6/topics/logging/#django-db-backends). or make the DB server itself log all queries. -- Javier -- You received this message because you are subscribed to the Google Groups "Django users" group. To un

Re: Remind the users when their accounts are expiring

2014-04-11 Thread Javier Guerra Giraldez
email for each one (https://docs.djangoproject.com/en/1.6/topics/email/). then have cron execute that command once a day. -- Javier -- 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: Relationships exposed over RESTful interface

2014-04-11 Thread Javier Guerra Giraldez
easily need 10 queries but the final throughput you get from the system would be almost the same if it's 10 queries or just 1, as long as it's not (n+1) as you had before. of course, you still have to be sure the indexes are optimal to keep each query nice and tight! -- Javier -- You receiv

Re: Relationships exposed over RESTful interface

2014-04-10 Thread Javier Guerra Giraldez
atedMixin, self).get_queryset().select_related(*self.related_fields) class ManufacturerModelViewSet(SelectRelatedMixin, viewsets.ModelViewSet): related_fields = ('manufacturer',) . the rest of your viewset -- Javier -- You received this message because you are subscribed to the Google Groups

Re: Making functions callable

2014-03-26 Thread Javier Guerra Giraldez
such as a list or a dictionary: if the function modifies the object (e.g. by appending an item to a list), the default value is in effect modified. This is generally not what was intended. A way around this is to use None as the default, and explicitly test for it in the body of the function. -- Javier -

Re: Class that extends a model that is not a model

2014-03-05 Thread Javier Guerra Giraldez
ed byt composition rather than inheritance. -- Javier -- 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.co

Re: big legacy database with complex many to many relationships

2014-02-24 Thread Javier Guerra Giraldez
functions that use ODBC or any other interface to pull your data and use that in your Django views, or even in your models. -- Javier -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving e

Re: looking for recommendations for django app for managing tv commercial post production

2014-02-20 Thread Javier Guerra Giraldez
regarding user > management and authentication, hopefully time tracking, client management > and asset management. not Django, but TACTIC (http://www.southpawtech.com/) is an Open source DAM with roots on video postproduction and workflow. -- Javier -- You received this message becau

  1   2   3   4   5   6   7   >