Re: Define Django Base Model Class

2016-12-28 Thread Avraham Serour
You could monkeypatch django to accomplish this, but I would advise against it. Instead of having implicit or hidden behaviour you should instruct your developers to use from myproject import models instead of from django.db import models On Wed, Dec 28, 2016 at 7:13 PM, Guilherme Leal wrote:

Re: Just added Python, Django and MySQL integration template for easier data visualization with AnyChart JS

2016-12-29 Thread Avraham Serour
I have no idea what anychartjs does, in any case I don't understand why a js lib would need django integration. Also it seems they have no idea what they are doing, the guthub repo linked has .pyc files commited, anyone needing to use don't copy paste code from there and take it with a kilo of sal

Re: can anyone tell django deployment process with apache, mod_wsgi using aws ec2 hosting requirements

2017-01-03 Thread Avraham Serour
https://www.digitalocean.com/community/tutorials/how-to-serve-django-applications-with-uwsgi-and-nginx-on-ubuntu-16-04 On Tue, Jan 3, 2017 at 1:58 PM, chowdam1992 wrote: > So i can thankfull. > > -- > You received this message because you are subscribed to the Google Groups > "Django users" grou

Re: DateField default value in SQLite and Postgres

2017-01-03 Thread Avraham Serour
please post your migration file and the error On Tue, Jan 3, 2017 at 12:00 PM, wrote: > I recently set a default value in my local date format on a DateTimeField > while I was using SQLite. The migration ran fine on my SQLite dev database, > but when trying to apply the migration on my productio

Re: DateField default value in SQLite and Postgres

2017-01-04 Thread Avraham Serour
gt; django/db/models/fields/__init__.py", line 1275, in get_prep_value > return self.to_python(value) > File "/webapps/mzg/venv/lib/python3.5/site-packages/ > django/db/models/fields/__init__.py", line 1250, in to_python > params={'value': value}, > dja

Re: DateField default value in SQLite and Postgres

2017-01-04 Thread Avraham Serour
ions engine should always force a datetime object (or at least a > -MM-DD notation) to make it work consistently on all backends. > > > On Wednesday, January 4, 2017 at 11:35:38 AM UTC+1, Avraham Serour wrote: >> >> DateField is a representation of datetime.date, so you sho

Re: DateField default value in SQLite and Postgres

2017-01-04 Thread Avraham Serour
why this seems like a bug to me. > > > On Wednesday, January 4, 2017 at 1:02:07 PM UTC+1, Avraham Serour wrote: >> >> Well this is the reality right now, if you think the framework is acting >> wrong you may file a bug report. >> >> In my opinion the wrong side of

Re: request.read() is empty in POST

2017-01-04 Thread Avraham Serour
That's an incredibly childish response and I hope future people trying to learn python or django don't give up upon a roadblock, any future people reading this don't ever feel that you are helpless, the community has many resources to help including this mailing list. Sometimes it is difficult to

Re: DateField default value in SQLite and Postgres

2017-01-04 Thread Avraham Serour
SQLite locally for development and Postgres in production. So when > my migration runs fine locally I expect it to also work fine when I upload > it 5 minutes later and try to apply it to my Postgres database. > > > On Wednesday, January 4, 2017 at 3:59:52 PM UTC+1, Avraham Serour wrote: &g

Re: request.read() is empty in POST

2017-01-04 Thread Avraham Serour
> > So, if you're feeling bad with it, sorry, but I have to give value to my > clients, not lose my time with children complaining because I gave up with > a product that can't attend me. > > Wont you point a solution instead of being a crying baby? > > > Em quar

Re: good pratices to write many lines on database

2017-01-04 Thread Avraham Serour
can you elaborate on this scenario? how and why can your database shutdown? I second the suggestion about returning error and telling the client to try later, but it should be >=500 not 400. 4xx Are for client errors, 5xx are for server errors. see http://www.restapitutorial.com/httpstatuscodes.ht

Re: Dynamic Models

2017-01-05 Thread Avraham Serour
I guess you could play with metaclasses and generate the class definition on runtime using information from the database But why? You can save the model definition on files, why saving them to database and complicate your life? On Wed, Jan 4, 2017 at 10:38 PM, Guilherme Leal wrote: > Is there a

Re: Dynamic Models

2017-01-05 Thread Avraham Serour
2017 17:33:07 UTC+2, Guilherme Leal wrote: >>> >>> My idea was to build an user interface for the model definition, so the >>> developer (or in this case, the user) could define the model using a >>> register form. >>> >>> Like a user interface

Re: Migration issue on Webfaction

2017-01-05 Thread Avraham Serour
> which to my understanding is saying that migration 0033 is looking for content within migration 0032, which it can't find. yes, check that you committed the file, I've had this kind of error too many times just because after creating the migration I forgot to git add If you removed your migrati

Re: Access Celery's subprocess in my Django app

2017-01-14 Thread Avraham Serour
Hi, In my opinion the celery task should just write to the DB the relevant data, no need to pass around and reprocess just to write the relevant data from the result, the celery task can just import the django model and save directly to the DB. Usually you don't need to set the CELERY_RESULT_BACK

Re: Django channels, running uwsgi and awsgi

2017-01-19 Thread Avraham Serour
I think you can do conditionals on your server block and proxy pass to the correct upstream depending on your logic On Thu, Jan 19, 2017 at 2:18 PM, Dev App wrote: > There's not individual documentation for every situation because people's >> choice of webserver and their OS versions and envir

Re: Using {% include %} and getting context with me

2019-02-13 Thread Avraham Serour
Maybe you can solve this using a templatetag? On Wed, 13 Feb 2019, 16:47 Mikkel Kromann Hi. > > I have a collection of apps where I find repeating myself when rendering > tables in the templates. > In the stylised example below I have three types of tables, foo, bar and > baz. > Each app is suppo

Re: Best option for wrapping a wsgi app

2019-02-20 Thread Avraham Serour
I recommend nginx+uwsgi On Tue, Feb 19, 2019 at 3:09 PM Anton Melser wrote: > Hi, > > I searched high and low but my Google-foo must be lacking. I want to wrap > a wsgi app (https://github.com/tsudoko/anki-sync-server) and serve it > under my Django site. After wasting large amounts of time wor

Re: django cms beginner app issue

2019-03-26 Thread Avraham Serour
you model doesn't have app_config On Tue, Mar 26, 2019 at 1:07 AM Keegen Knapp wrote: > I'm trying to write a custom app where you can add new plants in the > admin. Then create a list view, category view and detailed view. You can > see my error and code below. Any help is greatly appreciated!!

Re: Django channels on IIS

2017-01-26 Thread Avraham Serour
if you are stuck on windows but not necessarily IIS you may try cygwin, I once had to deploy on windows and after investigating some possibilities I just installed cygwin and put nginx with uwsgi. On Thu, Jan 26, 2017 at 9:55 AM, Алексей Кузуб wrote: > Thank you for your answers and advices. I h

Re: Wiring django-channels to html without javascript?

2017-01-29 Thread Avraham Serour
Yes, the client application connecting to the websocket server can be an user using an interactive console, a python application or any other software in any language. But if your objective is to have a webpage then no, unfortunately web browsers can only run javascript, if you really dislike java

Re: Web-based Voting System for our capstone project

2017-02-01 Thread Avraham Serour
I recommend instead of tweaking the admin app to just making your own dashboard template. You can start learning django by doing the official tutorial at djangoproject.com On Tue, Jan 31, 2017 at 2:44 PM, Genaro Lubong wrote: > I just want to ask, how can I customize my admin page and make some

Re: Channels - slow with limited number of connections

2017-03-05 Thread Avraham Serour
I don't think you need 500 workers, the number of workers depends on how long will message will take to be processed not the number of concurrent connections. The worker job is to get a message and send to a bunch of clients, the ASGI server, meaning the process actually holding the websocket, in

Re: Updating files without web server restart

2017-03-13 Thread Avraham Serour
you may use uwsgi and tell uwsgi to gracefully reload, it won't even close any eventual tcp sockets, they will wait until the new code is loaded, users will never now you reloaded the application On Mon, Mar 13, 2017 at 3:25 PM, Thiago Parolin wrote: > We have a small webserver that is used by m

Re: Testing a Django library

2017-03-21 Thread Avraham Serour
What are the different approaches you found? I created a simple minimal project inside the tests folder On Mar 21, 2017 9:59 PM, "bobhaugen" wrote: > Very interesting topic. We will be facing the same problem soon, and will > hope to learn from your experience. Got a code repository yet? > We'

Re: , received 404

2017-03-23 Thread Avraham Serour
Do you really have to use Apache for any reason? If not I recommend using nginx+ uwsgi to deploy django, the killer feature that convinced me to leave Apache was the simpler config file nginx have. There are plenty of tutorials on how to deploy django like this, if you don't find anything suitabl

Re: Is it possible to write generic module?

2017-03-27 Thread Avraham Serour
yes, table name can a parameter to your function what do you mean by "import this table"? On Mon, Mar 27, 2017 at 3:41 PM, Det S. Pillner wrote: > Hi all, > > I work on tools for my job based on Django 1.8.17. In different projects > (with different databases) I use same routine to get some dat

Re: Login/Logout, single instance only

2017-04-03 Thread Avraham Serour
You could probably have a custom session management to only have one session per user, when a user log in you can invalidate all the other user sessions On Mon, Apr 3, 2017 at 11:30 AM, miguel vfx wrote: > Good day! I was wondering if there's a way to limit a user account to be > logged-in in ju

Re: How to get a mentor

2017-04-04 Thread Avraham Serour
Hi, I suggest going to local meetups, you may meet people that could mentor or help you on specific issues, or help you to find a mentor, they could either know someone or know of local mentorship programs. Where are you located? On Tue, Apr 4, 2017 at 4:26 PM, Joe Landrigan wrote: > I need a

Re: Alternative to celery

2017-04-20 Thread Avraham Serour
try googling 'python task queue' see https://www.fullstackpython.com/task-queues.html On Thu, Apr 20, 2017 at 12:25 PM, Andréas Kühne wrote: > I don't know anything about the python-rq stuff - however redis can be > configured to save to disk (see https://redis.io/topics/persistence) - so > you

Re: Multiplex results from (Django-Channels)

2017-04-27 Thread Avraham Serour
You should just get the room object attribute you need, like name or id, instead of concatenating the whole object On Apr 27, 2017 5:26 AM, "Yarnball" wrote: > I do appreciate the bit of direction youve provided. And if you're asking > to be paid, then sorry but I'm working free on a community p

Re: Most efficient and scalable search strategy

2017-05-24 Thread Avraham Serour
take a look at the postgres fulltext search capabilities, I can't make any promises for your old postgres version another common approach is to index the search into elasticsearch and querying elasticsearch for the searches, it should handles misspellings and return the search results fast, but yo

Re: Django+Haystack+Elastic issue

2017-05-24 Thread Avraham Serour
it sounds like elastic is paginating, did you check that? On Tue, May 23, 2017 at 12:41 AM, Nick Gilmour wrote: > Hi all, > > > > I'm following an example to setup Django with Haystack and ES from here: > > https://krzysztofzuraw.com/blog/2016/haystack-elasticsearch-part-one.html > > > Everythin

Re: New functionalities expected in Django 2.

2017-06-13 Thread Avraham Serour
https://docs.djangoproject.com/en/dev/releases/2.0/ On Tue, Jun 13, 2017 at 7:49 AM, Rohan Purekar wrote: > Is django 2 going to have inbuilt package for creating API's to cater to > ajax requests and JSON responses for which we use DRF. Another thing which > was on my mind was If Django 2 will

Re: Legitimate way to allow uploading of folders

2017-06-22 Thread Avraham Serour
The server can accept files, the frontend may allow the user to select a folder and send multiple files On Jun 22, 2017 8:32 PM, "Mandeep Tondak" wrote: > As per my experience we can not upload folder but we can upload zip folder > to server. You can unzip that folder and read all file and save

Re: Need to connect to django test database from out side of django(celery worker)

2017-06-22 Thread Avraham Serour
Any special reason you are not using eager=true for celery under test? On Jun 22, 2017 7:17 PM, "sarvi" wrote: > > Can someone help me with how can I get my celery worker process(standalone > app outside of djanog) to talk to a django test database ? > > I am trying to test a celery/django app.

Re: Need to connect to django test database from out side of django(celery worker)

2017-06-26 Thread Avraham Serour
k-always-eager >> >> But couldn't figure out how to implement/do the Advanced: Step 3 that is >> suggested there. >> >> >> >> On Thursday, June 22, 2017 at 11:44:23 AM UTC-7, Avraham Serour wrote: >>> >>> Any special reason you are no

Re: Need to connect to django test database from out side of django(celery worker)

2017-06-27 Thread Avraham Serour
go testing code. > > > > On Monday, June 26, 2017 at 9:42:50 AM UTC-7, Avraham Serour wrote: >> >> I don't think you need to create a custom TestRunner, I believe it would >> be enough to use setUp and tearDown to start and stop an external process, >> which in

Re: django webframework

2017-07-04 Thread Avraham Serour
I recommend against trying to make python run inside the JVM, specially if you are not familiar with python. Just use the normal python 3.6 and be happy On Mon, Jul 3, 2017 at 5:33 PM, Vinicius Assef wrote: > Hi Arun. > > Certainly you can learn Python and Django at the same time. But if you're

Re: Deprecating model field (Deleting model field, but keeping DB column)

2017-07-05 Thread Avraham Serour
you can remove the field and don't run migrations until you are ready to actually remove the column, or you may run migrations fake and leave the column there forever https://docs.djangoproject.com/en/1.11/ref/django-admin/#cmdoption-migrate-fake On Wed, Jul 5, 2017 at 6:39 AM, wrote: > I am ha

Re: Deprecating model field (Deleting model field, but keeping DB column)

2017-07-05 Thread Avraham Serour
emember to change the RemoveField operation > into the custom DeprecateField operation. It would be great if > makemigrations created the correct operations automatically. Is there a way > to do that? > > On Wednesday, July 5, 2017 at 7:27:22 AM UTC-4, Avraham Serour wrote: >>

Re: Django-oscar ModuleNotFoundError 'apps\\checkout'

2017-07-06 Thread Avraham Serour
The double backslash is probably because you are on Windows Can you post your directory structure? You may try printing the cwd on settings.py to see what the relative path should be On Jul 5, 2017 9:10 PM, "Bernard Oosthuizen" wrote: > I am trying to *fork* one of the apps of django-oscar so

Re: Django-oscar ModuleNotFoundError 'apps\\checkout'

2017-07-06 Thread Avraham Serour
└───frobshop > │ └───__pycache__ > └───requirements > > On Thursday, July 6, 2017 at 10:03:04 AM UTC+2, Avraham Serour wrote: >> >> The double backslash is probably because you are on Windows >> >> Can you post your directory structure? >> >> You may

Re: Use one correspondig database user for each application user

2017-07-11 Thread Avraham Serour
Where would you store the password hashes? This would mean that no data ever could have relations between users On Tue, Jul 11, 2017 at 12:40 PM, guettli wrote: > I guess most applications have exactly one database user. > > Why not use one database for each application user? > > Example: User

Re: What Way is best to extend User in Django 1.11?

2017-07-18 Thread Avraham Serour
I suggest creating a profile, leave the auth.User only for auth, all else specific to you application use your own model and reference to that On Tue, Jul 18, 2017 at 9:48 AM, 李余通 wrote: > How to extend User?I find many ways; > 1. Use Profile > eg: > > class UserProfile(models.Model): > use

Re: Multiple DB - Accessing another app's table/model?

2017-07-18 Thread Avraham Serour
import the Model and query it. from appB.models import Table Table.objects.all() On Tue, Jul 18, 2017 at 6:01 PM, miguel vfx wrote: > Hello, > > After following through the documentation, I was able to query data from > another database. However, I was only able to access the table of the same

Re: deploying on windows

2017-08-12 Thread Avraham Serour
I had to deploy django on windows once, after trying some different options I ended up installing cygwin and compiling uwsgi and nginx inside cygwin. Bonus you can use the same scripts to manage, you can ssh to the machine and run bash You could also try WSL, which is the same as cygwin but new (a

Re: regarding virtualenv and python version 3.5 or 3.4 or other versions

2017-08-13 Thread Avraham Serour
I suggest using 3.6, which is the current stable release if your machine or the server doesn't have this version installed you may compile it yourself and create the virtualenv for the project from there There are some projects that help you with that, I like pythonz https://github.com/saghul/pyth

Re: regarding virtualenv and python version 3.5 or 3.4 or other versions

2017-08-16 Thread Avraham Serour
rtlib._bootstrap' has no attribute > 'SourceFileLoader' > --- > > > and i tried to upgrade the pip3 and still the same error. > > Please help to figure it out. > > Thanks > > Ross > > > > On Sunday, August 13, 2017 at 8:11:57 AM UTC-7

Re: Install uWSGI on cygwin

2017-09-13 Thread Avraham Serour
try using pip: 'pip install uwsgi' On Wed, Sep 13, 2017 at 11:35 AM, Dick Pan wrote: > Hi, > > When I install uWSGI on cygwin by command: python2.7 uwsgiconfig.py > --build > > one strange problem occur, undefined reference to `uuid_generate' on > cygwin. > but uuid.h exist in /usr/include/uuid

Re: submit form as superuser vs regular user

2017-09-19 Thread Avraham Serour
not sure if related, but the docs suggest to inherit from AbstractUser, not User https://docs.djangoproject.com/en/1.11/topics/auth/customizing/ On Mon, Sep 18, 2017 at 12:58 PM, Danae Vogiatzi wrote: > In my django app I have a Myuser(User) class. It inherits the User class. > When a new user

Re: Big data

2017-09-29 Thread Avraham Serour
That doesn't sound that big. Maybe you can tune mysql, but I have worked with postgres handling more than that, it works fine without tuning, I changed a couple of settings (like work_mem) and improved On Fri, Sep 29, 2017 at 4:48 AM, Larry Martell wrote: > I am taking about using hbase as a db

Re: Tasty Pie in django

2015-07-29 Thread Avraham Serour
tastypie has a very good documentation, have you tried reading it to understand how it works? On Wed, Jul 29, 2015 at 6:19 AM, Anubhav Kaushik wrote: > If some one is having difficulty understanding my question. PLZ ASK. > > -- > You received this message because you are subscribed to the Google

Re: Best practice for two variants of a language

2015-07-29 Thread Avraham Serour
I would create only one arrival locale and decide which one is the default, probably the de_de would be the formal and the new language weighs be for the informal. As for the error messages I would just copy over the po for from django On Wed, Jul 29, 2015, 12:58 PM Raphael Michel wrote: > Hell

Re: Learning Django problems

2015-07-29 Thread Avraham Serour
Clearly the book example is using CSS and got aren't, maybe they forgot to tell you to add or you aren't loading the static files On Wed, Jul 29, 2015, 12:44 PM Stas soroka wrote: > I'm currently reading a book "Learning Django Web Development". Even thoug > I followed the book carefully, it say

Re: Speedy Mail Software

2015-08-01 Thread Avraham Serour
my first contribution is: don't use sourceforge, use anything else On Sat, Aug 1, 2015 at 4:20 PM, Abdulhakim Haliru wrote: > Interesting. I have once contemplated building a webmail software that > reads emails so customers don't lose emails upon switching webhosts. Hence, > your Speedy Mail So

Re: Different auth user models withoout doing multi-table inheritance

2015-08-10 Thread Avraham Serour
I personally like a profile model, but if you implement two you may have headaches when doing a reverse relation from user, you would need to check every time of the request.user is a customer or merchant. In any case what is the difference between them anyway? Why can't a user be both? On Mon, A

Re: Writing a “circuit breaker” for use in Django

2015-08-10 Thread Avraham Serour
> 1. What’s the most global, persisting, shared-across-requests type of data I can read & write to memory? Don't complicate your life, just store data in the database > 2. However I can do this, does this require using `threading.Lock()`? (looking around `dispatch.Signal` I see some use of it) If

Re: how to use the sites framework?

2015-08-14 Thread Avraham Serour
This would be one site with 3 routes, just create 3 views and 3 entries on URLs.py, you don't need the sites framework On Thu, Aug 13, 2015, 11:49 PM derek riemer wrote: > Hi, > I have 3 apps. A base site, with a main menu, a personal website with a > biography, and a weather app. I was curious

Re: Encrypted web mail

2015-08-16 Thread Avraham Serour
no, passwords shouldn't be encrypted, you should store hashes, just use the django default auth app On Sun, Aug 16, 2015 at 9:09 AM, Uri Even-Chen wrote: > Hi Dennis, > > > > On Sat, Aug 15, 2015 at 7:35 PM, Dennis Lee Bieber > wrote: > >> On Sat, 15 Aug 2015 12:47:17 +0300, Uri Even-Chen >> d

Re: Django CMS or Wiki?

2015-08-24 Thread Avraham Serour
try http://mezzanine.jupo.org/ On Mon, Aug 24, 2015 at 9:49 AM, guettli wrote: > I am unsure which application I should use for my personal homepage. > > At work we use a wiki and I like it a lot, since you can edit the content > very fast and linking > between pages is very easy. > > On the ot

Re: Django CMS or Wiki?

2015-08-24 Thread Avraham Serour
, guettli wrote: > Why do you like it? > > Am Montag, 24. August 2015 09:29:09 UTC+2 schrieb Avraham Serour: >> >> try http://mezzanine.jupo.org/ >> >> On Mon, Aug 24, 2015 at 9:49 AM, guettli wrote: >> >>> I am unsure which application I should use f

Re: Django oscar core apps confilicts with my local apps

2015-08-25 Thread Avraham Serour
Change your app name On Tue, Aug 25, 2015, 10:12 AM Kishan Mehta wrote: > I have been working on a e commerce website. I am using django-oscar 1.1 > for this. Here is my installed app looks like : > > INSTALLED_APPS = [ > 'django.contrib.admin', > 'django.contrib.auth', > 'django.contrib.content

Re: Turn off migrations completely in Django 1.7

2015-08-25 Thread Avraham Serour
> We're working with databases and their representations in application layer, and not vice versa. Speak for yourself, I'm working with the models, saving them in the database is just an implementation detail On Tue, Aug 25, 2015 at 3:21 PM, wrote: > > > On Tuesday, April 28, 2015 at 7:20:17 AM

Re: Notify Customer Support of Request Failures

2015-08-30 Thread Avraham Serour
add logging messages everywhere that matters, include any information relevant to you, then monitor the logs. the ELK stack is nice ( https://www.elastic.co/products/logstash) On Sun, Aug 30, 2015 at 7:49 AM, wrote: > Hello, > > I'd like to notify our customer support of certain errors. For exam

Re: Best Django Open Source Project for Intermediate Django Learners

2015-09-01 Thread Avraham Serour
are these projects even open source? I didn't find any reference on their websites. I any case I can suggest you taking a look at tree.io ( https://github.com/treeio/treeio/) I would love to get some help on the project, currently I'm focusing on adding tests and increasing coverage On Tue, Sep

Re: Django for data management in a no-UI application?

2015-09-02 Thread Avraham Serour
+1 to DRF, you may also use the django admin as a quick CRUD to your data On Sep 2, 2015 10:34 PM, "Rafael E. Ferrero" wrote: > I don't quite understand very well your use case, but, i think that you > can go with REST, maybe?? [http://www.django-rest-framework.org/] > > -- > Rafael E. Ferrero >

Re: Django template coverage

2015-09-20 Thread Avraham Serour
would this work with jinja2 templates also? On Tue, Aug 25, 2015 at 3:45 AM, Ned Batchelder wrote: > Hi all, > > If you've been using coverage measurement on your Django code, you might > be interested in a new development: now you can also measure the coverage > of your templates. > > Coverage.

Re: django on Windows

2015-10-01 Thread Avraham Serour
don't, just use the regular python from python.org, and please use the 64 bit version On Thu, Oct 1, 2015 at 10:32 PM, Ricardo Daniel Quiroga < l2radamant...@gmail.com> wrote: > The Best way is install activepython use 32bits for more compatibility > with any modules and open cmd.exe > > pip inst

Re: [REQUEST] Please list all the deprecations in the changelogs.

2015-10-12 Thread Avraham Serour
could you contribute the list you made so it can be added to the release notes, it is never too late to add them even for past releases On Mon, Oct 12, 2015 at 3:53 PM, Vasiliy Korol wrote: > Hi. > I find it useful to turn DeprecationWarnings into exeptions on the > development server in order t

Re: is Django right choice for a financial app

2015-10-12 Thread Avraham Serour
Sqlalchemy is more performant? In what way? Do you have any reference or this was from personal experience? On Oct 13, 2015 1:11 AM, "kk" wrote: > > > On Tuesday 13 October 2015 01:27 AM, bobhaugen wrote: > > krmane, google is misbehaving and will not allow me to reply to your reply > to me, so I

Re: is Django right choice for a financial app

2015-10-13 Thread Avraham Serour
well if you have online reviews stating or showing that sqlalchemy is faster than django ORM, than this is exactly what I'm asking you to post, it would be an interesting read On Tue, Oct 13, 2015 at 5:24 AM, kk wrote: > hello, > > > On Tuesday 13 October 2015 04:09 AM, Avr

Re: can I write Django a client consuming RESTfull api from elsewhere

2015-11-03 Thread Avraham Serour
you don't need DRF at all, DRF will help you write REST servers if you need to consume you can just use requests ( http://docs.python-requests.org/en/latest/) On Tue, Nov 3, 2015 at 1:44 PM, kk wrote: > Dear all, > I wish to know if I need to do some thing special for consuming a RESTfull > ser

Re: can I write Django a client consuming RESTfull api from elsewhere

2015-11-04 Thread Avraham Serour
the question is why, why would you want to store a global connection for a REST server? keep in mind that you would be making HTTP requests, meaning even that you had a global variable holding the connection it would just open and close each tie you make a request. if you need t keep a connection

Re: Just starting, cannot create Password for superuser

2015-11-11 Thread Avraham Serour
you are able to type the password, but it is not echoed just type your password and press enter, if I'm I remember correctly it will ask you to type again to confirm On Wed, Nov 11, 2015 at 7:34 PM, Raja Weise wrote: > Hi there, > I am having difficulty while following the "Writing your First Dj

Re: Domain Driven Development

2015-11-11 Thread Avraham Serour
I believe you could call a queryset this thing, or this thing a queryset On Thu, Nov 12, 2015 at 12:43 AM, Alex Newman wrote: > I almost hate to bring this up, but we are reading Eric Evan's book > "Domain Driven Development" at my company in our technical bookclub and > some techniques in the b

Re: Requesting data from an API and rendering data on website

2015-11-18 Thread Avraham Serour
Can you do it in plain python? On Wed, Nov 18, 2015, 12:34 PM nAncy sharma wrote: > Hi, > > > I am using Django Cms 3.1.3. I want to give a call (request ) to an API > and display the result on my website. > Could anyone help me with this ? I am new to django cms ! > > -- > You received this mes

Re: how to restrict responses to a single server/domain ?

2015-12-31 Thread Avraham Serour
You may simple use nginx and have multiple server blocks, one for each domain, all listening on the same port (80 or 443) On Dec 30, 2015 10:11 AM, "Abraham Varricatt" < abraham.varric...@googlemail.com> wrote: > I'm trying to build something similar to a microservice using Django and > can't figu

Re: Guidelines For A Newbie

2016-01-03 Thread Avraham Serour
1 - learn django if you already know python start with the django tutorial https://docs.djangoproject.com/en/1.9/intro/tutorial01/ if you don't know python so well I recommend http://www.learnpython.org/ after that if you still don't know the path to take feel free to ask again on how to continue

Re: Steadman

2016-01-06 Thread Avraham Serour
virus people, don't click the link On Wed, Jan 6, 2016 at 2:29 PM, Steadman wrote: > Please find the attached document referred to the mail subject. > > Steadman.io > Blog | Podcasts | Twitter >

Re: Having trouble understanding Timezone

2016-01-06 Thread Avraham Serour
1. you don't need to st the TIME_ZONE setting, leave at default 2. honestly I don't know how setting the timezone in postgres influences the data, but I believe it doesn't need to be in sync with django settings. 3. yes, this is a good recommendation success Avraham On Thu, Jan 7, 2016 at 5:36 AM

Re: I want to copy the inline object included in the admin when I copy the admin object

2016-01-26 Thread Avraham Serour
How are you copying? Selecting with your mouse and ctrl+c? Or in code? On Tue, Jan 26, 2016, 4:32 AM 张超 wrote: > *I want to copy the inline object included in the admin when I copy the > admin object* > > -- > You received this message because you are subscribed to the Google Groups > "Django us

Re: Does anyone have good results connecting Django to Mysql on localhost and windows 7?, me not.

2016-01-26 Thread Avraham Serour
Are you using localhost or 127.0.0.1? In my experience 127.0.0.1 is faster and less buggy on windows On Tue, Jan 26, 2016, 4:30 AM Carlos Andre wrote: > install setuptools. > install pymysql > > and the your python version! > > 2016-01-25 14:17 GMT-02:00 Gonzalo V : > >> Wich module did you use?

Re: Tutorial part 1 Parent module not loaded

2016-01-31 Thread Avraham Serour
can you post your urls.py On Sun, Jan 31, 2016 at 5:04 PM, jfragos via Django users < django-users@googlegroups.com> wrote: > Hi, > I am very new to Python and Django but not to programming. I have > been programming for 30 years. That said I am trying to work my way thru > the Django tutorial pa

Re: Tutorial part 1 Parent module not loaded

2016-01-31 Thread Avraham Serour
please try: from polls import views or import views On Sun, Jan 31, 2016 at 6:59 PM, jfragos via Django users < django-users@googlegroups.com> wrote: > Thank you for the response. Since there are 2 of them I have posted > both. I have highlighted in yellow the places where they reside. I have

Re: Kind'a TL, but please DR - Need your thoughts

2016-01-31 Thread Avraham Serour
if a process takes too long to complete it won't be able to process new requests, so you will be limited to the number of workers you told uwsgi to use. http requests should be short lived, if you have some heavy processing to do the http request should return with something like 'accepted' and s

Re: Scaling Django

2016-02-03 Thread Avraham Serour
what do you mean by slow? can you measure in ms? On Wed, Feb 3, 2016 at 5:30 PM, Joshua Pokotilow wrote: > At the startup where I work, we've written a lot of our server code in > Django. So far, we've adopted a "build it fast" mentality, so we invested > very little time in optimizing our code.

Re: Scaling Django

2016-02-03 Thread Avraham Serour
is a JSON array with thousands of > dictionaries. We haven't yet investigated why it's slow, nor have we tried > to cache / memoize anything to speed it up. > > On Wednesday, February 3, 2016 at 10:46:25 AM UTC-5, Avraham Serour wrote: >> >> what do you mean by slow

Re: Django Multiple User Login

2016-02-11 Thread Avraham Serour
maybe you can create your own session model that is related to multiple users On Thu, Feb 11, 2016 at 5:33 PM, Andreas Kuhne wrote: > You can't? > > Not without logging out the previous user. > > The session itself is used to contain a reference to the current user. You > can only have one sessi

Re: Running a Django site on a standalone Windows laptop

2016-02-16 Thread Avraham Serour
I would also consider cygwin, you can even use uwsgi and nginx, you can easily add them as cygwin services which cygwin takes care to add them as windows services On Tue, Feb 16, 2016, 4:59 PM Remco Gerlich wrote: > We thought about that and it's certainly an option, but 1) the > communication w

Re: null datetime field and json fixtures

2016-02-17 Thread Avraham Serour
Try not setting any value to the field, it should be saved with the default value On Wed, Feb 17, 2016, 2:35 AM Malik Rumi wrote: > There are a ton of answers to this question out there - if you can wade > through all the ones that refer to forms and not models. The consensus > seems to be that

Re: some question

2016-02-20 Thread Avraham Serour
Yes and no. If you deploy your django project using nginx and uwsgi fur example and multiple users make requests at the same time they will receive answers in parallel, so yes it will be processed in parallel. But no, django is not the one handling the parallelism, static requests are handled by

Re: Django authentication

2016-02-22 Thread Avraham Serour
AFAIK DRF uses the django auth On Mon, Feb 22, 2016 at 3:36 PM, Wilfreid Mpunia wrote: > Good day, I have the following question. > I'm still learning and improving my django level, but I'm a bite confused > with a project that I'm working on. > > For a django web app, which requires a user to r

Re: API REST - Url's Serialized models don't work with the hostname of my production server - Django Rest Framework

2016-02-23 Thread Avraham Serour
are you running django using manage.py runserver? On Tue, Feb 23, 2016 at 4:03 PM, Bernardo Garcia wrote: > Hi everyone Djangonauts > :) > > Currently I am exposing a Django application (for the momento is just > thier users schema) with Django Rest Framework and happen that each > serialized m

Re: API REST - Url's Serialized models don't work with the hostname of my production server - Django Rest Framework

2016-02-23 Thread Avraham Serour
are you using a config file for gunicorn? in the example it tells to use: bind = '127.0.0.1:8001' are you binding to 127.0.0.1 ? On Tue, Feb 23, 2016 at 4:33 PM, Bernardo Garcia wrote: > Hi Mr. Avraham Serour thanks for the attention > > In my amazon ec2 production ser

Re: API REST - Url's Serialized models don't work with the hostname of my production server - Django Rest Framework

2016-02-23 Thread Avraham Serour
ttp://127.0.0.1:8000 <http://127.0.0.1:8000>;* > proxy_set_header X-Forwarded-Host $server_name; > proxy_set_header X-Real-IP $remote_addr; > add_header P3P 'CP="ALL DSP COR PSAa PSDa OUR NOR ONL UNI COM > NAV"'; > }

Re: Debugging DJango app on production for High CPU Usage

2016-02-24 Thread Avraham Serour
> sometimes going beyond 100% how?? You can use django-debug-toolbar on your development machine, check the logs for the pages that take the longest to process and the one that are the most requested and start with those, of course your CPU won't be high but you should check and compare if there

Re: Single Page Application in Django

2016-03-07 Thread Avraham Serour
> As far as I understand the django philosophy, no, implementing something as a SPA is more of a concern to your frontend, if you use django solely as a backend (say using DRF for example) it won't matter if your client side is an SPA, mobile app or anything else, django will see requests and answe

Re: Redis cache for Django

2016-03-07 Thread Avraham Serour
so do you want to use redis as a backend for cache instead of memcached or do you want to use redis complex data structures in your project? On Mon, Mar 7, 2016 at 4:50 PM, Dheerendra Rathor wrote: > Hey folks, > > This post is for getting opinions > > I want to use Redis cache for my Django pro

Re: please tell me the best way to construct a Model of Quiz form

2016-03-08 Thread Avraham Serour
I believe a model similar to the poll app from the tutorial would be appropriate On Tue, Mar 8, 2016 at 10:20 AM, Jun Tanaka wrote: > Hi, > > I am trying to make a form for Quizzes. I hope to know how to construct a > model which be added choices. A model should be constructed by three parts >

<    1   2   3   4   5   >