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 grou

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 I

Re: Deploy Django Project in AAPanel

2022-09-01 Thread Javier L. Camacaro
ile "/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@goog

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 "/www/server/

Re: How to use same Models for all apps?

2022-08-29 Thread Javier L. Camacaro
gt; 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 nee

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 > app

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

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 to

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 to

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 nam

Re: Setting up jQuery in debian with virtualenv

2016-11-09 Thread Javier Guerra Giraldez
On 9 November 2016 at 13:54, Gary Roach 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.js" %} -- Javier -- You recei

Re: Negative User ID's

2016-11-06 Thread Javier Guerra Giraldez
On 4 November 2016 at 18:28, 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 field is the answer. i

Re: Negative User ID's

2016-11-04 Thread Javier Guerra Giraldez
On 4 November 2016 at 17:17, 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 "Django users" group

Re: Compressing images before saving to database

2016-09-16 Thread Javier Guerra Giraldez
> 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 unsubscribe from this group and stop rec

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

2016-09-01 Thread Javier Guerra Giraldez
, 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...@googlegroups.com. To post

Re: Best way to keep the current selection

2016-07-27 Thread Javier Guerra Giraldez
earchs 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 Goog

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 to

Re: Document storage and data mining

2016-07-15 Thread Javier Guerra Giraldez
l, 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" group. To un

Re: resetting table id (SOLVED)

2016-07-04 Thread Javier Guerra Giraldez
cate 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 Googl

Re: Making queries with custom SQL

2016-06-16 Thread Javier Guerra Giraldez
On 16 June 2016 at 16:21, TheBeardedTemplar wrote: > I'm using postgreSQL and have found that recursive queries are exactly what > I need In most cases it's much better to use a more efficient form of tree. A common one is called MPTT, for which there are Django packages. --

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
commendation? 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" group. To

Re: MTV and MVC difference

2016-04-19 Thread Javier Guerra Giraldez
ave 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 receiving emails from it, send an

Re: Question about users system

2016-04-15 Thread Javier Guerra Giraldez
and also you get the 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-u

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 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 -- You receive

Re: Why does Django allow Circular Model Relation

2016-02-19 Thread Javier Guerra Giraldez
n? 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 receiving emails from it, send an e

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 URLco

Re: Django deployment

2015-09-18 Thread Javier Guerra Giraldez
On Fri, Sep 18, 2015 at 4:51 PM, monoBOT 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 "Django users" group. T

Re: Prefetch() with through models

2015-09-17 Thread Javier Guerra Giraldez
oute. 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 textual representation,

Re: Angular.js advanced tutorials?

2015-09-11 Thread Javier Guerra Giraldez
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 receiving emails from it, send an email to

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 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. -- Javier -- You received thi

Re: Serving uploaded files from multiple storages

2015-08-11 Thread Javier Guerra Giraldez
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 unsubscribe from this g

Re: Invalid syntax in url.py

2015-08-06 Thread Javier Guerra Giraldez
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-users+unsubscr

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 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. -- Javier -- You

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

2015-08-05 Thread Javier Guerra Giraldez
ut 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 as is. --

Re: same field in two classes

2015-08-03 Thread Javier Guerra Giraldez
On Sun, Aug 2, 2015 at 5:54 PM, Robin Lery 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. -- Javier -- You re

Re: DB Design question

2015-08-01 Thread Javier Guerra Giraldez
o will use a charField to store it and constantly encode-decode it. If you're using PosgreSQL, then yes, UUID is great; on MySQL, then it's far more efficient to use a BigInteger. 2^64 records still is far more than what you can store in the biggest storage you can get. -- Javier -- Y

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

2015-07-31 Thread Javier Guerra Giraldez
k.spool({'hello':'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 dja

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

2015-07-30 Thread Javier Guerra Giraldez
ay 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 -- You received this m

Re: Testing related models without saving

2015-07-16 Thread Javier Guerra Giraldez
ed 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 to django-users+uns

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 ywaghmare5203 : > >> Hello

Re: Django formset hidden id field

2015-07-04 Thread Javier Guerra Giraldez
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 unsubscribe from this group and s

Re: Help me develop a Job Tracker (?)

2015-07-03 Thread Javier Guerra Giraldez
7;s appropriate to have more than one task in process for a given project, or if it's valid to start a task before some of the previous tasks. usually it's also nice to add action methods to some models, maybe a project.start(user) that creates the first task and starts it, and a project.ne

Re: Help me develop a Job Tracker (?)

2015-07-02 Thread Javier Guerra Giraldez
trictions and 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"

Re: How To Activate Django Server.

2015-06-26 Thread Javier Guerra Giraldez
On Fri, Jun 26, 2015 at 4:56 PM, Steve Burrus 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 because you are subscribed to the

Re: help with e-library

2015-06-26 Thread Javier Guerra Giraldez
ons 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 to this group, send email to

Re: Help me develop a Job Tracker (?)

2015-06-26 Thread Javier Guerra Giraldez
[1]: https://en.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 mes

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

2015-06-14 Thread Javier Guerra Giraldez
ad 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 unsubscribe from this group and sto

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 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 because you are subscribed to the

Re: Logout user on tab closing

2015-05-19 Thread Javier Guerra Giraldez
27;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"

Re: Embeding HSQLDB in a standalone App

2015-05-19 Thread Javier Guerra Giraldez
ython... 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 "Django users&q

Re: Multiple databases

2015-05-18 Thread Javier Guerra Giraldez
es 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 group and stop receiving emai

Re: The best way to mock querysets

2015-05-01 Thread Javier Guerra Giraldez
uirement for 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

Re: Django runserver needs restart on psql data changes

2015-04-29 Thread Javier Guerra Giraldez
gt; 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 subscribed to the Google Grou

Re: Migrations During Development

2015-04-25 Thread Javier Guerra Giraldez
On Sat, Apr 25, 2015 at 12:28 PM, Timothy W. Cook wrote: > On Sat, Apr 25, 2015 at 2:15 PM, Javier Guerra Giraldez > wrote: >> 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

Re: Migrations During Development

2015-04-25 Thread Javier Guerra Giraldez
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? -- Javier -- You received this message

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

2015-04-25 Thread Javier Guerra Giraldez
ces 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 you are subscribe

Re: Strange error in django

2015-04-22 Thread Cristian Javier Martinez
se it never was assigned to.) > > 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'

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 th

Re: Model with two e-mail fields uniques

2015-04-08 Thread Javier Guerra Giraldez
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" group. To unsubscribe from this

Re: Model with two e-mail fields uniques

2015-04-07 Thread Javier Guerra Giraldez
eignKey(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 to django-users+unsubscr...@googlegro

Re: newbie question

2015-03-19 Thread Javier Guerra Giraldez
wer for a simple need. but i don't think you assumptions are correct, if you knew how Django (and frameworks in general) work, your question might be very different, and the answer much simpler and better in general. really, doing the tutorial is a very good investment of your time. -- Jav

Re: Future for Django, Jobs, Confused :/

2015-03-04 Thread Javier Guerra Giraldez
7;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 from it, send an email t

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

2015-02-24 Thread Javier Guerra Giraldez
t 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 Groups "Dja

Re: Using class based views.

2015-02-24 Thread Javier Guerra Giraldez
ide 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

Re: Restrict downloading files in Django?

2015-01-31 Thread Javier Guerra Giraldez
e, nginx, etc.) is far more efficient at this. so, the solution is to write a view that looks like it's serving the file (after checking for authorization), but instead of actually serving, delegates the job to the webserver. check X-Accel-Redirect (nginx) or X-Sendfile (apache) -- Javier --

Re: Model to create forms

2015-01-08 Thread Javier Guerra Giraldez
eign 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 they'll per

Re: Two Django projects with common models and business logic

2014-12-24 Thread Javier Guerra Giraldez
de 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 th

Re: Two Django projects with common models and business logic

2014-12-23 Thread Javier Guerra Giraldez
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 the Google Groups "D

Re: Raw access to cache table

2014-12-18 Thread Javier Guerra Giraldez
t 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 this group and stop

Re: Django and SSL

2014-12-10 Thread Javier Guerra Giraldez
e'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+unsubscr...@googlegroups.c

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

2014-11-17 Thread Javier Guerra Giraldez
t 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" group

Re: need precise advice before final decision on Django

2014-11-13 Thread Javier Guerra Giraldez
de 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 "Djang

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 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 to the Google Groups "D

Re: Django builds incorrect sql-query

2014-10-20 Thread Javier Guerra Giraldez
On Mon, Oct 20, 2014 at 3:43 AM, Алексей Широков 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 expand as parameters on a single f

Re: Django builds incorrect sql-query

2014-10-20 Thread Javier Guerra Giraldez
dent `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.djangoproject.com/en/

Re: Unable to store static

2014-10-16 Thread Javier Guerra Giraldez
On Thu, Oct 16, 2014 at 4:21 AM, Sachin Tiwari wrote: > > > > And added a below line in /settings.py, > > STATICFILES_DIRS = ( >os.path.join(PROJECT_PATH, "static"), >) I think you're repeating the 'static' subdirectory name. in th

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

2014-10-10 Thread Javier Guerra Giraldez
On Fri, Oct 10, 2014 at 6:21 PM, dk wrote: > I been fighting to the get the email and passing it if you want to keep a value from one request to another, check the Session feature. In short, it works (almost) like a persistent dictionary private for each web user. -- Javier -- You recei

Re: Config: DB or git?

2014-09-29 Thread Javier Guerra Giraldez
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 from i

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

2014-09-24 Thread Javier Guerra Giraldez
e it just because i don'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 t

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

2014-09-24 Thread Javier Guerra Giraldez
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+unsubscr...@googlegroups.com. To

Re: Javascript requests after user login

2014-09-09 Thread Javier Guerra Giraldez
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 "Djan

Re: Concern about FastCGI deprecation

2014-09-02 Thread Javier Guerra Giraldez
r, 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 -- You received this me

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

2014-08-13 Thread Javier Guerra Giraldez
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" group. To unsubscr

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

2014-08-03 Thread Javier Guerra Giraldez
On Sun, Aug 3, 2014 at 9:03 PM, Malik Rumi wrote: > Is this a Linux thing? on it's about the PATH variable. it's usually considered less safe to include '.' (the current directory) in PATH. Of course, that doesn't stop MS to put it right in the head of the defa

Re: django beginner

2014-07-07 Thread Javier Guerra Giraldez
On Mon, Jul 7, 2014 at 8:17 AM, ngangsia akumbo 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 are subscribed to the Google

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 > > I get the error, >

Re: Advanced SQL Question

2014-06-19 Thread Javier Guerra Giraldez
On Thu, Jun 19, 2014 at 4:49 PM, G Z 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. -- Javier -- Y

Re: Re: Django Python roop

2014-06-11 Thread Javier Guerra Giraldez
On Wed, Jun 11, 2014 at 8:12 AM, moqianc...@gmail.com wrote: > write right code, write clean code, It's a basic rule for our develope > work. for that you have to learn what the code means. "while x !=[]:" will always be an endless loop. the "[]" doesn&#

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

2014-06-10 Thread Javier Guerra Giraldez
[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 an email to dj

Re: problem with django, nginx and gunicorn

2014-05-01 Thread Javier Guerra Giraldez
html', {'taskid': 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

Re: Relationships exposed over RESTful interface

2014-04-11 Thread Javier Guerra Giraldez
n mode, set the logging config 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

Re: Remind the users when their accounts are expiring

2014-04-11 Thread Javier Guerra Giraldez
//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 emails from it, send

Re: Relationships exposed over RESTful interface

2014-04-11 Thread Javier Guerra Giraldez
he 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 received this message beca

Re: Relationships exposed over RESTful interface

2014-04-10 Thread Javier Guerra Giraldez
t_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 "Django users" gr

Re: Making functions callable

2014-03-26 Thread Javier Guerra Giraldez
f 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 -- You received this message b

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

2014-03-05 Thread Javier Guerra Giraldez
t the same behaviour by using composition rather than inheritance, > something like this: that sounds very similar to django's proxy models: https://docs.djangoproject.com/en/1.6/topics/db/models/#proxy-models but I agree that this kind of problems are typically better solved byt c

Re: big legacy database with complex many to many relationships

2014-02-24 Thread Javier Guerra Giraldez
s 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 emails f

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

2014-02-20 Thread Javier Guerra Giraldez
t; 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 because you are subscribed to the Go

  1   2   3   4   5   6   7   >