It currently works as you describe: "from .B.models import BModel", but I
need it to work like "from ...B.models import BModel" to import
apps/B/models.py module. The problem with "..." is that apps directory is
not a module (i.e. there is no __init__.py file). The app directory is the
first
It may be worth trying a relative import, depending on which version of
Python you're using. I believe you can do "from .B.models import BModel".
Note the '.' full-stop/period before the module. I can't promise that
will fix your problem, as the layout isn't entirely clear to me, but it
class ProductGroup(models.Model):
group_sku = models.CharField(unique=True, max_length=255)
brand = models.CharField(max_length=255)
...
class Product(models.Model):
product_sku = models.CharField(unique=True, max_length=255)
color = models.CharField(max_length=255)
size
Hello,
To be installed, psycopg2 needs to know where PostgreSQL headers (.h files)
and libraries (.a files) are situated. Header files are required by compiler
while libraries are required by linker.
PostgreSQL provides special tool named "pg_config" that tells everyone where
PostgreSQL is
Jnt of the best way is a slug.
I nether do use id or object_id by security reason (hacker can try to
access another object or count on objects in your application, such as
administrator usually has id as 0 or small number. It is good target for
attack). Keep in mind that id is mutable after
On Wednesday, June 4, 2014 2:38:34 AM UTC-6, Vittorio wrote:
>
> #models.py
> ...
> class magazzino_vista_lista(models.Model):
> id_ordine = models.IntegerField(null=False, blank=False,
> db_column='ID_ORDINE')
> cod_magazzino_galileo = models.CharField(max_length=48,
>
Hi All,
Using postgres json and hstore fields to store alot of data.
How would i go about create a C.R.U.D using this field types,
java,c/c++,php or python would make it easier for me understand.
Regards
--
You received this message because you are subscribed to the Google Groups
My understanding is that psycopg2 looks for some postgres files during the
install. If you have postgres already installed on the same box, you should be
able to resolve this problem by adding the postgres folder to your PATH
environment variable before running 'pip install psycopg2'. The
Could you please send your view.py form.py and template ...
Many thanks,
Serge
+380 636150445
skype: skhohlov
On Sat, Apr 19, 2014 at 3:39 AM, nobody wrote:
> Thanks Serge, please see following embedded comments.
>
>
> On Friday, April 18, 2014 11:27:01 PM UTC+10,
Hi all,
I have an issue with nested transaction atomic block and concurrent
processes on MySQL.
Please find details here:
http://stackoverflow.com/questions/24039678/django-transaction-failure-for-nested-atomic-blocks-and-concurrent-processes-on
Thats a matter of taste ... i use model_id
2014-06-04 14:07 GMT+01:00 Thomas Güttler :
> What is the best practice for named URL parameter which refer to a primary
> key of a model?
>
> I have seen many ways:
>
> - object_id
> - mymodel_id
> - pk
> - id
> - .
>
>
I have avoided the issue in the short term by not using ATOMIC_REQUESTS and
going back to the 1.5 transaction middleware. What could possibly be in my
code or project that does not sit well with ATOMIC_REQUESTS?
-Tim
On Monday, June 2, 2014 1:50:40 PM UTC-7, Tim Zenderman wrote:
>
> It seems
If Ubuntu 12.04 or higher
do:
sudo apt-get install libpq-dev
Em quinta-feira, 24 de março de 2011 12h01min43s UTC-3, Andre Lopes
escreveu:
>
> Hi,
>
> This question is not directly related with Django, but with Python.
>
> I have installed "virtualenv" to have a virtual environment. Now I
If you use "DetailView"
(https://docs.djangoproject.com/en/dev/ref/class-based-views/generic-display
/#django.views.generic.detail.DetailView) you may call this field "slug" (it
is default). But you can overwrite it.
But in your case custom function is used, so you may call this field
whatever
I am not aware of any best practices for wording here, though my general
recommendaton would the wording should be identical to the attribute name
of the model, e.d. 'id', 'slug' or whatever. I would not add the "mymodel"
prefix as long as it becomes clear from the context to which model it
Hi guys,
I need to use Postgres Json fields in a Django project. I looked around
and I see many projects that implement json fields and/or queries to json
fields, I am not sure which is the most widely used. Does someone have any
recommendations?
Thanks
Marcela
--
You received this message
What is the best practice for named URL parameter which refer to a primary key
of a model?
I have seen many ways:
- object_id
- mymodel_id
- pk
- id
- .
example:
urlpatterns = [
url(r'^article/(?P\d+)/$', 'article.view'),
...
]
Up to now we used "mymodel_id" but it gets
I have opend another question for this issue:
https://groups.google.com/forum/#!topic/django-users/MBcu77WFCMw
Am Dienstag, 3. Juni 2014 14:28:52 UTC+2 schrieb Juergen Schackmann:
>
> Hi all,
>
> I have a issue, with users not being able to log into my site anymore
> (after it worked fine for
Hi all,
this question refers to this previous
question: https://groups.google.com/forum/#!topic/django-users/8IXEvfU72S4.
However, it seems like the problem is slightly different, I decided to open
a new question:
After my site has been up and running for a while in production, I suddenly
I found several solution here: http://stackoverflow.com/a/7934577/633961
Am 03.06.2014 15:57, schrieb Thomas Güttler:
Hi,
I am a software developer and like the way django ORM defines the database (via
models.py) very much.
Unfortunately for a new project, we have the constraint, that the
Hello Folks,
I am learning tangowithdjango book . In chapter 5 while dealing
the Populated Script i am getting this error . Please any one can help me
on this
(mysite)seenu@acer:~/django_projects/seenu/tango_django$ python
populate_rango.py
Starting Rango population script...
Thanks for this reply , am not using anybody's code. I am still studying
django and was wondering where those fields where from. Thanks for the
clarification. With time i will write my own field since am from Cameroon.
On Tuesday, June 3, 2014 2:16:37 AM UTC+1, Andrew Farrell wrote:
>
> Hi Mr.
I have modules in the project with the same names, all placed in different
applications.
Particularly there are two apps that conflict and result an ImportError.
The project structure approximately is as follows.
project
|_ project
|_ settings.py
|_ ...
|_ apps
|_ A
|_
I have an Ubuntu linux server on which I installed the oracle instanclient
stuff to run a client of a remote legacy oracle database.
It works great!
#TNSNAMES.ORA
my_db=
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 46.128.3.178)(PORT = 1521))
)
(CONNECT_DATA =
On Tuesday, 3 June 2014 22:35:07 UTC+1, Dr Shauny wrote:
>
> Hi,
>
> I have a Django/Python app that is hosted on Heroku. The app uses the
> Instagram API.
>
> I am trying to secure the app by enforcing signed HTTP headers using
> X-Insta-Forwarded-For.
>
> The actual header value is constructed
25 matches
Mail list logo