Loader Template without context (request), Use Case and Proposal

2016-06-06 Thread aRkadeFR
Hello all, I'd like to open a discussion on the Loader Template (django/template/loaders/app_directories.py) which is linked to the Template Engine (django/template/engine.py) about the context it has when determining the templates to load. ## Use Case In order to do multi-tenancy on our

Re: Django debug= false throwing 503 error

2015-12-28 Thread aRkadeFR
6d7c-438c-442d-a68b-3d31859b4708%40googlegroups.com <https://groups.google.com/d/msgid/django-users/a3a76d7c-438c-442d-a68b-3d31859b4708%40googlegroups.com?utm_medium=email_source=footer>. For more options, visit https://groups.google.com/d/optout. -- aRkadeFR -- You received this message be

Re: [Django1.8.5] About migrate

2015-11-17 Thread aRkadeFR
er>. For more options, visit https://groups.google.com/d/optout. -- aRkadeFR -- 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: Custom user model password is not hashed

2015-11-12 Thread aRkadeFR
4FPxK%3DtdU49mngQ%40mail.gmail.com?utm_medium=email_source=footer>. For more options, visit https://groups.google.com/d/optout. -- aRkadeFR -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and sto

New tool to build django deb package

2015-08-11 Thread aRkadeFR
Hey guys, I wanted to share with you a little project I did for myself first: https://github.com/aRkadeFR/dh-python-django It's a build system paired with debhelper. It helps you build .deb django package with systemd/nginx/uWSGI/virtualenv. It's not finished yet, and obviously I take

Re: best way to use django

2015-06-29 Thread aRkadeFR
? -- aRkadeFR -- 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 dj

Re: best way to use django

2015-06-29 Thread aRkadeFR
by public users logged into the site and the second a dating site. do I need to know djangular (as in is it to much for what I want to do?) or should I just use strieght django? please help -- aRkadeFR -- You received this message because you are subscribed to the Google Groups "Django

Re: Preferred way of adding social authorization to a Django / REST app?

2015-06-19 Thread aRkadeFR
jango-users/8637f6fa-7241-4866-9a52-311b36f5d8be%40googlegroups.com?utm_medium=email_source=footer>. For more options, visit https://groups.google.com/d/optout. -- aRkadeFR -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscr

Re: Shortcut for Date and Time is missing from the Django admin panel

2015-06-17 Thread aRkadeFR
4c6c-8f8e-11ea0477ae02%40googlegroups.com <https://groups.google.com/d/msgid/django-users/034ec2b2-5d0a-4c6c-8f8e-11ea0477ae02%40googlegroups.com?utm_medium=email_source=footer>. For more options, visit https://groups.google.com/d/optout. -- aRkadeFR -- You received this message because you are sub

Re: Squashed migration

2015-06-15 Thread aRkadeFR
at 9:54:09 AM UTC+1, aRkadeFR wrote: Thanks for the good explanation as always :) From the documentation plus the explanation of the problem, I wanted to know if by deleting the old migration it would still run the old migrations. Do we know the end of the story? Where it comes

Re: Squashed migration

2015-06-15 Thread aRkadeFR
wrote: On 06/12/2015 06:32 AM, aRkadeFR wrote: You need to delete your old migrations so it uses only the squashed one after. No, the squashed migration should be used in place of the old ones for any new database, even if the old ones are still present. This is the point of the squashmigrations

Re: Squashed migration

2015-06-12 Thread aRkadeFR
scussion on the web visit https://groups.google.com/d/msgid/django-users/9288958d-0214-4cd2-9b51-dd173a8e83ae%40googlegroups.com <https://groups.google.com/d/msgid/django-users/9288958d-0214-4cd2-9b51-dd173a8e83ae%40googlegroups.com?utm_medium=email_source=footer>. For more options, visit https://groups.goog

Re: Why the extra minute in PostgreSQL when using time zone info?

2015-05-29 Thread aRkadeFR
, Carl Meyer wrote: Hi aRkadeFR, On 05/29/2015 02:09 AM, aRkadeFR wrote: Indeed, the problem comes from the representation on PG, cause I have only good results (0/30 for the minutes) from the python function. [snip] The OP already found and posted the solution (see below) and it is not related

Re: Why the extra minute in PostgreSQL when using time zone info?

2015-05-29 Thread aRkadeFR
SSqzkiOMyGysGzxk%3DyhP2OD23toS1FOb43%3D%3D3Dg%40mail.gmail.com <https://groups.google.com/d/msgid/django-users/CAFWa6tJp2CLSSqzkiOMyGysGzxk%3DyhP2OD23toS1FOb43%3D%3D3Dg%40mail.gmail.com?utm_medium=email_source=footer>. For more options, visit https://groups.google.com/d/optout. -- aRkadeFR -

Re: datepicker

2015-05-27 Thread aRkadeFR
groups.google.com/d/msgid/django-users/CAPCf-y735T-8%3DNVdePFU7UEmN_9SQmsLj9uWUeCQ%2B-dRUMNYjQ%40mail.gmail.com?utm_medium=email_source=footer>. For more options, visit https://groups.google.com/d/optout. -- aRkadeFR -- You received this message because you are subscribed to the Google

Re: how to do a django data migration on a massive Postgres data table (solved)

2015-05-26 Thread aRkadeFR
edium=email_source=footer>. For more options, visit https://groups.google.com/d/optout. -- aRkadeFR -- 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, s

Re: How to get selects option value !!

2015-05-19 Thread aRkadeFR
groups.google.com/d/msgid/django-users/c341c1e2-6aab-4479-8f51-8f021775133b%40googlegroups.com <https://groups.google.com/d/msgid/django-users/c341c1e2-6aab-4479-8f51-8f021775133b%40googlegroups.com?utm_medium=email_source=footer>. For more options, visit https://groups.google.com/d/optout.

Re: possible bug - CharField accepts string as max_length

2015-05-18 Thread aRkadeFR
s://groups.google.com/d/msgid/django-users/7f920d86-1657-4922-a6a6-603ab0f846a3%40googlegroups.com <https://groups.google.com/d/msgid/django-users/7f920d86-1657-4922-a6a6-603ab0f846a3%40googlegroups.com?utm_medium=email_source=footer>. For more options, visit https://groups.google.com/d/op

Re: Possible bug in QuerySet API when chaining filter() and update() methods?

2015-05-18 Thread aRkadeFR
.google.com/d/msgid/django-users/10d0d83b-733a-47d2-b5d1-6f9c904269a6%40googlegroups.com <https://groups.google.com/d/msgid/django-users/10d0d83b-733a-47d2-b5d1-6f9c904269a6%40googlegroups.com?utm_medium=email_source=footer>. For more options, visit https://groups.google.com/d/optout. -- aRka

Re: Django Limitation

2015-05-11 Thread aRkadeFR
groups.google.com/d/msgid/django-users/CAGnF%2BrAZ7eeueOSbh7x33ARQEgTpCR156t4xpFyrco2SGgzMjQ%40mail.gmail.com?utm_medium=email_source=footer>. For more options, visit https://groups.google.com/d/optout. -- aRkadeFR -- You received this message because you are subscribed to the Google

Re: Admin site in Django 1.8 tutorial giving CSRF errors

2015-05-11 Thread aRkadeFR
the tutorial instructions. I am totally stumped. David On Thu, May 7, 2015 at 3:04 AM, aRkadeFR <cont...@arkade.info> wrote: Hey, You shouldn't see these errors since the templates with the form and so the CSRF token are generated from the contrib app admin. Could you provide us more details of the

Re: Admin site in Django 1.8 tutorial giving CSRF errors

2015-05-07 Thread aRkadeFR
Hey, You shouldn't see these errors since the templates with the form and so the CSRF token are generated from the contrib app admin. Could you provide us more details of the error? Did you override the admin templates? Thanks, aRkadeFR On 05/06/2015 10:03 PM, David Riddle wrote: Hi, I am

Re: How to find a view in a complex web application

2015-04-28 Thread aRkadeFR
I dont quite get your request. Where is your starting point to search the user view? When you say "a user wants to use", where does it come from? A template view? A view_name maybe? A URL? On 04/28/2015 11:27 AM, guettli wrote: We have a complex intranet application. It has many view. The

Re: Slowness of the resulting squashed migration

2015-04-27 Thread aRkadeFR
ker [2] so we can include a possible improvement in future Django versions. /Markus [1] Have a look at slide 14f of https://speakerdeck.com/andrewgodwin/migrations-under-the-hood [2] https://code.djangoproject.com/ On Friday, April 24, 2015 at 8:14:34 PM UTC+2, aRkadeFR wrote: He

Slowness of the resulting squashed migration

2015-04-24 Thread aRkadeFR
? Is there a reason the squashmigrations didn't refactor into only CreateModel without AddField then? Thanks aRkadeFR -- 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: upgrading from Django 1.6 and south to Django 1.8

2015-04-22 Thread aRkadeFR
Hey there, maybe you found some answers in my other post: "django contrib auth last_login cannot be "null"" Did you run makemigrations ? For the upgrade, I suggest to you to do it minor version to minor version. On 04/20/2015 09:04 PM, Scott Hostovich wrote: I'm upgrading from Django 1.6

Re: django contrib auth last_login cannot be "null"

2015-04-22 Thread aRkadeFR
t; section -- if this makes sense: If you are using a custom user model, you'll need to run :djadmin:`makemigrations` and generate a migration for your app. On Tuesday, April 21, 2015 at 12:27:57 PM UTC-4, aRkadeFR wrote: Hello, I'm upgrading my systems to Django 1.8 and I'm facing

django contrib auth last_login cannot be "null"

2015-04-21 Thread aRkadeFR
Hello, I'm upgrading my systems to Django 1.8 and I'm facing this error: (1048, "Column 'last_login' cannot be null") so I describe my table in DB: +-+--+--+-+-++ | Field | Type | Null | Key | Default

Re: Django admin page display unnormal

2015-04-13 Thread aRkadeFR
Your static files are not served properly. Please, run the collectstatic command and see if the admin static files are copied. Check in your browser that the files media are served then. aRkadeFR On 04/13/2015 05:04 AM, zli wrote: It is my admin add user page <https://

Re: Saving Contionus Data through Django

2015-04-02 Thread aRkadeFR
Not sure Django is the best solution to your problem. As Ilya said, you should buffer it. Then you can work with your buffered data. You said one entry every minute, so the "buffer" can just send this entry every minute to a Django project? On 04/02/2015 04:34 PM, Ilya Kazakevich wrote: You

Re: subprocess behave diferent in the server than in the client.

2015-03-31 Thread aRkadeFR
What is your production stack (nginx/uwsgi/permissions folder etc. etc.)? Do you have any logger / stack trace to debug it? Thanks On 03/31/2015 05:12 PM, dk wrote: playing a littlie bit more, I found out that does work if I am using the manage.py runserver. but doesn't work using the

Re: Hidden fields in formsets

2015-03-31 Thread aRkadeFR
Hello, I read very quickly, but you sure you want to *render* and get the value of "user_create" from the client? It can be modified by any client... aRkadeFR On 03/31/2015 10:45 AM, François GUÉRIN wrote: Hi, I'm using multiple formsets in Create / Update views, and I want to

Re: authenticate() not working

2015-03-30 Thread aRkadeFR
Hello, Just by changing the type of your input, you're enable to authenticate inside your view then? Do a dump of your post data to see if anything has changed. ``` print("data: {!s}".format(request.POST)) ``` Then you can see in a shell (manage.py shell) if the authenticate function works as

Re: Textarea taking htnml tags

2015-03-27 Thread aRkadeFR
Hey, He doubled post. A thread already exists about this called: "textarea showing image instead of code" On 03/27/2015 03:54 PM, Filipe Ximenes wrote: Can you send us the code of the view and the template of this form? On Fri, Mar 27, 2015 at 3:27 AM,

Re: textarea showing image instead of code

2015-03-27 Thread aRkadeFR
client_id = db.StringProperty(verbose_name = "Client ID", default="") def __unicode__(self): return self.note_title I want to show only code but instead of that it is showing image in descrption field. and the code contains image url. On Fri, Mar 27, 2015 at 2

Re: When I mark to delete the formset, django requires complete all fields, he does not ignore the marked form to delete.

2015-03-27 Thread aRkadeFR
Thanks for the code paste. You mean in your views, the formset.is_valid() returns False and so does not delete your form tagged to delete? I don't quite understand where exactly is the problem? On 03/27/2015 12:17 AM, Neto wrote: When I mark to delete the formset, django requires complete all

Re: textarea showing image instead of code

2015-03-27 Thread aRkadeFR
Hello, You could provide us more information when asking for help please. Your template and view code at least. I guess your problem is in your HTML but to be sure, please dump your information at the POST request to see what is send. Then review your template. Maybe there's a "name" attribute

Re: Global access to request.user

2015-03-27 Thread aRkadeFR
I agree with Anderson, this is one solution, even though I don't know if it's a good way. For example a middleware is used to add the user to the request. You could do the same with the request to a singleton instance and get it back then from your form, view etc.? But be aware that some

Re: Accessing django app from another app with ajax

2015-03-26 Thread aRkadeFR
No problem we agree that having a stacktrace would be a better way to debug it. Even on a 400 :) On 03/26/2015 03:48 PM, Filipe Ximenes wrote: My mistake. On Thu, Mar 26, 2015 at 11:42 AM, aRkadeFR <cont...@arkade.info <mailto:cont...@arkade.info>> wrote: But from the

Re: Accessing django app from another app with ajax

2015-03-26 Thread aRkadeFR
. On Thu, Mar 26, 2015 at 11:26 AM, Larry Martell <larry.mart...@gmail.com <mailto:larry.mart...@gmail.com>> wrote: On Thu, Mar 26, 2015 at 10:20 AM, aRkadeFR <cont...@arkade.info <mailto:cont...@arkade.info>> wrote: > You should setup your project

Re: Accessing django app from another app with ajax

2015-03-26 Thread aRkadeFR
You should setup your project so you're able to retrieve the stacktrace on a 500 server error. On 03/26/2015 12:25 PM, Larry Martell wrote: On Thu, Mar 26, 2015 at 7:22 AM, aRkadeFR <cont...@arkade.info> wrote: Do you have the stacktrace? Without it it's gonna be hard to help you. M

Re: Accessing django app from another app with ajax

2015-03-26 Thread aRkadeFR
Do you have the stacktrace? Without it it's gonna be hard to help you. My only guess is CORS (Cross-Origin Resource Sharing)? But you should have the same error on local dev if you have similar setup from your production. On 03/26/2015 02:04 AM, Larry Martell wrote: I have a webservice written

Re: Django Integrate custom apps with each other

2015-03-26 Thread aRkadeFR
omment app. For more information, please check out the "comments" app in django.contrib :) Thanks aRkadeFR On 03/26/2015 11:37 AM, Eduardo Pascoal wrote: Hi everyone, I am a Django newbie and I'm facing the problem related with binding applications. My intention is to make a new fun

Re: Re-run only tests that failed last time

2015-03-25 Thread aRkadeFR
Great tool, thanks :) On 03/24/2015 11:22 PM, Russell Keith-Magee wrote: Hi Gergely, One option is to use a test suite GUI tool, like cricket: http://pybee.org/cricket Cricket lets you view your entire test suite as a tree, select subsets of the suite to run, see test results as the suite

Re: image handling

2015-03-24 Thread aRkadeFR
When do you want to delete the old image? On 03/24/2015 10:59 AM, akash.pa...@ranosys.com wrote: Hi , I want to delete the old image. On Tuesday, March 24, 2015 at 2:40:35 PM UTC+5:30, akash...@ranosys.com wrote: hi.. Can anyone please tell me how to handle old image after uploading

Re: Why I don't access the {{ user }} variable in template?

2015-03-23 Thread aRkadeFR
Do you have 'django.contrib.auth.context_processors.auth' in your context template processor? {{ user_first_name }} won't work anyway cause the variable set by the context_processor auth is user. To access a key or an attribute of a variable, the syntax is: {{ user.first_name }} documentation

Re: what do you think about django FORM system?

2015-03-06 Thread aRkadeFR
. I'd also like to use size but so far I haven't determined how. I did get the validation working. Johnf On 03/06/2015 02:43 AM, aRkadeFR wrote: Hello It's pretty easy to use django forms after reading the docs. And django form are well integrated with the whole django framework. You have

Re: Gunicorn sock file is missing?

2015-03-06 Thread aRkadeFR
On 03/06/2015 01:30 PM, Kaloian wrote: Hi Erik, and thanks for the help. Well it appears to be a permission issue after all, but I really cannot understand why. I tried to change the directory for the sock file from /webapps/my-app/run/gunicorn.sock to /sockets/gunicorn.sock and gunicorn

Re: what do you think about django FORM system?

2015-03-06 Thread aRkadeFR
Hello It's pretty easy to use django forms after reading the docs. And django form are well integrated with the whole django framework. You have multiple layers of cleaning the form, from the widget to the model, and I love that. Could you provide us more in-deapth of your feeling using the

Re: Data migration using RunPython

2015-03-05 Thread aRkadeFR
2/howto/unicode.html [3] https://docs.djangoproject.com/en/1.7/topics/db/queries/ On 5 Mar 2015, at 19:34, aRkadeFR <cont...@arkade.info> wrote: Hello, In Django, you can instanciate objects from your model without persist it to the database. The way you do it is Country(name=..., ...).

Re: Data migration using RunPython

2015-03-05 Thread aRkadeFR
Hello, In Django, you can instanciate objects from your model without persist it to the database. The way you do it is Country(name=..., ...). In order to create multiple objects at once, you can call the bulk_create method on the manager with a list of object to persist. The using(db_alias)

Re: icons let the template or resolve in the view?

2015-03-04 Thread aRkadeFR
If I get your request right, you want to display icons on each row of your table. In my projects, I'm using a font face. It's easy to use, scalable, and you don't need any {% static %} templatetags in your templates. Personnaly using icomoon to manage my icons. https://icomoon.io/app/ Then you

Re: Can the new `Prefetch` solve my problem?

2015-03-03 Thread aRkadeFR
Thanks a lot for your answer :) I will definitely use it from now on. On 03/03/2015 06:59 AM, Simon Charette wrote: Hi cool-RR, The following should do: filtered_chairs = Chair.objects.filter(some_other_lookup=whatever) desks = Desk.objects.prefetch_related( PrefetchRelated('chairs',

Re: Populating Django app db with JSON data

2015-03-02 Thread aRkadeFR
that mean exactly? It seems related to the apps and schema_editor arguments passed to the custom method that will be called by RunPython - is this something like a snapshot of the app model that is stored when I do `python manage.py migrate`? Sandeep On 2 Mar 2015, at 19:37, aRkadeFR <c

Re: Populating Django app db with JSON data

2015-03-02 Thread aRkadeFR
Hello, Indeed, the data migration is the best way. Check out the documentation here: https://docs.djangoproject.com/en/1.7/ref/migration-operations/#django.db.migrations.operations.RunPython You write your function that will be called by the RunPython and will load your JSON. Migration are

Re: Can the new `Prefetch` solve my problem?

2015-02-27 Thread aRkadeFR
have in mind is to prefetched all the objects (chairs), and then filter it in python with properties like I said. But as you said it will load too much objects... Still watching the thread cause I have couple of problems like this one :) aRkadeFR On 02/26/2015 08:27 PM, James Schneider wrote: Heh

Re: Can the new `Prefetch` solve my problem?

2015-02-26 Thread aRkadeFR
to the queryset I specified in a single call, I don't want to filter them in Python or make a new call to filter them. Thanks, Ram. On Thu, Feb 26, 2015 at 1:48 PM, aRkadeFR <cont...@arkade.info <mailto:cont...@arkade.info>> wrote: I may not have completely understand

Re: Can the new `Prefetch` solve my problem?

2015-02-26 Thread aRkadeFR
I may not have completely understand your problem, but why not prefetching all the chairs? and then with the (new) attribute favorite_or_nearby_chairs loading only the favorite or nearby one? like: @property def favorite_or_nearby_chairs(self): for chair in self.chair_set.all():

Re: django deployment in a virtual machine.

2015-02-25 Thread aRkadeFR
Hello there, It's always good to take a look at how prodding a django website. As George Silva said, you need nginx/apache or other. They will serve your media and static files. Then for the django server, you need to run it in uWSGI or another wsgi, and link it to your nginx/apache.

Re: modelFormSet and csrf

2015-02-24 Thread aRkadeFR
something. else: formset = SchoolFormSet() return render_to_response("testformset.html", { "formset": formset, }) tiistai 24. helmikuuta 2015 10.31.13 UTC+2 aRkadeFR kirjoitti: Hello :) The template indeed doesn't show the submit button in the

Re: modelFormSet and csrf

2015-02-24 Thread aRkadeFR
Hello :) The template indeed doesn't show the submit button in the documentation here: https://docs.djangoproject.com/en/1.7/topics/forms/formsets/#using-a-formset-in-views-and-templates In order to add the csrf token, you can use the template tag {% csrf %} inside the form tag. And add the

Re: Handling FormSet client side with javascript

2015-02-20 Thread aRkadeFR
know =D). Thanks On 02/19/2015 07:28 PM, Collin Anderson wrote: Hi, Sorry for the late reply. Does simply using {{ formset.media }} work? Collin On Friday, February 13, 2015 at 11:02:31 AM UTC-5, aRkadeFR wrote: Hello everyone, I'm using FormSet in order to add multiple object at once

Re: Struggling with formsets

2015-02-19 Thread aRkadeFR
Hello, Can we have the template? Did you rendered the hidden fields id of your forms ? Dump (by printing) the request.POST informations to see if you received any "id" :) On 02/19/2015 04:25 PM, Werner Brand wrote: I cannot seem to figure this, although I suspects it is really elementary:

Re: how to handle race conditions?

2015-02-19 Thread aRkadeFR
On 02/19/2015 01:04 AM, Mario Gudelj wrote: Great reply. You're a champion, Carl! Couldn't say more. Very thorough answer and interesting :) On 19 February 2015 at 05:31, Carl Meyer > wrote: Hi Abraham, On 02/17/2015 10:01 PM, Abraham

Re: ImportError

2015-02-18 Thread aRkadeFR
On 02/18/2015 07:17 AM, Petar Pilipovic wrote: aRkadeFR I have one other question regarding urls.py. I got this error when I am trying to go from contact or about to home page. Using the URLconf defined in |tryDjango.urls|, Django tried these URL patterns, in this order: 1. ^$ [name

Re: how to handle race conditions?

2015-02-18 Thread aRkadeFR
Hello, My opinion on the problem: A database is ACID, so there will be no problem if every information are stored in the database. There should be a "available_quantity" property on a item. This will allow you to have more control of the stock too. If a customer put an item in his basket this

Re: Installare versioni successive

2015-02-17 Thread aRkadeFR
Hello there, I think this is an English mailing list. From google translate, I understood you want to upgrade Django 1.6 to 1.7. Please read the following releases notes: https://docs.djangoproject.com/en/1.7/releases/1.7/ more specifically:

Re: ImportError

2015-02-17 Thread aRkadeFR
in mine root project, one off them is contact. > I will send you more info as soon as posible. > Tank you. > > > On Tuesday, February 17, 2015, aRkadeFR <cont...@arkade.info <mailto:cont...@arkade.info>> wrote: >> Hello :) >> >> Can you dump us

Re: ImportError

2015-02-17 Thread aRkadeFR
Hello :) Can you dump us the layout of your files? Where is your forms.py? Thanks On 02/17/2015 06:36 AM, Petar Pilipovic wrote: Hello all, I am trying to build and e_commerc django app, but I have encounter an confusing error. Mine Error is: | Environment: Request Method: GET Request URL:

Re: Django Inline formset with jquery

2015-02-17 Thread aRkadeFR
Hello, I got the same kind of probleme while working on the formset couple days ago. If this is related, the problem is the auto complete javascript that doesn't go well with the jquery.formset.js. You can add a function "added" in parameter of the formset function for reloading the

Handling FormSet client side with javascript

2015-02-13 Thread aRkadeFR
Hello everyone, I'm using FormSet in order to add multiple object at once on a view. To have a more user friendly approach, I created a 'my.formset.js' file and I need to include a 'jquery.formset.js' lib to add/remove row of the formset (client side) and edit the formset management information.

Re: Template Spaces and tabs

2015-02-13 Thread aRkadeFR
to be concise: try using a tag in your HTML ;) {% for line in lines %} {{ line }} {% endfor %} On 02/12/2015 09:32 PM, Tom Evans wrote: On Thu, Feb 12, 2015 at 8:25 PM, Ulisses Cruz wrote: Hello This may seem trivial but can you help? I'm reading a file line by

Re: Optimizing has_perm query time on PERMISSION AND GROUP PERMISSION

2014-12-19 Thread aRkadeFR
Hey mohd, How do you know the CPU burnt come from the method has_perm? Did you dump the query and play it again? It's most likely to be something else FMPOV. The has_perm is just a simple query in DB... aRkadeFR On 12/18/2014 05:27 PM, mohd irshad wrote: Hello , I am constantly facing face

Re: Database queries location

2014-12-19 Thread aRkadeFR
) - forms.py: All logic as forms data / processing / validation for request data Have a good one, aRkadeFR On 12/18/2014 10:12 PM, pythonista wrote: I understand that functions can be placed in the models fille However if I have complex queries that receive post input does the Query live

Re: Select a single field from database (postgresql)

2014-12-19 Thread aRkadeFR
://docs.djangoproject.com/en/1.7/topics/db/queries/ Have a good one, aRkadeFR On 12/19/2014 12:51 PM, Cássio Van Helden Gameiro wrote: Hi, i have a database with many cars, and i want to select the last car based the hour that it was registered, can someone help me? Thanks. -- You received this message

Re: Does Django offers a way to generate data grid from database table like web2py

2014-11-28 Thread aRkadeFR
Hello, From my point of view, you're asking for a similar MySQL admin with bootstrap style? Why not directly get a DB admin like pgadmin or so? The most similar thing will be the django admin as Timothy stated. Thank you, aRkadeFR On 11/28/2014 05:55 AM, Sarbjit singh wrote: What web2py GRID

Re: i want to know how to use SlugField with slugify to generate url for detail_blog page without using get_absolute_url

2014-11-28 Thread aRkadeFR
Hello Kanchan, Sorry to say, I didn't get your question. I don't see any get_absolute_url in your email. And your code seems legit. Could you provide more information about the problem? Thank you, aRkadeFR On 11/27/2014 10:26 PM, Kanchan Prasad wrote: my model.py is class BlogPost

Re: Best way to use a 'all' QuerySet as a dict with id first

2014-09-28 Thread aRkadeFR
Thanks for the answer, I just wondered if there was a built-in solution in Django. On 27/09/14 06:01, tkdchen wrote: > > > On Saturday, September 27, 2014 9:06:58 PM UTC+8, aRkadeFR wrote: > > > > @James Brewer: > > If I change my code, I can have this user_ids

Re: Best way to use a 'all' QuerySet as a dict with id first

2014-09-27 Thread aRkadeFR
some list `user_ids`. > > Does that help? > > Happy hacking! > > James > > On Fri, Sep 26, 2014 at 11:43 AM, Alejandro Varas G. <alej0va...@gmail.com> > wrote: > > > Hi, > > > > You should use User.objects.get(id=X) > > > &

Best way to use a 'all' QuerySet as a dict with id first

2014-09-26 Thread aRkadeFR
Hey! I'm having a hard time trying to reduce the number of SQL queries on a view. Basically, I'm fetching all my User, with User.objects.all(), and save this queryset as AllUser. Then every time I need to get the user with the id = X , I'm calling a function 'get_user_from_id', that iterate

Re: How to call a function when a project starts.

2014-07-30 Thread aRkadeFR
Which version of Django are you running? On 30/07/14 15:46, Chen Xu wrote: > Hi Everyone: > I would like to call a function when my project starts, basically I want to > call a do_something() when I run python manage.py runserver. However, when > I put it into settings.py, it gets called twice,

Re: running script in django database

2014-07-30 Thread aRkadeFR
Agree with Jirka, I'm just adding the link: https://docs.djangoproject.com/en/1.6/howto/custom-management-commands/ On 30/07/14 07:53, jirka.vejra...@gmail.com wrote: > > Hi Mohammad, > > this can be easily achieved using a custom management command - check the > Django documentation. > >

Re: Django 1.7 - What are you most excited about?

2014-07-30 Thread aRkadeFR
Definitely the schema migration :) I enjoy lots the App Loading and the Check framework too. On 29/07/14 18:12, Ryan Blunden wrote: > Hi everyone, > > I'm giving a lightening talk at the San Francisco Django meetup tomorrow > night about some of the awesome new features in Django 1.7. > > I

Re: simultaneously submit three forms on the same page

2014-07-30 Thread aRkadeFR
Excellent. Thanks for the share. How backward compatible is it? On 29/07/14 17:51, Santiago Lamora wrote: > 2014-07-29 16:50 GMT+02:00 John : > > > How can one submit 3 forms simultaneously?? Even ajax, is on by one! > > > > > Quotting >

Re: django Page

2014-07-24 Thread aRkadeFR
If it's only static pages, you could look first django.contrib.flatpages to see how to do it. On 23/07/14 00:05, ngangsia akumbo wrote: > I want to create an app where the user has the ability to create new pages > on their website > > the app should be called pages > > can someone give me an

Re: Django 1.7c1 app without models data migrations

2014-07-17 Thread aRkadeFR
> > Cheers, > Jeremy > > > > On Tuesday, 15 July 2014 22:20:57 UTC+8, aRkadeFR wrote: > > > > Hello everyone, > > > > First post on this mailing list. Big thanks to the community and the core > > dev > > of Django! > > > >

Django 1.7c1 app without models data migrations

2014-07-15 Thread aRkadeFR
rated? Create an empty initial migrations? so the django migrations take this app into account. Thank you for all your help aRkadeFR -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving