Why using admin.py in apps?

2015-01-25 Thread Aliane Abdelouahab
Hi, My question seem dumb, but what is the purpose of repeating the admin.py in the apps? as i understand, if i want to have a good practice, i separate my application on mini apps so i can re-use them, and one of the apps that is always used, are Logins (Registrations), so, why i have to repe

Re: Why using admin.py in apps?

2015-01-25 Thread Aliane Abdelouahab
fic to each app, on how you want the models for your > app to show up (or not show up) in the admin page. > > Each app's admin.py will be unique to the models specific in that app. > > The tutorial in the Django documentation shows a good example. > > ----

Re: Why using admin.py in apps?

2015-01-25 Thread Aliane Abdelouahab
magine having 12-15 apps and managin all of them in > one admin.py file, that would make debugging harder, the admin.py per app > approach helps you keep all of your app's login inside the app, makes it > easy to re-use it > > On Sun Jan 25 2015 at 2:47:18 PM Aliane Abdelouahab >

Re: Question on url routing

2014-10-12 Thread Aliane Abdelouahab
in your class where you defined your 'private' link, you just redirects him everytime he clicks on it, or you make and if-else that is bound to the IP of the admin, so everytime the user clicks on it, he gets a 404 thinking that the link dont exist, else, the admin gets the right page. Le vendr

Djago-Brackets (templates support for Adobe Brackets)

2014-10-12 Thread Aliane Abdelouahab
Hi, For Brackets users, here a small extension: https://github.com/abdelouahabb/django-brackets CodeMirror already supports django, but i dont know why they dident added it to Brackets, so with the extension it will be possible. Good templating :) -- You received this message because you are sub

django-admin creates the views.py files in the wrong place!

2014-10-22 Thread Aliane Abdelouahab
Hi, Django 1.7 when a beginner runs the first tutorial, he has to change the views.py file outside the app to the whole project itself. i found this, http://stackoverflow.com/questions/22011791/importerror-no-module-named-views and it seems it is related to Django 1.6 too? -- You received thi

Re: django-admin creates the views.py files in the wrong place!

2014-10-23 Thread Aliane Abdelouahab
i followed exactly by words the tutorial http://www.tangowithdjango.com/book17/chapters/setup.html#creating-a-django-application and it seems the problem is about creating the double directory, and when doing startapp it creates a directory parallel to the other one created? -- You received this

Re: django-admin creates the views.py files in the wrong place!

2014-10-23 Thread Aliane Abdelouahab
oh! sorry :D i was dumb! how can i missed this! thank you again! -- 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 po

Re: is it possible to detect the end of the django app?

2014-10-23 Thread Aliane Abdelouahab
> > the end of user's task on an internet application can be: > Disconnecting: this is clear, disconnects if there is a login, and goes do other stuff, simply if the cookie is removed, that means his task is over. Being idle: you detect with the cookie if there is not a big delta time from whe

New way to use URL dispatchers?

2014-10-24 Thread Aliane Abdelouahab
Hi, in the docs, i only see the 'list' way, so why Django 1.7 dont generate the url by the new way and still use the old way? because i found: Deprecated since version 1.8: urlpatterns should be a plain list of django.conf.urls.url()

Re: New way to use URL dispatchers?

2014-10-24 Thread Aliane Abdelouahab
for URLpatterns. Django 1.7 doesn't support this new format, and the > documentation for version 1.7: > > https://docs.djangoproject.com/en/1.7/ref/urls/#patterns > > doesn't mention the new format. > > Hope that helps! > > Yours, > Russ Magee %-) > > >

Re: Problem with Pillow image resize and save

2014-10-25 Thread Aliane Abdelouahab
You have to send the picture editing to another process, because you will block the operation untill the image will be converted! Le samedi 25 octobre 2014 19:23:33 UTC+1, John a écrit : > > On 25/10/14 15:26, Daniel Grace wrote: > > I need to include the following steps, but I don't know how

Re: New way to use URL dispatchers?

2014-10-25 Thread Aliane Abdelouahab
ah! thank you, because this is the 'cleanest' way, espetially for a beginner. thank you :) Le samedi 25 octobre 2014 21:04:49 UTC+1, Carl Meyer a écrit : > > > On Oct 24, 2014, at 8:37 PM, Russell Keith-Magee > wrote: > > When it is released, Django 1.8 will include support for the new preferred

Re: Problem with Pillow image resize and save

2014-10-25 Thread Aliane Abdelouahab
is very short and the admin was only used by a very > small number of users who were sufficiently patient. > > John > > On 25/10/14 20:23, Aliane Abdelouahab wrote: > > You have to send the picture editing to another process, because you will > block the operation until

Re: Successful project on windows does not render assets on mac

2014-11-01 Thread Aliane Abdelouahab
it seems that python finds media directory, but not the static one, so just use print and the variable of your static folder and look at the console where python is seeing the static folder. Le samedi 1 novembre 2014 23:44:21 UTC+1, robert brook a écrit : > > I am copying the code from one devel

Re: Successful project on windows does not render assets on mac

2014-11-01 Thread Aliane Abdelouahab
s all set. > > Thanks > > > > On Saturday, November 1, 2014 6:48:45 PM UTC-4, Aliane Abdelouahab wrote: >> >> it seems that python finds media directory, but not the static one, so >> just use print and the variable of your static folder and look at the >> cons

Re: How to generally handle exceptions in function based and class based views?

2014-11-02 Thread Aliane Abdelouahab
why not using the classic try except ? since it is a normal python? Le dimanche 2 novembre 2014 18:18:11 UTC+1, Daniel Grace a écrit : > > Hi, I'm looking for some information / examples of how to generally handle > exceptions and show a message to the user, in function based and class > based v

Re: How to generally handle exceptions in function based and class based views?

2014-11-03 Thread Aliane Abdelouahab
you can make for example a custom template that you call inside the except. Le lundi 3 novembre 2014 19:59:33 UTC+1, Daniel Grace a écrit : > > Thanks for the information Aliane and Steven, although I still don't know > what to do when handling exceptions in say form_valid of a CBV. How to > re

Re: Multiple site package directories for Python and question about apache configuration

2014-11-03 Thread Aliane Abdelouahab
On linux, python installs libs in diffferents places: for example in open suse, when you install it the first time, and you choose python and some third party libraries, and then when you will do setup.py for a library you download, they will be in different locations! http://stackoverflow.com/a

Re: Multiple site package directories for Python and question about apache configuration

2014-11-04 Thread Aliane Abdelouahab
t would the syntax be? > > On Monday, November 3, 2014 4:15:59 PM UTC-5, Aliane Abdelouahab wrote: >> >> On linux, python installs libs in diffferents places: for example in open >> suse, when you install it the first time, and you choose python and some >> third par

Re: urlize filter does not handle trailing 'dot-dot-dot' correctly

2014-11-04 Thread Aliane Abdelouahab
you can base64 encode it, and decode it after (as a temporary solution) Le mardi 4 novembre 2014 17:13:33 UTC+1, wi...@agolo.com a écrit : > > Hi, new guy around here. > > I am an engineer for a startup (www.agolo.com, check us out :P). We work > heavily with twitter content, and i've discovered

Re: Forms / pages and CSS like Django admin

2014-11-06 Thread Aliane Abdelouahab
here? https://docs.djangoproject.com/en/dev/topics/forms/media/ If you like the widgets that the Django Admin application uses, feel free to use them in your own application! They’re all stored in django.contrib.admin.widgets. Le jeudi 6 novembre 2014 16:51:29 UTC+1, Daniel Grace a écrit : > >

Re: New to Django question about using it without ORM

2014-11-07 Thread Aliane Abdelouahab
- Google groups hide your email so crawler dont use it to gather emails for spams. - Django 1.7 has the features people always waited it, the the 'migrate' which allows you to change your schema and let Django rédapate it :) - the orm is independant, you can directly write raw sql if you want, th

Re: New to Django question about using it without ORM

2014-11-07 Thread Aliane Abdelouahab
if you are in twisted, why you dident look at tornado? Le vendredi 7 novembre 2014 21:38:48 UTC+1, krmane a écrit : > > On 11/08/2014 01:46 AM, Aliane Abdelouahab wrote: > > - Django 1.7 has the features people always waited it, the the 'migrate' > > which allows y

Re: New to Django question about using it without ORM

2014-11-07 Thread Aliane Abdelouahab
and here is an excellent tutorial on python 2.7 : http://www.tangowithdjango.com/book17/ -- 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: Useing non-ascii character in django

2014-11-08 Thread Aliane Abdelouahab
in your html you add Le samedi 8 novembre 2014 09:19:10 UTC+1, Hossein Rashnoo a écrit : > > When i return Persian characters in view.py (same as Arabic characters) i > got an error , So i add this line to top of view.py: > # encoding=utf-8 > > And now my Persian word is like this : > � > A

Re: Useing non-ascii character in django

2014-11-08 Thread Aliane Abdelouahab
and dont forget to use an font that is unicode, using CSS3. Le samedi 8 novembre 2014 16:47:42 UTC+1, Aliane Abdelouahab a écrit : > > in your html you add > > > Le samedi 8 novembre 2014 09:19:10 UTC+1, Hossein Rashnoo a écrit : >> >> When i return Persian characters

Re: Django strange behaviour

2014-11-08 Thread Aliane Abdelouahab
you are calling the function twice, appending every element, and then appending the whole list! Le samedi 8 novembre 2014 18:07:04 UTC+1, monoBOT monoBOT a écrit : > > Lists are inmutable You are modifiying the same list everytime you > invoque that view > El 07/11/2014 10:08, "termopro" >

Re: Django strange behaviour

2014-11-08 Thread Aliane Abdelouahab
here is what is gives in the console: class Demo(): result = [] def do_something(self): self.result.append(1) self.result.append(2) self.result.append(3) return self.result demo = Demo() result = demo.do_something() result [1, 2, 3] demo = Demo()

Re: Integrate Google Cloud Sql.

2014-11-08 Thread Aliane Abdelouahab
what you change (since it is just a mysql) is the host ip! DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'db_name', 'USER': 'db_name', 'PASSWORD': 'db_password', 'HOST': 'serverIPAddress',

Re: Is django framework feasible for developing online LMS?

2014-11-12 Thread Aliane Abdelouahab
if you are planning to use a long opened connexion, you can check http://www.tornadoweb.org/en/stable/ it is easy, and you gonna like it, and it dont need a long learning curve, it has a templating engine like django. so, good luck :) Le mercredi 12 novembre 2014 08:20:22 UTC+1, Pradip Shahi a

Re: Database "postgres" does not exist error when running test command

2014-11-14 Thread Aliane Abdelouahab
how about this http://stackoverflow.com/a/19426770/861487 Le vendredi 14 novembre 2014 18:10:41 UTC+1, Daniel Grace a écrit : > > Hi, > I get an error when running the test command: > >python manage.py test flow > > Creating test database for alias 'default'... > Traceback (most recent call last):

Re: Runtime warning about a naive datetime when running the test command

2014-11-15 Thread Aliane Abdelouahab
i think it is the same problem here (which has the solution) http://stackoverflow.com/a/20106079/861487 Le samedi 15 novembre 2014 15:22:18 UTC+1, Daniel Grace a écrit : > > Hi, > I get a runtime warning about a naive datetime when running the test > command: > >python manage.py test flow > > Cre

How to generate the docs with the new style?

2014-12-29 Thread Aliane Abdelouahab
hi, i asked the question in SO but still nothing, can the devs share the new style to the github repo? http://stackoverflow.com/questions/27673432/django-docs-with-the-new-style -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe fro

Re: How to generate the docs with the new style?

2014-12-31 Thread Aliane Abdelouahab
jango/django/tree/master/docs/_theme/djangodocs > > I think it's a non-trivial amount of work and tricky because we are using > things like web fonts on the main site. It's not a high priority in my mind. > > On Monday, December 29, 2014 7:33:57 PM UTC-5, Aliane Abdelouahab wro